Repository navigation
fix(upgrade): stop before upgrading when the framework version is unsupported #10995
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
base: main
Are you sure you want to change the base?
Changes from all commits
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/upgrade': patch | ||
| --- | ||
|
|
||
| Stop before changing any packages when the project's Next.js or Expo version is below what the new SDK supports. Previously the upgrade failed with the package manager's peer dependency error (npm) or installed an incompatible SDK (pnpm), and no codemods ran. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ packages: ['nextjs'] | |
| matcher: "next\":\\s*\"(?:\\^|~|>|=|\\s)*(?:13|14)\\." | ||
| matcherFlags: 'm' | ||
| category: 'version' | ||
| blocksUpgrade: true | ||
|
Contributor
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. Make the Next.js blocker match every version outside the The matcher in The peer range in Add matcher tests for the boundary versions. Versions
|
||
| --- | ||
|
|
||
| Support for Next.js 13 and 14 has been dropped. `@clerk/nextjs` now requires Next.js 15.2.8 or later. On Next.js 16, it requires 16.0.10 or later. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the target framework dependency for the blocking decision.
runScanssearches all non-ignored files as text. If a compatible project hasnext: "15.2.8"inpackage.json, but a source template contains"next": "^14.0.0", the template produces a blocker. The CLI exits before upgrading the compatible project.Read the framework dependency from the target project's manifest and resolve its version for this check. Keep matches in examples and unrelated files advisory.