-
Notifications
You must be signed in to change notification settings - Fork 430
refactor(*): nest satellite config under multiDomain key #7658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| "@clerk/shared": minor | ||
| "@clerk/backend": minor | ||
| "@clerk/nextjs": minor | ||
| "@clerk/astro": minor | ||
| "@clerk/react-router": minor | ||
| "@clerk/tanstack-react-start": minor | ||
| "@clerk/clerk-js": minor | ||
| "@clerk/express": minor | ||
| "@clerk/react": minor | ||
| "@clerk/vue": minor | ||
| "@clerk/nuxt": minor | ||
| --- | ||
|
|
||
| Nest satellite configuration under a `multiDomain` key. The top-level `isSatellite`, `domain`, and `satelliteAutoSync` options are replaced by `multiDomain: { isSatellite, domain?, proxyUrl?, autoSync? }`. The `proxyUrl` option remains available at both the top level and inside `multiDomain`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,9 +9,8 @@ const mergeEnvVarsWithParams = (params?: AstroClerkIntegrationParams & { publish | |
| const { | ||
| signInUrl: paramSignIn, | ||
| signUpUrl: paramSignUp, | ||
| isSatellite: paramSatellite, | ||
| multiDomain: paramMultiDomain, | ||
| proxyUrl: paramProxy, | ||
| domain: paramDomain, | ||
| publishableKey: paramPublishableKey, | ||
| telemetry: paramTelemetry, | ||
| clerkJSUrl: paramClerkJSUrl, | ||
|
|
@@ -21,12 +20,19 @@ const mergeEnvVarsWithParams = (params?: AstroClerkIntegrationParams & { publish | |
| ...rest | ||
| } = params || {}; | ||
|
|
||
| const isSatellite = paramMultiDomain?.isSatellite || import.meta.env.PUBLIC_CLERK_IS_SATELLITE; | ||
| const domain = paramMultiDomain?.domain || import.meta.env.PUBLIC_CLERK_DOMAIN; | ||
|
|
||
| return { | ||
| signInUrl: paramSignIn || import.meta.env.PUBLIC_CLERK_SIGN_IN_URL, | ||
| signUpUrl: paramSignUp || import.meta.env.PUBLIC_CLERK_SIGN_UP_URL, | ||
| isSatellite: paramSatellite || import.meta.env.PUBLIC_CLERK_IS_SATELLITE, | ||
| multiDomain: isSatellite | ||
| ? { | ||
| isSatellite: true as const, | ||
| ...(domain ? { domain: domain as string } : {}), | ||
| } | ||
| : paramMultiDomain, | ||
|
Comment on lines
+23
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix boolean/env precedence for Using Proposed fix- const isSatellite = paramMultiDomain?.isSatellite || import.meta.env.PUBLIC_CLERK_IS_SATELLITE;
- const domain = paramMultiDomain?.domain || import.meta.env.PUBLIC_CLERK_DOMAIN;
+ const isSatellite =
+ paramMultiDomain?.isSatellite ?? isTruthy(import.meta.env.PUBLIC_CLERK_IS_SATELLITE);
+ const domain = paramMultiDomain?.domain ?? import.meta.env.PUBLIC_CLERK_DOMAIN;🤖 Prompt for AI Agents |
||
| proxyUrl: paramProxy || import.meta.env.PUBLIC_CLERK_PROXY_URL, | ||
| domain: paramDomain || import.meta.env.PUBLIC_CLERK_DOMAIN, | ||
| publishableKey: paramPublishableKey || import.meta.env.PUBLIC_CLERK_PUBLISHABLE_KEY || '', | ||
| clerkUiUrl: paramClerkUiUrl || import.meta.env.PUBLIC_CLERK_UI_URL, | ||
| clerkJSUrl: paramClerkJSUrl || import.meta.env.PUBLIC_CLERK_JS_URL, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: clerk/javascript
Length of output: 7831
🏁 Script executed:
Repository: clerk/javascript
Length of output: 7141
🏁 Script executed:
Repository: clerk/javascript
Length of output: 343
🏁 Script executed:
# Check the changeset file content to see full description cat .changeset/nest-multidomain-config.mdRepository: clerk/javascript
Length of output: 632
🏁 Script executed:
Repository: clerk/javascript
Length of output: 12265
Correct version bump severity: this is a breaking change requiring MAJOR, not MINOR.
The changeset removes top-level
isSatellite,domain, andsatelliteAutoSyncoptions—they are no longer accepted at the root configuration level and must be moved undermultiDomain. This is an incompatible API change per semver. TheHeadlessBrowserClerkinterface explicitly excludesisSatellite, and the codebase reads values exclusively frommultiDomain.*properties with no backward-compatibility aliases.While
proxyUrlremains available at both levels, the removal of the three other options breaks any existing code using them at the top level. All affected packages should be bumped to MAJOR, not MINOR.🤖 Prompt for AI Agents