diff --git a/.changeset/wise-scissors-know.md b/.changeset/wise-scissors-know.md new file mode 100644 index 00000000000..095f4598b3a --- /dev/null +++ b/.changeset/wise-scissors-know.md @@ -0,0 +1,5 @@ +--- +'@clerk/nextjs': major +--- + +Use `NEXT_PUBLIC_CLERK_JS` instead of `NEXT_PUBLIC_CLERK_JS_URL` to pin a specific @clerk/clerk-js version. diff --git a/.github/workflows/preview.retheme.yml b/.github/workflows/preview.retheme.yml index 9125086553d..a443321a05c 100644 --- a/.github/workflows/preview.retheme.yml +++ b/.github/workflows/preview.retheme.yml @@ -58,7 +58,7 @@ jobs: cd $FULL_TMP_FOLDER vercel build --yes --prod env: - NEXT_PUBLIC_CLERK_JS: /clerk-js/clerk.browser.js + NEXT_PUBLIC_CLERK_JS_URL: /clerk-js/clerk.browser.js - name: Deploy to Vercel (prebuilt) id: vercel-deploy diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index d2fc29d44e9..29fe4e11d05 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -82,7 +82,7 @@ jobs: cd $FULL_TMP_FOLDER vercel build --yes env: - NEXT_PUBLIC_CLERK_JS: /clerk-js/clerk.browser.js + NEXT_PUBLIC_CLERK_JS_URL: /clerk-js/clerk.browser.js - name: Deploy to Vercel (prebuilt) id: vercel-deploy diff --git a/packages/nextjs/src/server/constants.ts b/packages/nextjs/src/server/constants.ts index 3b6603c107d..bc45c5d2a3e 100644 --- a/packages/nextjs/src/server/constants.ts +++ b/packages/nextjs/src/server/constants.ts @@ -2,7 +2,7 @@ import { apiUrlFromPublishableKey } from '@clerk/shared/apiUrlFromPublishableKey import { isTruthy } from '@clerk/shared/underscore'; export const CLERK_JS_VERSION = process.env.NEXT_PUBLIC_CLERK_JS_VERSION || ''; -export const CLERK_JS_URL = process.env.NEXT_PUBLIC_CLERK_JS || ''; +export const CLERK_JS_URL = process.env.NEXT_PUBLIC_CLERK_JS_URL || ''; export const API_VERSION = process.env.CLERK_API_VERSION || 'v1'; export const SECRET_KEY = process.env.CLERK_SECRET_KEY || ''; export const PUBLISHABLE_KEY = process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY || ''; diff --git a/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts b/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts index fcd73e95408..54d06727102 100644 --- a/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts +++ b/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts @@ -8,7 +8,7 @@ export const mergeNextClerkPropsWithEnv = (props: Omit