diff --git a/.prettierignore b/.prettierignore index aeb45cec851..f469f34fac0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -21,5 +21,6 @@ playground packages/backend/tests/**/*.js packages/clerk-js/src/core/resources/internal.ts packages/clerk-js/src/core/resources/index.ts +packages/shared/src/compiled /**/CHANGELOG.md renovate.json5 diff --git a/package.json b/package.json index 69259d945cb..02f0dfec942 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ }, "devDependencies": { "@actions/core": "^1.11.1", - "@arethetypeswrong/cli": "0.17.4", + "@arethetypeswrong/cli": "0.18.2", "@changesets/cli": "^2.29.4", "@changesets/get-github-info": "^0.6.0", "@clerk/backend": "workspace:*", @@ -126,11 +126,11 @@ "jsonwebtoken": "9.0.2", "lint-staged": "^14.0.1", "pkglab": "0.17.1", - "prettier": "^3.6.2", + "prettier": "^3.8.1", "prettier-plugin-astro": "^0.14.1", "prettier-plugin-packagejson": "^2.5.15", "prettier-plugin-tailwindcss": "^0.6.12", - "publint": "^0.3.12", + "publint": "^0.3.18", "react": "catalog:react", "react-dom": "catalog:react", "rimraf": "6.0.1", diff --git a/packages/clerk-js/src/core/resources/UserSettings.ts b/packages/clerk-js/src/core/resources/UserSettings.ts index 93078997ebc..48a8c85a426 100644 --- a/packages/clerk-js/src/core/resources/UserSettings.ts +++ b/packages/clerk-js/src/core/resources/UserSettings.ts @@ -196,8 +196,8 @@ export class UserSettings extends BaseResource implements UserSettingsResource { get hasValidAuthFactor() { return Boolean( this.attributes?.email_address?.enabled || - this.attributes?.phone_number?.enabled || - (this.attributes.password?.required && this.attributes.username?.required), + this.attributes?.phone_number?.enabled || + (this.attributes.password?.required && this.attributes.username?.required), ); } diff --git a/packages/nextjs/src/app-router/server/keyless-provider.tsx b/packages/nextjs/src/app-router/server/keyless-provider.tsx index fe3c1b9777b..0eb7a87405c 100644 --- a/packages/nextjs/src/app-router/server/keyless-provider.tsx +++ b/packages/nextjs/src/app-router/server/keyless-provider.tsx @@ -43,9 +43,8 @@ export const KeylessProvider = async (props: KeylessProviderProps) => { .then(mod => mod.keyless().getOrCreateKeys()) .catch(() => null); - const { clerkDevelopmentCache, createConfirmationMessage, createKeylessModeMessage } = await import( - '../../server/keyless-log-cache.js' - ); + const { clerkDevelopmentCache, createConfirmationMessage, createKeylessModeMessage } = + await import('../../server/keyless-log-cache.js'); if (!newOrReadKeys) { // When case keyless should run, but keys are not available, then fallback to throwing for missing keys diff --git a/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx b/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx index d41bdc57d78..8b057f0309a 100644 --- a/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx +++ b/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx @@ -26,27 +26,26 @@ type BillingHookConfig { +export interface HookParams extends PaginatedHookConfig< + PagesOrInfiniteOptions & { + /** + * If `true`, a request will be triggered when the hook is mounted. + * + * @default true + */ + enabled?: boolean; + /** + * On `cache` mode, no request will be triggered when the hook is mounted and the data will be fetched from the cache. + * + * @default undefined + * + * @hidden + * + * @experimental + */ + __experimental_mode?: 'cache'; + } +> { /** * Specifies whether to fetch for the current user or Organization. * diff --git a/packages/shared/src/types/localization.ts b/packages/shared/src/types/localization.ts index 5e65b15004e..c21c6d0b094 100644 --- a/packages/shared/src/types/localization.ts +++ b/packages/shared/src/types/localization.ts @@ -62,8 +62,9 @@ type DeepLocalizationWithoutObjects = { * as a starting point. */ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- Needs to be an interface for typedoc to link correctly -export interface LocalizationResource - extends DeepPartial> {} +export interface LocalizationResource extends DeepPartial< + DeepLocalizationWithoutObjects<__internal_LocalizationResource> +> {} export type __internal_LocalizationResource = { locale: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 40d4a12a207..b9bc4e98a20 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,8 +77,8 @@ importers: specifier: ^1.11.1 version: 1.11.1 '@arethetypeswrong/cli': - specifier: 0.17.4 - version: 0.17.4 + specifier: 0.18.2 + version: 0.18.2 '@changesets/cli': specifier: ^2.29.4 version: 2.29.7(@types/node@22.19.0) @@ -242,20 +242,20 @@ importers: specifier: 0.17.1 version: 0.17.1 prettier: - specifier: ^3.6.2 - version: 3.6.2 + specifier: ^3.8.1 + version: 3.8.1 prettier-plugin-astro: specifier: ^0.14.1 version: 0.14.1 prettier-plugin-packagejson: specifier: ^2.5.15 - version: 2.5.19(prettier@3.6.2) + version: 2.5.19(prettier@3.8.1) prettier-plugin-tailwindcss: specifier: ^0.6.12 - version: 0.6.14(prettier-plugin-astro@0.14.1)(prettier@3.6.2) + version: 0.6.14(prettier-plugin-astro@0.14.1)(prettier@3.8.1) publint: - specifier: ^0.3.12 - version: 0.3.15 + specifier: ^0.3.18 + version: 0.3.18 react: specifier: 18.3.1 version: 18.3.1 @@ -279,7 +279,7 @@ importers: version: 1.2.2 tsdown: specifier: catalog:repo - version: 0.15.7(publint@0.3.15)(typescript@5.8.3)(vue-tsc@3.1.4(typescript@5.8.3)) + version: 0.15.7(@arethetypeswrong/core@0.18.2)(publint@0.3.18)(typescript@5.8.3)(vue-tsc@3.1.4(typescript@5.8.3)) tsup: specifier: catalog:repo version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.8.3)(yaml@2.8.3) @@ -1035,7 +1035,7 @@ importers: version: 10.2.5 tsdown: specifier: catalog:repo - version: 0.15.7(publint@0.3.15)(typescript@5.8.3)(vue-tsc@3.1.4(typescript@5.8.3)) + version: 0.15.7(@arethetypeswrong/core@0.18.2)(publint@0.3.18)(typescript@5.8.3)(vue-tsc@3.1.4(typescript@5.8.3)) webpack-merge: specifier: ^5.10.0 version: 5.10.0 @@ -1178,14 +1178,14 @@ packages: '@andrewbranch/untar.js@1.0.3': resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} - '@arethetypeswrong/cli@0.17.4': - resolution: {integrity: sha512-AeiKxtf67XD/NdOqXgBOE5TZWH3EOCt+0GkbUpekOzngc+Q/cRZ5azjWyMxISxxfp0EItgm5NoSld9p7BAA5xQ==} - engines: {node: '>=18'} + '@arethetypeswrong/cli@0.18.2': + resolution: {integrity: sha512-PcFM20JNlevEDKBg4Re29Rtv2xvjvQZzg7ENnrWFSS0PHgdP2njibVFw+dRUhNkPgNfac9iUqO0ohAXqQL4hbw==} + engines: {node: '>=20'} hasBin: true - '@arethetypeswrong/core@0.17.4': - resolution: {integrity: sha512-Izvir8iIoU+X4SKtDAa5kpb+9cpifclzsbA8x/AZY0k0gIfXYQ1fa1B6Epfe6vNA2YfDX8VtrZFgvnXB6aPEoQ==} - engines: {node: '>=18'} + '@arethetypeswrong/core@0.18.2': + resolution: {integrity: sha512-GiwTmBFOU1/+UVNqqCGzFJYfBXEytUkiI+iRZ6Qx7KmUVtLm00sYySkfe203C9QtPG11yOz1ZaMek8dT/xnlgg==} + engines: {node: '>=20'} '@asamuzakjp/css-color@3.2.0': resolution: {integrity: sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==} @@ -4005,8 +4005,8 @@ packages: '@poppinss/exception@1.2.2': resolution: {integrity: sha512-m7bpKCD4QMlFCjA/nKTs23fuvoVFoA83brRKmObCUNmi/9tVu8Ve3w4YQAnJu4q3Tjf5fr685HYIC/IA2zHRSg==} - '@publint/pack@0.1.2': - resolution: {integrity: sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw==} + '@publint/pack@0.1.4': + resolution: {integrity: sha512-HDVTWq3H0uTXiU0eeSQntcVUTPP3GamzeXI41+x7uU9J65JgWQh3qWZHblR1i0npXfFtF+mxBiU2nJH8znxWnQ==} engines: {node: '>=18'} '@quansync/fs@0.1.5': @@ -11896,8 +11896,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.6.2: - resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} engines: {node: '>=14'} hasBin: true @@ -11985,8 +11985,8 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - publint@0.3.15: - resolution: {integrity: sha512-xPbRAPW+vqdiaKy5sVVY0uFAu3LaviaPO3pZ9FaRx59l9+U/RKR1OEbLhkug87cwiVKxPXyB4txsv5cad67u+A==} + publint@0.3.18: + resolution: {integrity: sha512-JRJFeBTrfx4qLwEuGFPk+haJOJN97KnPuK01yj+4k/Wj5BgoOK5uNsivporiqBjk2JDaslg7qJOhGRnpltGeog==} engines: {node: '>=18'} hasBin: true @@ -14793,9 +14793,9 @@ snapshots: '@andrewbranch/untar.js@1.0.3': {} - '@arethetypeswrong/cli@0.17.4': + '@arethetypeswrong/cli@0.18.2': dependencies: - '@arethetypeswrong/core': 0.17.4 + '@arethetypeswrong/core': 0.18.2 chalk: 4.1.2 cli-table3: 0.6.5 commander: 10.0.1 @@ -14803,13 +14803,13 @@ snapshots: marked-terminal: 7.3.0(marked@9.1.6) semver: 7.7.4 - '@arethetypeswrong/core@0.17.4': + '@arethetypeswrong/core@0.18.2': dependencies: '@andrewbranch/untar.js': 1.0.3 '@loaderkit/resolve': 1.0.4 cjs-module-lexer: 1.4.3 fflate: 0.8.2 - lru-cache: 10.4.3 + lru-cache: 11.2.7 semver: 7.7.4 typescript: 5.6.1-rc validate-npm-package-name: 5.0.1 @@ -18524,7 +18524,7 @@ snapshots: '@poppinss/exception@1.2.2': {} - '@publint/pack@0.1.2': {} + '@publint/pack@0.1.4': {} '@quansync/fs@0.1.5': dependencies: @@ -19926,7 +19926,7 @@ snapshots: '@tanstack/router-core': 1.157.16 '@tanstack/router-utils': 1.154.7 '@tanstack/virtual-file-routes': 1.154.7 - prettier: 3.6.2 + prettier: 3.8.1 recast: 0.23.11 source-map: 0.7.6 tsx: 4.20.6 @@ -28464,25 +28464,25 @@ snapshots: prettier-plugin-astro@0.14.1: dependencies: '@astrojs/compiler': 2.13.0 - prettier: 3.6.2 + prettier: 3.8.1 sass-formatter: 0.7.9 - prettier-plugin-packagejson@2.5.19(prettier@3.6.2): + prettier-plugin-packagejson@2.5.19(prettier@3.8.1): dependencies: sort-package-json: 3.4.0 synckit: 0.11.11 optionalDependencies: - prettier: 3.6.2 + prettier: 3.8.1 - prettier-plugin-tailwindcss@0.6.14(prettier-plugin-astro@0.14.1)(prettier@3.6.2): + prettier-plugin-tailwindcss@0.6.14(prettier-plugin-astro@0.14.1)(prettier@3.8.1): dependencies: - prettier: 3.6.2 + prettier: 3.8.1 optionalDependencies: prettier-plugin-astro: 0.14.1 prettier@2.8.8: {} - prettier@3.6.2: {} + prettier@3.8.1: {} pretty-bytes@5.6.0: {} @@ -28562,9 +28562,9 @@ snapshots: proxy-from-env@1.1.0: {} - publint@0.3.15: + publint@0.3.18: dependencies: - '@publint/pack': 0.1.2 + '@publint/pack': 0.1.4 package-manager-detector: 1.6.0 picocolors: 1.1.1 sade: 1.8.1 @@ -30334,7 +30334,7 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tsdown@0.15.7(publint@0.3.15)(typescript@5.8.3)(vue-tsc@3.1.4(typescript@5.8.3)): + tsdown@0.15.7(@arethetypeswrong/core@0.18.2)(publint@0.3.18)(typescript@5.8.3)(vue-tsc@3.1.4(typescript@5.8.3)): dependencies: ansis: 4.2.0 cac: 6.7.14 @@ -30351,7 +30351,8 @@ snapshots: tree-kill: 1.2.2 unconfig: 7.4.0 optionalDependencies: - publint: 0.3.15 + '@arethetypeswrong/core': 0.18.2 + publint: 0.3.18 typescript: 5.8.3 transitivePeerDependencies: - '@ts-macro/tsc'