Skip to content

Commit c29586b

Browse files
committed
wip
1 parent fed1d94 commit c29586b

File tree

199 files changed

+3479
-481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+3479
-481
lines changed

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export default tseslint.config([
120120
'packages/backend/src/runtime/**/*',
121121
'packages/clerk-js/rspack.config.js',
122122
'packages/shared/src/compiled/path-to-regexp/index.js',
123+
'packages/shared/tsdown.config.mjs',
123124
],
124125
},
125126
{

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,11 @@
135135
"react": "catalog:react",
136136
"react-dom": "catalog:react",
137137
"rimraf": "6.0.1",
138+
"rolldown": "catalog:repo",
138139
"statuses": "^1.5.0",
139140
"tree-kill": "^1.2.2",
140141
"ts-jest": "29.2.5",
142+
"tsdown": "catalog:repo",
141143
"tsup": "catalog:repo",
142144
"turbo": "^2.5.4",
143145
"turbo-ignore": "^2.5.4",
@@ -165,9 +167,6 @@
165167
"overrides": {
166168
"jest": "29.7.0",
167169
"jest-snapshot-prettier": "npm:prettier@^3.5.3"
168-
},
169-
"patchedDependencies": {
170-
171170
}
172171
}
173172
}

packages/astro/src/stores/external.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { deriveState } from '@clerk/shared/deriveState';
22
import { eventMethodCalled } from '@clerk/shared/telemetry';
3+
import type { SignedInSessionResource } from '@clerk/types';
34
import { batched, computed, onMount, type Store } from 'nanostores';
45

56
import { $clerk, $csrState, $initialState } from './internal';
@@ -51,7 +52,7 @@ export const $userStore = computed([$authStore], auth => auth.user);
5152
* @example
5253
* $sessionStore.subscribe((session) => console.log(session.id))
5354
*/
54-
export const $sessionStore = computed([$authStore], auth => auth.session);
55+
export const $sessionStore = computed([$authStore], auth => auth.session as SignedInSessionResource | null | undefined);
5556

5657
/**
5758
* A client side store that is populated after clerk-js has loaded.

packages/backend/src/util/shared.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
export { addClerkPrefix, getScriptUrl, getClerkJsMajorVersionOrTag } from '@clerk/shared/url';
2-
export { retry } from '@clerk/shared/retry';
1+
export { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';
32
export {
3+
getCookieSuffix,
4+
getSuffixedCookieName,
45
isDevelopmentFromSecretKey,
56
isProductionFromSecretKey,
67
parsePublishableKey,
7-
getCookieSuffix,
8-
getSuffixedCookieName,
98
} from '@clerk/shared/keys';
10-
export { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';
9+
export { retry } from '@clerk/shared/retry';
10+
export { addClerkPrefix, getClerkJsMajorVersionOrTag, getScriptUrl } from '@clerk/shared/url';
1111

1212
import { buildErrorThrower } from '@clerk/shared/error';
1313
import { createDevOrStagingUrlCache } from '@clerk/shared/keys';

packages/chrome-extension/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"strict": true,
1010
"forceConsistentCasingInFileNames": true,
1111
"noFallthroughCasesInSwitch": true,
12-
"module": "esnext",
13-
"moduleResolution": "node",
12+
"module": "nodenext",
13+
"moduleResolution": "nodenext",
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,
1616
"jsx": "react-jsx",

packages/clerk-js/src/core/resources/BillingSubscription.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export class BillingSubscription extends BaseResource implements BillingSubscrip
6060

6161
export class BillingSubscriptionItem extends BaseResource implements BillingSubscriptionItemResource {
6262
id!: string;
63+
paymentMethodId!: string;
6364
plan!: BillingPlan;
6465
planPeriod!: BillingSubscriptionPlanPeriod;
6566
status!: BillingSubscriptionStatus;
@@ -86,6 +87,7 @@ export class BillingSubscriptionItem extends BaseResource implements BillingSubs
8687
}
8788

8889
this.id = data.id;
90+
this.paymentMethodId = data.payment_method_id;
8991
this.plan = new BillingPlan(data.plan);
9092
this.planPeriod = data.plan_period;
9193
this.status = data.status;

packages/elements/src/react/hooks/use-password.hook.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useClerk } from '@clerk/shared/react';
2+
import type { PasswordSettingsData, PasswordValidation } from '@clerk/shared/types';
23
import { noop } from '@clerk/shared/utils';
3-
import type { PasswordSettingsData, PasswordValidation } from '@clerk/types';
44
import * as React from 'react';
55

66
import type { ErrorCodeOrTuple } from '../utils/generate-password-error-text';
@@ -21,6 +21,7 @@ type UsePasswordCallbacks = {
2121

2222
export const usePassword = (callbacks?: UsePasswordCallbacks) => {
2323
const clerk = useClerk();
24+
// @ts-expect-error - ignore error for now
2425
const passwordSettings = clerk.__unstable__environment?.userSettings.passwordSettings as PasswordSettingsData;
2526
const { disable_hibp, min_zxcvbn_strength, show_zxcvbn, ...config } = passwordSettings || {};
2627

packages/elements/src/react/sign-in/root.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function SignInFlowProvider({ children, exampleMode, fallback, isRootPath }: Sig
4141
const cb = () => {
4242
const evt: SignInRouterInitEvent = {
4343
type: 'INIT',
44+
// @ts-expect-error - ignore error for now
4445
clerk,
4546
exampleMode,
4647
formRef,

packages/elements/src/react/sign-up/root.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function SignUpFlowProvider({ children, exampleMode, fallback, isRootPath }: Sig
4141
const cb = () => {
4242
const evt: SignUpRouterInitEvent = {
4343
type: 'INIT',
44+
// @ts-expect-error - ignore error for now
4445
clerk,
4546
exampleMode,
4647
formRef,

packages/shared/package.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,75 +12,76 @@
1212
"exports": {
1313
".": {
1414
"import": {
15-
"types": "./dist/index.d.mts",
16-
"default": "./dist/index.mjs"
15+
"types": "./dist/runtime/index.d.mts",
16+
"default": "./dist/runtime/index.mjs"
1717
},
1818
"require": {
19-
"types": "./dist/index.d.ts",
20-
"default": "./dist/index.js"
19+
"types": "./dist/runtime/index.d.ts",
20+
"default": "./dist/runtime/index.js"
2121
}
2222
},
2323
"./*": {
2424
"import": {
25-
"types": "./dist/*.d.mts",
26-
"default": "./dist/*.mjs"
25+
"types": "./dist/runtime/*.d.mts",
26+
"default": "./dist/runtime/*.mjs"
2727
},
2828
"require": {
29-
"types": "./dist/*.d.ts",
30-
"default": "./dist/*.js"
29+
"types": "./dist/runtime/*.d.ts",
30+
"default": "./dist/runtime/*.js"
3131
}
3232
},
3333
"./react": {
3434
"import": {
35-
"types": "./dist/react/index.d.mts",
36-
"default": "./dist/react/index.mjs"
35+
"types": "./dist/runtime/react/index.d.mts",
36+
"default": "./dist/runtime/react/index.mjs"
3737
},
3838
"require": {
39-
"types": "./dist/react/index.d.ts",
40-
"default": "./dist/react/index.js"
39+
"types": "./dist/runtime/react/index.d.ts",
40+
"default": "./dist/runtime/react/index.js"
4141
}
4242
},
4343
"./utils": {
4444
"import": {
45-
"types": "./dist/utils/index.d.mts",
46-
"default": "./dist/utils/index.mjs"
45+
"types": "./dist/runtime/utils/index.d.mts",
46+
"default": "./dist/runtime/utils/index.mjs"
4747
},
4848
"require": {
49-
"types": "./dist/utils/index.d.ts",
50-
"default": "./dist/utils/index.js"
49+
"types": "./dist/runtime/utils/index.d.ts",
50+
"default": "./dist/runtime/utils/index.js"
5151
}
5252
},
5353
"./workerTimers": {
5454
"import": {
55-
"types": "./dist/workerTimers/index.d.mts",
56-
"default": "./dist/workerTimers/index.mjs"
55+
"types": "./dist/runtime/workerTimers/index.d.mts",
56+
"default": "./dist/runtime/workerTimers/index.mjs"
5757
},
5858
"require": {
59-
"types": "./dist/workerTimers/index.d.ts",
60-
"default": "./dist/workerTimers/index.js"
59+
"types": "./dist/runtime/workerTimers/index.d.ts",
60+
"default": "./dist/runtime/workerTimers/index.js"
6161
}
6262
},
6363
"./dom": {
6464
"import": {
65-
"types": "./dist/dom/index.d.mts",
66-
"default": "./dist/dom/index.mjs"
65+
"types": "./dist/runtime/dom/index.d.mts",
66+
"default": "./dist/runtime/dom/index.mjs"
6767
},
6868
"require": {
69-
"types": "./dist/dom/index.d.ts",
70-
"default": "./dist/dom/index.js"
69+
"types": "./dist/runtime/dom/index.d.ts",
70+
"default": "./dist/runtime/dom/index.js"
7171
}
7272
},
7373
"./types": {
7474
"import": {
75-
"types": "./dist/types/index.d.mts"
75+
"types": "./dist/types/index.d.mts",
76+
"default": "./dist/types/index.mjs"
7677
},
7778
"require": {
78-
"types": "./dist/types/index.d.ts"
79+
"types": "./dist/types/index.d.ts",
80+
"default": "./dist/types/index.js"
7981
}
8082
},
8183
"./package.json": "./package.json"
8284
},
83-
"main": "./dist/index.js",
8485
"files": [
8586
"dist",
8687
"scripts",
@@ -135,11 +136,10 @@
135136
"types"
136137
],
137138
"scripts": {
138-
"build": "tsup",
139+
"build": "tsdown",
139140
"postbuild": "node ../../scripts/subpath-workaround.mjs shared",
140-
"build:declarations": "tsc -p tsconfig.declarations.json",
141141
"clean": "rimraf ./dist",
142-
"dev": "tsup --watch",
142+
"dev": "tsdown --watch src",
143143
"dev:publish": "pnpm dev -- --env.publish",
144144
"format": "node ../../scripts/format-package.mjs",
145145
"format:check": "node ../../scripts/format-package.mjs --check",
@@ -153,7 +153,7 @@
153153
"test:coverage": "vitest --collectCoverage && open coverage/lcov-report/index.html"
154154
},
155155
"dependencies": {
156-
"@clerk/types": "workspace:^",
156+
"csstype": "3.1.3",
157157
"dequal": "2.0.3",
158158
"glob-to-regexp": "0.4.1",
159159
"js-cookie": "3.0.5",
@@ -166,7 +166,7 @@
166166
"@types/glob-to-regexp": "0.4.4",
167167
"@types/js-cookie": "3.0.6",
168168
"cross-fetch": "^4.1.0",
169-
"esbuild": "0.25.0"
169+
"rolldown": "catalog:repo"
170170
},
171171
"peerDependencies": {
172172
"react": "catalog:peer-react",

0 commit comments

Comments
 (0)