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

feat(nextjs): Support async headers() #4278

Merged
merged 17 commits into from
Oct 21, 2024

Conversation

jacekradko
Copy link
Member

@jacekradko jacekradko commented Oct 3, 2024

Description

Related #4245

Tested the codemod in dashboard: https://github.com/clerk/dashboard/pull/3886

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:

Copy link

changeset-bot bot commented Oct 3, 2024

🦋 Changeset detected

Latest commit: ee76c39

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

This PR includes changesets to release 2 packages
Name Type
@clerk/nextjs Major
@clerk/upgrade Minor

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

@jacekradko jacekradko force-pushed the jacek/async-headers branch from 4f0263d to 6c0eaa7 Compare October 4, 2024 14:42
@jacekradko jacekradko changed the title feat: async headers feat(nextjs): async headers Oct 4, 2024
@jacekradko jacekradko changed the title feat(nextjs): async headers feat(nextjs): support async headers() Oct 4, 2024
@jacekradko jacekradko changed the title feat(nextjs): support async headers() feat(nextjs): Support async headers() Oct 4, 2024
@jacekradko
Copy link
Member Author

!snapshot

@jacekradko
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

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

Package Version
@clerk/astro 1.3.17-snapshot.vb87a27f
@clerk/backend 1.14.2-snapshot.vb87a27f
@clerk/chrome-extension 1.3.21-snapshot.vb87a27f
@clerk/clerk-js 5.28.0-snapshot.vb87a27f
@clerk/elements 0.17.0-snapshot.vb87a27f
@clerk/clerk-expo 2.2.27-snapshot.vb87a27f
@clerk/express 1.3.2-snapshot.vb87a27f
@clerk/fastify 2.0.4-snapshot.vb87a27f
@clerk/localizations 3.3.1-snapshot.vb87a27f
@clerk/nextjs 6.0.0-snapshot.vb87a27f
@clerk/clerk-react 5.12.1-snapshot.vb87a27f
@clerk/remix 4.2.40-snapshot.vb87a27f
@clerk/clerk-sdk-node 5.0.53-snapshot.vb87a27f
@clerk/shared 2.10.0-snapshot.vb87a27f
@clerk/tanstack-start 0.4.16-snapshot.vb87a27f
@clerk/testing 1.3.14-snapshot.vb87a27f
@clerk/themes 2.1.38-snapshot.vb87a27f
@clerk/types 4.27.0-snapshot.vb87a27f
@clerk/upgrade 1.1.0-snapshot.vb87a27f

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

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/upgrade

npm i @clerk/[email protected] --save-exact

@jacekradko
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

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

Package Version
@clerk/astro 1.3.17-snapshot.v49b6f8d
@clerk/backend 1.14.2-snapshot.v49b6f8d
@clerk/chrome-extension 1.3.21-snapshot.v49b6f8d
@clerk/clerk-js 5.28.0-snapshot.v49b6f8d
@clerk/elements 0.17.0-snapshot.v49b6f8d
@clerk/clerk-expo 2.2.27-snapshot.v49b6f8d
@clerk/express 1.3.2-snapshot.v49b6f8d
@clerk/fastify 2.0.4-snapshot.v49b6f8d
@clerk/localizations 3.3.1-snapshot.v49b6f8d
@clerk/nextjs 6.0.0-snapshot.v49b6f8d
@clerk/clerk-react 5.12.1-snapshot.v49b6f8d
@clerk/remix 4.2.40-snapshot.v49b6f8d
@clerk/clerk-sdk-node 5.0.53-snapshot.v49b6f8d
@clerk/shared 2.10.0-snapshot.v49b6f8d
@clerk/tanstack-start 0.4.16-snapshot.v49b6f8d
@clerk/testing 1.3.14-snapshot.v49b6f8d
@clerk/themes 2.1.38-snapshot.v49b6f8d
@clerk/types 4.27.0-snapshot.v49b6f8d
@clerk/upgrade 1.1.0-snapshot.v49b6f8d

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

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/upgrade

npm i @clerk/[email protected] --save-exact

@jacekradko jacekradko changed the base branch from main to feat/nextjs-15-compat October 18, 2024 17:00
@jacekradko jacekradko marked this pull request as ready for review October 18, 2024 17:00
@jacekradko
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

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

Package Version
@clerk/astro 1.4.0-snapshot.vfbd7c17
@clerk/backend 1.14.2-snapshot.vfbd7c17
@clerk/chrome-extension 1.3.21-snapshot.vfbd7c17
@clerk/clerk-js 5.28.0-snapshot.vfbd7c17
@clerk/elements 0.17.0-snapshot.vfbd7c17
@clerk/clerk-expo 2.2.27-snapshot.vfbd7c17
@clerk/express 1.3.2-snapshot.vfbd7c17
@clerk/fastify 2.0.4-snapshot.vfbd7c17
@clerk/localizations 3.3.1-snapshot.vfbd7c17
@clerk/nextjs 6.0.0-snapshot.vfbd7c17
@clerk/clerk-react 5.12.1-snapshot.vfbd7c17
@clerk/remix 4.2.40-snapshot.vfbd7c17
@clerk/clerk-sdk-node 5.0.53-snapshot.vfbd7c17
@clerk/shared 2.10.0-snapshot.vfbd7c17
@clerk/tanstack-start 0.4.16-snapshot.vfbd7c17
@clerk/testing 1.3.14-snapshot.vfbd7c17
@clerk/themes 2.1.38-snapshot.vfbd7c17
@clerk/types 4.27.0-snapshot.vfbd7c17
@clerk/upgrade 1.1.0-snapshot.vfbd7c17

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

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/upgrade

npm i @clerk/[email protected] --save-exact

@t3dotgg
Copy link

t3dotgg commented Oct 19, 2024

👀

Copy link
Member

@BRKalow BRKalow left a comment

Choose a reason for hiding this comment

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

Looking good! Left some minor comments. Let's get it merged into the 15 branch 🚢

packages/upgrade/src/components/SDKWorkflow.js Outdated Show resolved Hide resolved

const __dirname = dirname(fileURLToPath(import.meta.url));

export async function runCodemod(transform = 'transform-async-request', glob, options) {
Copy link
Member

Choose a reason for hiding this comment

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

[nit] Do we need to make this the default value for transform? Feels a bit odd with the thought that we'll be adding more down the line.

import transformer from '../transform-async-request.cjs';
import { fixtures } from './__fixtures__/transform-async-request.fixtures';

describe('transform-async-request', () => {
Copy link
Member

Choose a reason for hiding this comment

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

nice 👏

packages/nextjs/MIGRATION.md Show resolved Hide resolved
packages/upgrade/src/app.js Outdated Show resolved Hide resolved
packages/upgrade/src/app.js Outdated Show resolved Hide resolved
@jacekradko jacekradko merged commit 81e2d7f into feat/nextjs-15-compat Oct 21, 2024
2 of 3 checks passed
@jacekradko jacekradko deleted the jacek/async-headers branch October 21, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Next15 async headers method compat
4 participants