Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: clerk/javascript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @clerk/themes@2.2.20
Choose a base ref
...
head repository: clerk/javascript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @clerk/themes@2.2.21
Choose a head ref

Commits on Feb 27, 2025

  1. Copy the full SHA
    d3ce940 View commit details
  2. Copy the full SHA
    ce91059 View commit details
  3. Copy the full SHA
    085af45 View commit details
  4. Copy the full SHA
    4d5cc39 View commit details
  5. fix(clerk-js): Issue with scroll locking on modals (#5244)

    Co-authored-by: panteliselef <panteliselef@outlook.com>
    octoper and panteliselef authored Feb 27, 2025
    Copy the full SHA
    e7ff37f View commit details

Commits on Feb 28, 2025

  1. ci(repo): Version packages (#5247)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    clerk-cookie and github-actions[bot] authored Feb 28, 2025
    Copy the full SHA
    004537a View commit details
  2. fix(clerk-js): Remove setActive() call from signOut() (#5171)

    Co-authored-by: panteliselef <panteliselef@outlook.com>
    brkalow and panteliselef authored Feb 28, 2025
    Copy the full SHA
    6f20f76 View commit details

Commits on Mar 1, 2025

  1. fix(clerk-react): Enhance RedirectToSignIn session check for compatib…

    …ility with older clerk-js versions (#5261)
    
    Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
    nikosdouvlis and anagstef authored Mar 1, 2025
    Copy the full SHA
    3d43648 View commit details
  2. ci(repo): Version packages (#5259)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    clerk-cookie and github-actions[bot] authored Mar 1, 2025
    Copy the full SHA
    f8b32a1 View commit details

Commits on Mar 2, 2025

  1. chore(backend): Update dependency msw to v2.7.3 (#5265)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 2, 2025
    Copy the full SHA
    7b7170d View commit details
  2. chore(repo): Update linting & formatting (#5268)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 2, 2025
    Copy the full SHA
    ce24226 View commit details

Commits on Mar 3, 2025

  1. chore(clerk-js): Update [DEV] minor & patch dependencies to ^1.2.6 (#…

    …5266)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 3, 2025
    Copy the full SHA
    abee332 View commit details
  2. chore(tanstack-start): Update [DEV] minor & patch dependencies (#5270)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 3, 2025
    Copy the full SHA
    dc9c1e5 View commit details

Commits on Mar 4, 2025

  1. fix(tanstack-start): Update dependency vinxi to ^0.5.3 (#5271)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: panteliselef <panteliselef@outlook.com>
    renovate[bot] and panteliselef authored Mar 4, 2025
    Copy the full SHA
    9aea45d View commit details
  2. chore(repo): Update Dependencies for Clerk Monorepo to ^22.13.5 (#5267)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: panteliselef <panteliselef@outlook.com>
    renovate[bot] and panteliselef authored Mar 4, 2025
    Copy the full SHA
    94b535d View commit details
  3. fix(localizations): Update waitlist.start values for nl-NL (#5272)

    Co-authored-by: panteliselef <panteliselef@outlook.com>
    MaartenKoller and panteliselef authored Mar 4, 2025
    Copy the full SHA
    79169b1 View commit details
  4. feat(localizations): Introduce es-UY localization (#5165)

    Co-authored-by: panteliselef <panteliselef@outlook.com>
    maramal and panteliselef authored Mar 4, 2025
    Copy the full SHA
    ae53f31 View commit details
  5. feat(localizations): Update all Polish (pl-PL) localization strings (#…

    …5096)
    
    Co-authored-by: panteliselef <panteliselef@outlook.com>
    marceleq27 and panteliselef authored Mar 4, 2025
    Copy the full SHA
    f183181 View commit details
  6. Copy the full SHA
    29a44b0 View commit details
  7. fix(localizations): Improve translation of "Update profile" in es-ES (

    #5208)
    
    Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
    Co-authored-by: panteliselef <panteliselef@outlook.com>
    3 people authored Mar 4, 2025
    Copy the full SHA
    02defed View commit details
  8. Copy the full SHA
    99f8a1c View commit details
  9. Copy the full SHA
    a3df73e View commit details
  10. Copy the full SHA
    714be83 View commit details
  11. chore(astro): Update dependency astro to ^5.3.1 (#5264)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: panteliselef <panteliselef@outlook.com>
    renovate[bot] and panteliselef authored Mar 4, 2025
    Copy the full SHA
    1b19f06 View commit details
  12. chore(backend): Added types to webhook json for waitlist entry (#5148)

    Co-authored-by: panteliselef <panteliselef@outlook.com>
    mackenzienolan and panteliselef authored Mar 4, 2025
    Copy the full SHA
    4fa5e27 View commit details
  13. Copy the full SHA
    9fad299 View commit details
  14. fix(backend): Remove Authorization header when secretKey is not r…

    …equired (#5252)
    
    Co-authored-by: Bryce Kalow <bryce@clerk.dev>
    panteliselef and brkalow authored Mar 4, 2025
    Copy the full SHA
    4d7761a View commit details
  15. Copy the full SHA
    e05f275 View commit details
  16. Copy the full SHA
    cb7de89 View commit details
  17. ci(repo): Version packages (#5276)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    clerk-cookie and github-actions[bot] authored Mar 4, 2025
    Copy the full SHA
    b014634 View commit details
  18. Copy the full SHA
    aefaf48 View commit details

Commits on Mar 6, 2025

  1. Copy the full SHA
    67f1743 View commit details
  2. ci(repo): Version packages (#5282)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    clerk-cookie and github-actions[bot] authored Mar 6, 2025
    Copy the full SHA
    dc5078f View commit details
  3. Copy the full SHA
    2a66c16 View commit details
  4. Copy the full SHA
    94ed9a8 View commit details
  5. fix(nextjs): replace crypto-js with crypto-es, precompile and inline (#…

    …5024)
    
    Co-authored-by: Jacek <jacek@clerk.dev>
    brkalow and jacekradko authored Mar 6, 2025
    Copy the full SHA
    a83f614 View commit details

Commits on Mar 7, 2025

  1. Copy the full SHA
    8b5645b View commit details
  2. feat(clerk-js,types): Do not require current password if Reverifactio…

    …n enabled (#5284)
    
    Co-authored-by: panteliselef <panteliselef@outlook.com>
    Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
    3 people authored Mar 7, 2025
    Copy the full SHA
    7ec95a7 View commit details
  3. Copy the full SHA
    593356c View commit details
  4. Copy the full SHA
    1739658 View commit details
  5. Copy the full SHA
    2400ca6 View commit details
  6. Copy the full SHA
    24e97be View commit details
  7. Copy the full SHA
    8182f67 View commit details
  8. fix(localizations): Update Turkish translations and remove English an…

    …d Portuguese phrases (#5257)
    
    Co-authored-by: Tom Milewski <me@tm.codes>
    kaandok and tmilewski authored Mar 7, 2025
    Copy the full SHA
    1427c92 View commit details

Commits on Mar 10, 2025

  1. chore(astro): Update dependency astro to ^5.4.2 (#5306)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 10, 2025
    Copy the full SHA
    f88959f View commit details
  2. Copy the full SHA
    b070281 View commit details
  3. chore(repo): Update common TypeScript types (#5308)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: panteliselef <panteliselef@outlook.com>
    renovate[bot] and panteliselef authored Mar 10, 2025
    Copy the full SHA
    8721872 View commit details
  4. chore(repo): Update linting & formatting (#5309)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 10, 2025
    Copy the full SHA
    bc73dce View commit details
  5. Copy the full SHA
    f121c03 View commit details
  6. Copy the full SHA
    657af33 View commit details
Showing with 7,136 additions and 2,864 deletions.
  1. +1 −1 .github/workflows/ci.yml
  2. +2 −5 .github/workflows/release-canary.yml
  3. +2 −2 .github/workflows/release.yml
  4. +2 −1 .gitignore
  5. +1 −1 .lintstagedrc.json
  6. +29 −0 .typedoc/custom-plugin.mjs
  7. +261 −0 .typedoc/custom-theme.mjs
  8. +9 −0 .typedoc/tsconfig.json
  9. +8 −1 integration/playwright.config.ts
  10. +3 −0 integration/scripts/proxyServer.ts
  11. +1 −0 integration/templates/next-app-router/src/app/page.tsx
  12. +8 −1 integration/templates/next-app-router/src/app/protected/page.tsx
  13. +2 −0 integration/templates/react-vite/src/App.tsx
  14. +3 −1 integration/templates/react-vite/src/protected/index.tsx
  15. +2 −2 integration/tests/{sessions → localhost}/localhost-different-port-different-instance.test.ts
  16. +2 −2 integration/tests/{sessions → localhost}/localhost-different-port-same-instance.test.ts
  17. +2 −2 integration/tests/{sessions → localhost}/localhost-switch-instance.test.ts
  18. +1 −1 integration/tests/next-build.test.ts
  19. +11 −11 integration/tests/sessions/root-subdomain-prod-instances.test.ts
  20. +22 −12 integration/tests/sign-out-smoke.test.ts
  21. +12 −10 package.json
  22. +27 −0 packages/agent-toolkit/CHANGELOG.md
  23. +112 −18 packages/agent-toolkit/README.md
  24. +21 −9 packages/agent-toolkit/package.json
  25. +2 −2 packages/agent-toolkit/src/ai-sdk/adapter.ts
  26. +15 −13 packages/agent-toolkit/src/ai-sdk/index.ts
  27. +1 −1 packages/agent-toolkit/src/langchain/adapter.ts
  28. +8 −10 packages/agent-toolkit/src/langchain/index.ts
  29. +26 −8 packages/agent-toolkit/src/lib/clerk-tool.ts
  30. +5 −3 packages/agent-toolkit/src/lib/constants.ts
  31. +27 −13 packages/agent-toolkit/src/lib/inject-session-claims.ts
  32. +20 −2 packages/agent-toolkit/src/lib/tools/index.ts
  33. +71 −0 packages/agent-toolkit/src/lib/tools/invitations.ts
  34. +419 −0 packages/agent-toolkit/src/lib/tools/organizations.ts
  35. +0 −52 packages/agent-toolkit/src/lib/tools/user-tools.ts
  36. +142 −0 packages/agent-toolkit/src/lib/tools/users.ts
  37. +24 −15 packages/agent-toolkit/src/lib/types.ts
  38. +39 −2 packages/agent-toolkit/src/lib/utils.ts
  39. +103 −0 packages/agent-toolkit/src/lib/utilts.test.ts
  40. +18 −0 packages/agent-toolkit/src/modelcontextprotocol/adapter.ts
  41. +21 −0 packages/agent-toolkit/src/modelcontextprotocol/index.ts
  42. +60 −0 packages/agent-toolkit/src/modelcontextprotocol/local-server.ts
  43. +6 −1 packages/agent-toolkit/tsup.config.ts
  44. +23 −0 packages/astro/CHANGELOG.md
  45. +2 −2 packages/astro/package.json
  46. +33 −0 packages/backend/CHANGELOG.md
  47. +2 −2 packages/backend/package.json
  48. +1 −1 packages/backend/src/api/endpoints/OrganizationApi.ts
  49. +5 −1 packages/backend/src/api/request.ts
  50. +9 −1 packages/backend/src/api/resources/Invitation.ts
  51. +12 −0 packages/backend/src/api/resources/JSON.ts
  52. +9 −1 packages/backend/src/api/resources/Organization.ts
  53. +9 −1 packages/backend/src/api/resources/OrganizationInvitation.ts
  54. +9 −1 packages/backend/src/api/resources/OrganizationMembership.ts
  55. +5 −1 packages/backend/src/api/resources/Webhooks.ts
  56. +1 −0 packages/backend/src/api/resources/index.ts
  57. +3 −0 packages/backend/src/index.ts
  58. +40 −0 packages/chrome-extension/CHANGELOG.md
  59. +1 −1 packages/chrome-extension/package.json
  60. +63 −0 packages/clerk-js/CHANGELOG.md
  61. +2 −2 packages/clerk-js/bundlewatch.config.json
  62. +3 −3 packages/clerk-js/package.json
  63. +8 −0 packages/clerk-js/rspack.config.js
  64. +10 −24 packages/clerk-js/src/core/__tests__/clerk.test.ts
  65. +1 −8 packages/clerk-js/src/core/auth/AuthCookieService.ts
  66. +14 −0 packages/clerk-js/src/core/auth/safeLock.ts
  67. +79 −52 packages/clerk-js/src/core/clerk.ts
  68. +1 −0 packages/clerk-js/src/core/constants.ts
  69. +3 −0 packages/clerk-js/src/core/resources/AuthConfig.ts
  70. +65 −5 packages/clerk-js/src/core/resources/Session.ts
  71. +14 −2 packages/clerk-js/src/core/resources/__tests__/Environment.test.ts
  72. +132 −130 packages/clerk-js/src/core/resources/__tests__/__snapshots__/Environment.test.ts.snap
  73. +1 −1 packages/clerk-js/src/global.d.ts
  74. +2 −2 packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganization.tsx
  75. +2 −2 packages/clerk-js/src/ui/components/GoogleOneTap/one-tap-start.tsx
  76. +2 −2 packages/clerk-js/src/ui/components/ImpersonationFab/ImpersonationFab.tsx
  77. +2 −2 packages/clerk-js/src/ui/components/KeylessPrompt/index.tsx
  78. +2 −2 packages/clerk-js/src/ui/components/OrganizationList/OrganizationList.tsx
  79. +2 −2 packages/clerk-js/src/ui/components/SignIn/ResetPassword.tsx
  80. +2 −2 packages/clerk-js/src/ui/components/SignIn/ResetPasswordSuccess.tsx
  81. +26 −12 packages/clerk-js/src/ui/components/SignIn/SignIn.tsx
  82. +2 −2 packages/clerk-js/src/ui/components/SignIn/SignInAccountSwitcher.tsx
  83. +2 −2 packages/clerk-js/src/ui/components/SignIn/SignInFactorOne.tsx
  84. +2 −2 packages/clerk-js/src/ui/components/SignIn/SignInFactorTwo.tsx
  85. +5 −3 packages/clerk-js/src/ui/components/SignIn/SignInStart.tsx
  86. +53 −0 packages/clerk-js/src/ui/components/SignIn/__tests__/SignInStart.test.tsx
  87. +3 −2 packages/clerk-js/src/ui/components/SignIn/handleCombinedFlowTransfer.ts
  88. +22 −0 packages/clerk-js/src/ui/components/SignIn/lazy-sign-up.ts
  89. +2 −0 packages/clerk-js/src/ui/components/SignUp/SignUp.tsx
  90. +2 −2 packages/clerk-js/src/ui/components/SignUp/SignUpContinue.tsx
  91. +2 −12 packages/clerk-js/src/ui/components/SignUp/SignUpStart.tsx
  92. +9 −7 packages/clerk-js/src/ui/components/UserProfile/PasswordForm.tsx
  93. +1 −1 packages/clerk-js/src/ui/components/UserProfile/UserProfileSection.tsx
  94. +43 −1 packages/clerk-js/src/ui/components/UserProfile/__tests__/PasswordSection.test.tsx
  95. +6 −3 packages/clerk-js/src/ui/components/UserVerification/AlternativeMethods.tsx
  96. +72 −0 packages/clerk-js/src/ui/components/UserVerification/UVFactorOnePasskeysCard.tsx
  97. +1 −0 packages/clerk-js/src/ui/components/UserVerification/UVFactorOnePhoneCodeCard.tsx
  98. +2 −0 packages/clerk-js/src/ui/components/UserVerification/UVFactorTwoCodeForm.tsx
  99. +0 −1 packages/clerk-js/src/ui/components/UserVerification/UVFactorTwoPhoneCodeCard.tsx
  100. +15 −5 packages/clerk-js/src/ui/components/UserVerification/UserVerificationFactorOne.tsx
  101. +19 −5 packages/clerk-js/src/ui/components/UserVerification/UserVerificationFactorTwo.tsx
  102. +1 −0 packages/clerk-js/src/ui/components/UserVerification/UserVerificationFactorTwoTOTP.tsx
  103. +75 −1 packages/clerk-js/src/ui/components/UserVerification/__tests__/UVFactorOne.test.tsx
  104. +82 −2 packages/clerk-js/src/ui/components/UserVerification/__tests__/UVFactorTwo.test.tsx
  105. +71 −0 packages/clerk-js/src/ui/components/UserVerification/useReverificationAlternativeStrategies.ts
  106. +1 −1 packages/clerk-js/src/ui/components/Waitlist/WaitlistForm.tsx
  107. +2 −1 packages/clerk-js/src/ui/contexts/components/SignIn.ts
  108. +49 −43 packages/clerk-js/src/ui/elements/Modal.tsx
  109. +2 −1 packages/clerk-js/src/ui/hooks/useFetch.ts
  110. +85 −0 packages/clerk-js/src/ui/hooks/useScrollLock.ts
  111. +4 −1 packages/clerk-js/src/ui/utils/test/fixtureHelpers.ts
  112. +25 −4 packages/clerk-js/src/utils/beforeUnloadTracker.ts
  113. +0 −36 packages/clerk-js/src/utils/offlineScheduler.ts
  114. +6 −0 packages/dev-cli/CHANGELOG.md
  115. +1 −1 packages/dev-cli/package.json
  116. +1 −1 packages/dev-cli/src/commands/setup.js
  117. +16 −0 packages/elements/CHANGELOG.md
  118. +1 −1 packages/elements/examples/nextjs/package.json
  119. +1 −1 packages/elements/package.json
  120. +8 −0 packages/expo-passkeys/CHANGELOG.md
  121. +1 −1 packages/expo-passkeys/package.json
  122. +45 −0 packages/expo/CHANGELOG.md
  123. +1 −1 packages/expo/package.json
  124. +7 −1 packages/expo/src/cache/dummy-data/environment-resource.ts
  125. +23 −0 packages/express/CHANGELOG.md
  126. +1 −1 packages/express/package.json
  127. +23 −0 packages/fastify/CHANGELOG.md
  128. +1 −1 packages/fastify/package.json
  129. +38 −0 packages/localizations/CHANGELOG.md
  130. +3 −2 packages/localizations/package.json
  131. +1 −0 packages/localizations/src/ar-SA.ts
  132. +1 −0 packages/localizations/src/be-BY.ts
  133. +1 −0 packages/localizations/src/bg-BG.ts
  134. +2 −0 packages/localizations/src/ca-ES.ts
  135. +1 −0 packages/localizations/src/cs-CZ.ts
  136. +1 −0 packages/localizations/src/da-DK.ts
  137. +1 −0 packages/localizations/src/de-DE.ts
  138. +1 −0 packages/localizations/src/el-GR.ts
  139. +2 −0 packages/localizations/src/en-GB.ts
  140. +8 −1 packages/localizations/src/en-US.ts
  141. +2 −1 packages/localizations/src/es-ES.ts
  142. +1 −0 packages/localizations/src/es-MX.ts
  143. +940 −0 packages/localizations/src/es-UY.ts
  144. +1 −0 packages/localizations/src/fi-FI.ts
  145. +1 −0 packages/localizations/src/fr-FR.ts
  146. +1 −0 packages/localizations/src/he-IL.ts
  147. +2 −0 packages/localizations/src/hr-HR.ts
  148. +1 −0 packages/localizations/src/hu-HU.ts
  149. +2 −0 packages/localizations/src/id-ID.ts
  150. +1 −0 packages/localizations/src/index.ts
  151. +1 −0 packages/localizations/src/is-IS.ts
  152. +1 −0 packages/localizations/src/it-IT.ts
  153. +1 −0 packages/localizations/src/ja-JP.ts
  154. +1 −0 packages/localizations/src/ko-KR.ts
  155. +1 −0 packages/localizations/src/mn-MN.ts
  156. +1 −0 packages/localizations/src/nb-NO.ts
  157. +2 −0 packages/localizations/src/nl-BE.ts
  158. +3 −2 packages/localizations/src/nl-NL.ts
  159. +154 −147 packages/localizations/src/pl-PL.ts
  160. +1 −0 packages/localizations/src/pt-BR.ts
  161. +1 −0 packages/localizations/src/pt-PT.ts
  162. +1 −0 packages/localizations/src/ro-RO.ts
  163. +1 −0 packages/localizations/src/ru-RU.ts
  164. +1 −0 packages/localizations/src/sk-SK.ts
  165. +1 −0 packages/localizations/src/sr-RS.ts
  166. +7 −5 packages/localizations/src/sv-SE.ts
  167. +1 −0 packages/localizations/src/th-TH.ts
  168. +91 −89 packages/localizations/src/tr-TR.ts
  169. +1 −0 packages/localizations/src/uk-UA.ts
  170. +1 −0 packages/localizations/src/vi-VN.ts
  171. +1 −0 packages/localizations/src/zh-CN.ts
  172. +8 −6 packages/localizations/src/zh-TW.ts
  173. +41 −0 packages/nextjs/CHANGELOG.md
  174. +2 −3 packages/nextjs/package.json
  175. +19 −6 packages/nextjs/src/app-router/client/ClerkProvider.tsx
  176. +3 −3 packages/nextjs/src/app-router/keyless-actions.ts
  177. +7 −1 packages/nextjs/src/global.d.ts
  178. +2 −2 packages/nextjs/src/server/__tests__/createGetAuth.test.ts
  179. +2 −2 packages/nextjs/src/server/clerkMiddleware.ts
  180. +2 −0 packages/nextjs/src/server/index.ts
  181. +15 −10 packages/nextjs/src/server/keyless.ts
  182. +4 −6 packages/nextjs/src/server/utils.ts
  183. +1 −0 packages/nextjs/src/utils/router-telemetry.ts
  184. +7 −0 packages/nextjs/src/vendor/README.md
  185. +5 −0 packages/nextjs/src/vendor/crypto-es.js
  186. +30 −1 packages/nextjs/tsup.config.ts
  187. +38 −0 packages/nuxt/CHANGELOG.md
  188. +4 −4 packages/nuxt/package.json
  189. +16 −0 packages/nuxt/src/module.ts
  190. +0 −7 packages/nuxt/src/runtime/server/clerkMiddleware.ts
  191. +33 −0 packages/react-router/CHANGELOG.md
  192. +1 −1 packages/react-router/package.json
  193. +16 −0 packages/react/CHANGELOG.md
  194. +1 −1 packages/react/package.json
  195. +5 −1 packages/react/src/components/controlComponents.tsx
  196. +5 −0 packages/react/src/hooks/useAuth.ts
  197. +1 −2 packages/react/src/hooks/useSignIn.ts
  198. +1 −2 packages/react/src/hooks/useSignUp.ts
  199. +8 −7 packages/react/src/types.ts
  200. +1 −1 packages/react/typedoc.json
  201. +33 −0 packages/remix/CHANGELOG.md
  202. +1 −1 packages/remix/package.json
  203. +9 −0 packages/shared/CHANGELOG.md
  204. +1 −1 packages/shared/package.json
  205. +8 −8 packages/shared/src/authorization.ts
  206. +5 −1 packages/shared/src/error.ts
  207. +11 −3 packages/shared/src/react/hooks/createContextAndHook.ts
  208. +5 −5 packages/shared/src/react/hooks/useClerk.ts
  209. +6 −0 packages/shared/src/react/hooks/useDeepEqualMemo.ts
  210. +145 −49 packages/shared/src/react/hooks/useOrganization.tsx
  211. +28 −17 packages/shared/src/react/hooks/useReverification.ts
  212. +3 −0 packages/shared/src/react/hooks/useSafeLayoutEffect.tsx
  213. +4 −8 packages/shared/src/react/hooks/useUser.ts
  214. +11 −5 packages/shared/src/react/types.ts
  215. +1 −1 packages/shared/typedoc.json
  216. +33 −0 packages/tanstack-start/CHANGELOG.md
  217. +5 −5 packages/tanstack-start/package.json
  218. +23 −0 packages/testing/CHANGELOG.md
  219. +1 −1 packages/testing/package.json
  220. +7 −0 packages/themes/CHANGELOG.md
  221. +1 −1 packages/themes/package.json
  222. +16 −0 packages/types/CHANGELOG.md
  223. +1 −1 packages/types/package.json
  224. +13 −1 packages/types/src/api.ts
  225. +4 −0 packages/types/src/authConfig.ts
  226. +62 −29 packages/types/src/clerk.ts
  227. +12 −15 packages/types/src/hooks.ts
  228. +1 −0 packages/types/src/json.ts
  229. +1 −0 packages/types/src/jwt.ts
  230. +6 −0 packages/types/src/localization.ts
  231. +29 −7 packages/types/src/multiDomain.ts
  232. +6 −0 packages/types/src/oauth.ts
  233. +7 −20 packages/types/src/redirects.ts
  234. +12 −0 packages/types/src/resource.ts
  235. +36 −5 packages/types/src/session.ts
  236. +9 −2 packages/types/src/sessionVerification.ts
  237. +6 −0 packages/types/src/signIn.ts
  238. +6 −0 packages/types/src/signUp.ts
  239. +1 −0 packages/types/src/utils.ts
  240. +4 −0 packages/types/src/web3.ts
  241. +8 −0 packages/vue/CHANGELOG.md
  242. +1 −1 packages/vue/package.json
  243. +1,986 −1,744 pnpm-lock.yaml
  244. +3 −2 scripts/tsconfig.json
  245. +7 −1 turbo.json
  246. +48 −3 typedoc.config.mjs
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test-name: [ 'generic', 'express', 'quickstart', 'ap-flows', 'elements', 'sessions', 'astro', 'expo-web', 'tanstack-start', 'tanstack-router', 'vue', 'nuxt', 'react-router']
test-name: [ 'generic', 'express', 'quickstart', 'ap-flows', 'elements', 'localhost', 'sessions', 'astro', 'expo-web', 'tanstack-start', 'tanstack-router', 'vue', 'nuxt', 'react-router']
test-project: ['chrome']
include:
- test-name: 'nextjs'
7 changes: 2 additions & 5 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
@@ -62,16 +62,13 @@ jobs:
const clerkjsVersion = require('./packages/clerk-js/package.json').version;
const nextjsVersion = require('./packages/nextjs/package.json').version;
if (clerkjsVersion.includes('canary')) {
console.log('clerk-js changed, will notify clerk/cloudflare-workers');
github.rest.actions.createWorkflowDispatch({
owner: 'clerk',
repo: 'cloudflare-workers',
workflow_id: 'release-canary-clerkjs-proxy.yml',
repo: 'sdk-infra-workers',
workflow_id: 'update-clerkjs.yml',
ref: 'main',
inputs: { version: clerkjsVersion }
})
}
if (nextjsVersion.includes('canary')) {
console.log('clerk/nextjs changed, will notify clerk/accounts');
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -82,8 +82,8 @@ jobs:
github.rest.actions.createWorkflowDispatch({
owner: 'clerk',
repo: 'cloudflare-workers',
workflow_id: 'prepare-prod-clerkjs-proxy-pr.yml',
repo: 'sdk-infra-workers',
workflow_id: 'update-clerkjs.yml',
ref: 'main',
inputs: { version: clerkjsVersion }
})
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -97,4 +97,5 @@ scripts/.env
!scripts/.env.example

# typedoc
.typedoc
.typedoc/docs
.typedoc/docs.json
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*.{mjs,js,jsx,ts,tsx,vue}": ["pnpm eslint --fix", "pnpm prettier --write"],
"*.{mjs,js,jsx,ts,tsx,vue}": ["pnpm prettier --write"],
"*.{json,md,mdx}": ["pnpm prettier --write"]
}
29 changes: 29 additions & 0 deletions .typedoc/custom-plugin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// @ts-check
import { MarkdownRendererEvent } from 'typedoc-plugin-markdown';

/**
* @param {string} str
*/
function toKebabCase(str) {
return str.replace(/((?<=[a-z\d])[A-Z]|(?<=[A-Z\d])[A-Z](?=[a-z]))/g, '-$1').toLowerCase();
}

/**
* @param {import('typedoc-plugin-markdown').MarkdownApplication} app
*/
export function load(app) {
app.renderer.on(MarkdownRendererEvent.BEGIN, output => {
// Do not output README.mdx files
output.urls = output.urls
?.filter(e => !e.url.endsWith('README.mdx'))
.map(e => {
// Convert URLs (by default camelCase) to kebab-case
const kebabUrl = toKebabCase(e.url);

e.url = kebabUrl;
e.model.url = kebabUrl;

return e;
});
});
}
261 changes: 261 additions & 0 deletions .typedoc/custom-theme.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
// @ts-check
import { ReflectionKind } from 'typedoc';
import { MarkdownTheme, MarkdownThemeContext } from 'typedoc-plugin-markdown';

/**
* @param {import('typedoc-plugin-markdown').MarkdownApplication} app
*/
export function load(app) {
app.renderer.defineTheme('clerkTheme', ClerkMarkdownTheme);
}

class ClerkMarkdownTheme extends MarkdownTheme {
/**
* @param {import('typedoc-plugin-markdown').MarkdownPageEvent} page
*/
getRenderContext(page) {
return new ClerkMarkdownThemeContext(this, page, this.application.options);
}
}

/**
* Our custom Clerk theme
* @extends MarkdownThemeContext
*/
class ClerkMarkdownThemeContext extends MarkdownThemeContext {
/**
* @param {MarkdownTheme} theme
* @param {import('typedoc-plugin-markdown').MarkdownPageEvent} page
* @param {MarkdownTheme["application"]["options"]} options
*/
constructor(theme, page, options) {
super(theme, page, options);

const superPartials = this.partials;

this.partials = {
...superPartials,
/**
* Copied from default theme / source code. This hides the return type from the output
* https://github.com/typedoc2md/typedoc-plugin-markdown/blob/179a54c502b318cd4f3951e5e8b90f7f7a4752d8/packages/typedoc-plugin-markdown/src/theme/context/partials/member.signatureReturns.ts
* @param {import('typedoc').SignatureReflection} model
* @param {{ headingLevel: number }} options
*/
signatureReturns: (model, options) => {
const md = [];

/**
* @type any
*/
const modelType = model.type;
/**
* @type {import('typedoc').DeclarationReflection}
*/
const typeDeclaration = modelType?.declaration;

md.push(heading(options.headingLevel, this.i18n.theme_returns()));

if (model.comment?.blockTags.length) {
const tags = model.comment.blockTags
.filter(tag => tag.tag === '@returns')
.map(tag => this.helpers.getCommentParts(tag.content));
md.push(tags.join('\n\n'));
}

if (typeDeclaration?.signatures) {
typeDeclaration.signatures.forEach(signature => {
md.push(
this.partials.signature(signature, {
headingLevel: options.headingLevel + 1,
nested: true,
}),
);
});
}

if (typeDeclaration?.children) {
md.push(
this.partials.typeDeclaration(typeDeclaration, {
headingLevel: options.headingLevel,
}),
);
}

return md.join('\n\n');
},
/**
* Copied from default theme / source code. This hides the "Type parameters" section and the signature title from the output
* https://github.com/typedoc2md/typedoc-plugin-markdown/blob/179a54c502b318cd4f3951e5e8b90f7f7a4752d8/packages/typedoc-plugin-markdown/src/theme/context/partials/member.signature.ts
* @param {import('typedoc').SignatureReflection} model
* @param {{ headingLevel: number, nested?: boolean, accessor?: string, multipleSignatures?: boolean }} options
*/
signature: (model, options) => {
const md = [];

if (!options.nested && model.sources && !this.options.getValue('disableSources')) {
md.push(this.partials.sources(model));
}

let modelComments = options.multipleSignatures ? model.comment : model.comment || model.parent?.comment;

if (modelComments && model.parent?.comment?.summary && !options.multipleSignatures) {
modelComments = Object.assign(modelComments, {
summary: model.parent.comment.summary,
});
}

if (modelComments && model.parent?.comment?.blockTags) {
modelComments.blockTags = [...(model.parent?.comment?.blockTags || []), ...(model.comment?.blockTags || [])];
}

if (modelComments) {
md.push(
this.partials.comment(modelComments, {
headingLevel: options.headingLevel,
showTags: false,
showSummary: true,
}),
);
}

if (!options.multipleSignatures && model.parent?.documents) {
md.push(
this.partials.documents(model?.parent, {
headingLevel: options.headingLevel,
}),
);
}

if (model.parameters?.length) {
md.push(heading(options.headingLevel, this.internationalization.kindPluralString(ReflectionKind.Parameter)));
if (this.helpers.useTableFormat('parameters')) {
md.push(this.partials.parametersTable(model.parameters));
} else {
md.push(
this.partials.parametersList(model.parameters, {
headingLevel: options.headingLevel,
}),
);
}
}

if (model.type) {
md.push(
this.partials.signatureReturns(model, {
headingLevel: options.headingLevel,
}),
);
}

if (modelComments) {
md.push(
this.partials.comment(modelComments, {
headingLevel: options.headingLevel,
showTags: true,
showSummary: false,
}),
);
}

md.push(this.partials.inheritance(model, { headingLevel: options.headingLevel }));

return md.join('\n\n');
},
/**
* Copied from default theme / source code. This hides the "Type parameters" section from the output
* https://github.com/typedoc2md/typedoc-plugin-markdown/blob/179a54c502b318cd4f3951e5e8b90f7f7a4752d8/packages/typedoc-plugin-markdown/src/theme/context/partials/member.memberWithGroups.ts#L58
* @param {import('typedoc').DeclarationReflection} model
* @param {{ headingLevel: number }} options
*/
memberWithGroups: (model, options) => {
const md = [];

if (
![ReflectionKind.Module, ReflectionKind.Namespace].includes(model.kind) &&
model.sources &&
!this.options.getValue('disableSources')
) {
md.push(this.partials.sources(model));
}

if (model.comment) {
md.push(
this.partials.comment(model.comment, {
headingLevel: options.headingLevel,
}),
);
}

if (model.typeHierarchy?.next) {
md.push(
this.partials.hierarchy(model.typeHierarchy, {
headingLevel: options.headingLevel,
}),
);
}

if (model.implementedTypes?.length) {
md.push(heading(options.headingLevel, this.i18n.theme_implements()));
md.push(
unorderedList(model.implementedTypes.map(implementedType => this.partials.someType(implementedType))),
);
}

if (model.kind === ReflectionKind.Class && model.categories?.length) {
model.groups
?.filter(group => group.title === this.i18n.kind_plural_constructor())
.forEach(group => {
md.push(heading(options.headingLevel, this.i18n.kind_plural_constructor()));
group.children.forEach(child => {
md.push(
this.partials.constructor(/** @type {import('typedoc').DeclarationReflection} */ (child), {
headingLevel: options.headingLevel + 1,
}),
);
});
});
}

if ('signatures' in model && model.signatures?.length) {
model.signatures.forEach(signature => {
md.push(
this.partials.signature(signature, {
headingLevel: options.headingLevel,
}),
);
});
}

if (model.indexSignatures?.length) {
md.push(heading(options.headingLevel, this.i18n.theme_indexable()));
model.indexSignatures.forEach(indexSignature => {
md.push(this.partials.indexSignature(indexSignature));
});
}

md.push(this.partials.body(model, { headingLevel: options.headingLevel }));

return md.join('\n\n');
},
};
}
}

/**
* Returns a heading in markdown format
* @param {number} level The level of the heading
* @param {string} text The text of the heading
*/
function heading(level, text) {
level = level > 6 ? 6 : level;
return `${[...Array(level)].map(() => '#').join('')} ${text}`;
}

/**
* Create an unordered list from an array of items
* @param {string[]} items
* @returns
*/
function unorderedList(items) {
return items.map(item => `- ${item}`).join('\n');
}
9 changes: 9 additions & 0 deletions .typedoc/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"noEmit": true,
"moduleResolution": "node16",
"module": "Node16"
}
}
9 changes: 8 additions & 1 deletion integration/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -38,7 +38,14 @@ export default defineConfig({
},
{
name: 'chrome',
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
use: {
...devices['Desktop Chrome'],
channel: 'chrome',
launchOptions: {
args: [process.env.DISABLE_WEB_SECURITY ? '--disable-web-security' : ''],
},
},

dependencies: ['setup'],
},
// {
3 changes: 3 additions & 0 deletions integration/scripts/proxyServer.ts
Original file line number Diff line number Diff line change
@@ -19,6 +19,9 @@ export const createProxyServer = (opts: ProxyServerOptions) => {
const createServer: typeof _createServer = usingSSL ? https.createServer.bind(https) : http.createServer.bind(http);

return createServer(opts.ssl, (req, res) => {
console.log(`/n/n/n/n------------------------------------`);
console.log('Proxying request', req.headers.host, req.url);
console.log('Headers', req.headers);
const hostHeader = req.headers.host || '';
if (opts.targets[hostHeader]) {
proxy.web(req, res, { target: opts.targets[hostHeader] });
1 change: 1 addition & 0 deletions integration/templates/next-app-router/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ export default function Home() {
<ul>
<li>
<Link href='/page-protected'>Page Protected</Link>
<Link href='/protected'>Protected</Link>
</li>
</ul>
</main>
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import Link from 'next/link';

export default function Page() {
return <div>Protected</div>;
return (
<>
<div data-testid='protected'>Protected</div>
<Link href='/'>Home</Link>
</>
);
}
Loading