-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nextjs): Adjust shared imports to remove edge runtime warnings (#…
…1924) * fix(nextjs): Adjust shared imports to remove runtime warnings on import * fix(clerk-react): Use specific clerk/shared entries * chore(repo): Add changeset
- Loading branch information
Showing
13 changed files
with
35 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@clerk/backend': patch | ||
'@clerk/nextjs': patch | ||
'@clerk/shared': patch | ||
'@clerk/clerk-react': patch | ||
--- | ||
|
||
Update imports of `@clerk/shared` to granular entrypoints. This addresses warnings during a Next.js build that are the result of unsupported APIs being included in the module graph of builds for the edge runtime. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
export { | ||
addClerkPrefix, | ||
callWithRetry, | ||
getClerkJsMajorVersionOrTag, | ||
getScriptUrl, | ||
isDevelopmentFromApiKey, | ||
isProductionFromApiKey, | ||
parsePublishableKey, | ||
} from '@clerk/shared'; | ||
export { addClerkPrefix, getScriptUrl, getClerkJsMajorVersionOrTag } from '@clerk/shared/url'; | ||
export { callWithRetry } from '@clerk/shared/callWithRetry'; | ||
export { isDevelopmentFromApiKey, isProductionFromApiKey, parsePublishableKey } from '@clerk/shared/keys'; | ||
export { deprecated, deprecatedProperty } from '@clerk/shared/deprecated'; | ||
|
||
import { buildErrorThrower } from '@clerk/shared/error'; | ||
// TODO: replace packageName with `${PACKAGE_NAME}@${PACKAGE_VERSION}` from tsup.config.ts | ||
export const errorThrower = buildErrorThrower({ packageName: '@clerk/backend' }); | ||
|
||
import { createDevOrStagingUrlCache } from '@clerk/shared'; | ||
import { createDevOrStagingUrlCache } from '@clerk/shared/keys'; | ||
export const { isDevOrStagingUrl } = createDevOrStagingUrlCache(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { createDevOrStagingUrlCache } from '@clerk/shared'; | ||
import { createDevOrStagingUrlCache } from '@clerk/shared/keys'; | ||
const { isDevOrStagingUrl } = createDevOrStagingUrlCache(); | ||
export { isDevOrStagingUrl }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
export { callWithRetry } from './callWithRetry'; | ||
export * from './createDeferredPromise'; | ||
export { isDevelopmentFromApiKey, isProductionFromApiKey, isStaging } from './instance'; | ||
export { isStaging } from './instance'; | ||
export { noop } from './noop'; | ||
export * from './runtimeEnvironment'; | ||
export * from './runWithExponentialBackOff'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters