-
Notifications
You must be signed in to change notification settings - Fork 206
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(clerk-js): Show custom pages errors when sdks are in dev mode #2802
Conversation
馃 Changeset detectedLatest commit: 2d5436c The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
!snapshot |
Hey @panteliselef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/backend@1.0.1-snapshot.v33c285b --save-exact
npm i @clerk/chrome-extension@1.0.1-snapshot.v33c285b --save-exact
npm i @clerk/clerk-js@5.0.1-snapshot.v33c285b --save-exact
npm i @clerk/clerk-expo@1.0.1-snapshot.v33c285b --save-exact
npm i @clerk/fastify@1.0.1-snapshot.v33c285b --save-exact
npm i gatsby-plugin-clerk@5.0.1-snapshot.v33c285b --save-exact
npm i @clerk/localizations@2.0.1-snapshot.v33c285b --save-exact
npm i @clerk/nextjs@5.0.1-snapshot.v33c285b --save-exact
npm i @clerk/clerk-react@5.0.1-snapshot.v33c285b --save-exact
npm i @clerk/remix@4.0.1-snapshot.v33c285b --save-exact
npm i @clerk/clerk-sdk-node@5.0.1-snapshot.v33c285b --save-exact
npm i @clerk/shared@2.0.1-snapshot.v33c285b --save-exact
npm i @clerk/themes@2.0.1-snapshot.v33c285b --save-exact
npm i @clerk/types@4.0.1-snapshot.v33c285b --save-exact |
packages/remix/src/ssr/utils.ts
Outdated
@@ -123,6 +123,7 @@ export function getResponseClerkState(requestState: RequestState, context: AppLo | |||
__clerkJSVersion: getEnvVariable('CLERK_JS_VERSION', context), | |||
__telemetryDisabled: isTruthy(getEnvVariable('CLERK_TELEMETRY_DISABLED', context)), | |||
__telemetryDebug: isTruthy(getEnvVariable('CLERK_TELEMETRY_DEBUG', context)), | |||
__environment: getEnvVariable('NODE_ENV', context) || getEnvVariable('ENVIRONMENT', context), |
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.
For Remix we should recommend users to add the ENVIRONMENT
env var in their configs.
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.
馃挴 This is awesome! 馃殌
There is no default way to grab the env in remix, so we are skipping it for now.
bee7f58
to
2d5436c
Compare
Description
Details
All of our SDKs consume the production version of
clerk-js
, with this change we acquire more information about the environment each sdk runs on.For this case we want to log warning or errors that we wouldn't want to log if the app was used in it's final production version.
Video example
Screen.Recording.2024-02-15.at.3.17.10.PM.mov
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change