Skip to content
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

fix(backend): Support NextJS 14 #1948

Merged
merged 3 commits into from
Oct 26, 2023
Merged

fix(backend): Support NextJS 14 #1948

merged 3 commits into from
Oct 26, 2023

Conversation

desiprisg
Copy link
Contributor

@desiprisg desiprisg commented Oct 26, 2023

Description

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using npm run dev. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

More information can be found here: https://esbuild.github.io/content-types/#default-interop
and here: #612

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2023

🦋 Changeset detected

Latest commit: daaf845

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@clerk/backend Minor
@clerk/fastify Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch

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

@nikosdouvlis nikosdouvlis changed the title fix(backend): Fix for next 14 fetch bind issue fix(backend): Support NextJS 14 Oct 26, 2023
@nikosdouvlis
Copy link
Member

!snapshot

@nikosdouvlis
Copy link
Member

@desiprisg I have updated the description and changed the fix as per our offline discussion

@tmilewski tmilewski self-requested a review October 26, 2023 21:16
@nikosdouvlis
Copy link
Member

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @nikosdouvlis - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.32.0-snapshot.v6f294e5
@clerk/chrome-extension 0.4.11-snapshot.v6f294e5
@clerk/clerk-js 4.64.0-snapshot.v6f294e5
@clerk/clerk-expo 0.19.13-snapshot.v6f294e5
@clerk/fastify 0.6.18-snapshot.v6f294e5
gatsby-plugin-clerk 4.4.19-snapshot.v6f294e5
@clerk/nextjs 4.25.8-snapshot.v6f294e5
@clerk/remix 3.1.1-snapshot.v6f294e5
@clerk/clerk-sdk-node 4.12.17-snapshot.v6f294e5

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/backend

npm i @clerk/backend@0.32.0-snapshot.v6f294e5 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@0.4.11-snapshot.v6f294e5 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@4.64.0-snapshot.v6f294e5 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@0.19.13-snapshot.v6f294e5 --save-exact

@clerk/fastify

npm i @clerk/fastify@0.6.18-snapshot.v6f294e5 --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@4.4.19-snapshot.v6f294e5 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@4.25.8-snapshot.v6f294e5 --save-exact

@clerk/remix

npm i @clerk/remix@3.1.1-snapshot.v6f294e5 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@4.12.17-snapshot.v6f294e5 --save-exact

Copy link
Member

@anagstef anagstef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@nikosdouvlis nikosdouvlis changed the base branch from main to main-v4 October 26, 2023 21:26
desiprisg and others added 3 commits October 26, 2023 14:27
Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

 More information can be found here: https://esbuild.github.io/content-types/#default-interop
 and here: #612
@nikosdouvlis nikosdouvlis merged commit 0887243 into main-v4 Oct 26, 2023
4 checks passed
@nikosdouvlis nikosdouvlis deleted the fetch_bind_fix branch October 26, 2023 21:28
LekoArts pushed a commit that referenced this pull request Oct 26, 2023
* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

 More information can be found here: https://esbuild.github.io/content-types/#default-interop
 and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
dimkl pushed a commit that referenced this pull request Oct 30, 2023
* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

 More information can be found here: https://esbuild.github.io/content-types/#default-interop
 and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
dimkl pushed a commit that referenced this pull request Oct 30, 2023
* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

 More information can be found here: https://esbuild.github.io/content-types/#default-interop
 and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
octoper pushed a commit that referenced this pull request Oct 31, 2023
* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

 More information can be found here: https://esbuild.github.io/content-types/#default-interop
 and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
dimkl pushed a commit that referenced this pull request Oct 31, 2023
* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

 More information can be found here: https://esbuild.github.io/content-types/#default-interop
 and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
dimkl pushed a commit that referenced this pull request Oct 31, 2023
* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

More information can be found here: https://esbuild.github.io/content-types/#default-interop
and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
github-merge-queue bot pushed a commit that referenced this pull request Oct 31, 2023
* fix(clerk-sdk-node): Fix types of ClerkExpressWithAuth/ClerkExpressRequireAuth args (#1939)

#1938

* fix(backend): Support NextJS 14 (#1948)

* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

More information can be found here: https://esbuild.github.io/content-types/#default-interop
and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>

---------

Co-authored-by: George Desipris <73396808+desiprisg@users.noreply.github.com>
Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
@clerk-cookie
Copy link
Collaborator

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@clerk clerk locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants