-
Notifications
You must be signed in to change notification settings - Fork 460
fix(shared, nextjs): Support importing @clerk/shared in @clerk/backend #1769
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
Changes from all commits
8a1a2fc
68d06a7
1b1dadb
4c4ae65
8f52000
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,5 @@ | ||
| --- | ||
| '@clerk/shared': minor | ||
| --- | ||
|
|
||
| Introduce `getClerkJsMajorVersionOrTag()`, `getScriptUrl()`, `callWithRetry()` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@clerk/backend': minor | ||
| --- | ||
|
|
||
| Replace utilities with @clerk/shared exports |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| export {}; | ||
|
|
||
| declare global { | ||
| const PACKAGE_NAME: string; | ||
| const PACKAGE_VERSION: string; | ||
| const __DEV__: boolean; | ||
| } | ||
|
|
||
| export {}; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| export { | ||
| addClerkPrefix, | ||
| callWithRetry, | ||
| getClerkJsMajorVersionOrTag, | ||
| getScriptUrl, | ||
| isDevelopmentFromApiKey, | ||
| isProductionFromApiKey, | ||
| parsePublishableKey, | ||
| } from '@clerk/shared'; | ||
|
|
||
| import { buildErrorThrower } from '@clerk/shared'; | ||
| // TODO: replace packageName with `${PACKAGE_NAME}@${PACKAGE_VERSION}` from tsup.config.ts | ||
| export const errorThrower = buildErrorThrower({ packageName: '@clerk/backend' }); | ||
|
Contributor
Author
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. I will fix this in another PR that will update how we build and run tests in backend package (currently tsup is not used in tests) |
||
|
|
||
| import { createDevOrStagingUrlCache } from '@clerk/shared'; | ||
| export const { isDevOrStagingUrl } = createDevOrStagingUrlCache(); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ export function isLegacyFrontendApiKey(key: string) { | |
| } | ||
|
|
||
| export function createDevOrStagingUrlCache() { | ||
| // TODO: Check if we can merge it with `./instance.ts#isStaging()` | ||
| const DEV_OR_STAGING_SUFFIXES = [ | ||
|
Contributor
Author
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. I will cater this in another iteration where we will evaluate the exports of the |
||
| '.lcl.dev', | ||
| '.stg.dev', | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.