Repository navigation
Next.js: Raise the supported floor to 15 - #36201
Merged
Merged
Conversation
Next.js 14 is no longer supported; the supported floor is now Next.js 15. Applies to @storybook/nextjs, @storybook/nextjs-vite, and @storybook/vite-plugin-storybook-nextjs.
Raises the upgrade-time autoblock floor for next from 14.1.0 to 15.0.0. The blocker message links the new MIGRATION.md anchor instead of the outdated Next.js 13 upgrade guide. --force still bypasses, per the existing autoblock contract.
- Delete src/compatibility/ (compatibility-map and draft-mode.compat): the '<15.0.0' alias mapping and its draft-mode shim only applied to Next.js 14, which is no longer supported. The './compatibility/ draft-mode.compat' export is removed from the package exports and build config. - Make the SWC compiler path unconditional in preset.ts: the isNext14orNewer version gate kept the babel/ tree (loader, preset, plugins) alive for Next.js 14 projects with a babel config; with the floor at 15 the babel compiler branch and the babel/ directory go. - Simplify the legacy-image alias setup: the '>=13.0.0' version check was always true at a Next.js 15 floor, so the next/legacy/image aliases are now applied unconditionally. - Drop the compat-path warning filter from the webpack alias setup; it only suppressed warnings produced by the deleted '<15' aliases.
Adds a 'Next.js: Require v15 and up' entry under a new 'From version 10.6.x to 11.0.0' section. The anchor is linked from the upgrade-time blocker message.
Fixes the ci/circleci format-check failure: 8 files in the Next.js floor diff were not prettier-clean.
The peer-range bump changes the workspaces' embedded peerDescriptors, so yarn install --immutable (CI) failed with YN0028 before any check ran.
JReinhold
approved these changes
Sep 7, 2026
2 tasks done
obvious-autobuild Bot
pushed a commit
that referenced
this pull request
Sep 7, 2026
Resolves the conflict with PR #36201 (Next.js 15 floor reland): the dependenciesVersions blocker now carries both the unconditional next 15.0.0 floor (with its 'Next.js 15 support removed' log case) and the conditional addon-vitest Vitest 4 floor. The test file unions the reland's Next.js cases with the ported Vitest cases, adopting the reland's real-semver helpers.
2 of 9 tasks
2 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Storybook 11 is raising the supported framework floors. For Next.js the supported floor moves from 14.1 to 15: the Next 14 cohort can stay on Storybook 10 or follow the migration guide, and the compatibility code that existed only for Next 14 is real dead weight in
@storybook/nextjs— a package that is itself deprecated in favor of@storybook/nextjs-vite(removal announced for Storybook 12).What
One floor, four layers, one commit per layer:
nextpeer range raised to^15.0.0 || ^16.0.0in@storybook/nextjs,@storybook/nextjs-vite, and@storybook/vite-plugin-storybook-nextjs.nextentry in the autoblock map moves14.1.0→15.0.0. The blocker message links the new MIGRATION.md anchor (#nextjs-require-v15-and-up) instead of the stale Next.js 13 upgrade guide.--forcestill bypasses, per the existing autoblock contract. A new unit test covers the contract: next 14 → blocked with message + anchor; next 15/16 → pass.src/compatibility/(compatibility-map + draft-mode.compat) is deleted. Its only entry was the'<15.0.0'alias table, and the./compatibility/draft-mode.compatexport goes with it (package.json exports + build config). The compat-alias spread inexport-mocksand the compat-path warning filter inaliases/webpack.ts— both added by "Nextjs: Add support for Next 15" for the Next 14 shim — are removed too.isNext14orNewerterm inpreset.tsis dropped: the supported floor is 15. Compiler selection is otherwise unchanged fromnextfor every supported version —useSWC = forceSwcTransforms || !hasBabelConfig— so the Babel compiler path, thebabelpreset property, and the wholesrc/babel/tree stay intact (a project shipping.babelrc/babel.config.jswithout forcing SWC transforms still compiles through Babel).>=13.0.0legacy-image check collapses into an unconditional alias assignment.How to Review
preset.ts:webpackFinalkeeps next's compiler selection for all supported versions — only the always-trueisNext14orNewerterm was dropped. The Babel compiler path andbabelpreset property are restored unchanged after review feedback. The only remaining version check in the framework is the pre-existingisNext16orNewercheck inpreviewAnnotations— a Next 16 concern, out of scope.font/babel/(theTransformFontImportsbabel plugin) and thebabel-loaderdependency are consumed again by the restored Babel path — unchanged fromnext. The vendored<15.0.0copy undervite-plugin-storybook-nextjs's next-mocks stays untouched (self-contained, separate surface).react/react-dom/@types/reactpeer ranges are intentionally untouched — that sweep belongs to the React floor PR.Test Evidence
yarn test autoblock— 4 files, 31 tests pass, including the newblock-dependencies-versions.test.ts(next 14 → blocked with message + anchor; 15/16 → pass).yarn test code/frameworks/nextjs— 2 files, 14 tests pass after the deletions.scripts/build-package nextjs— build succeeds; freshdist/bundles the Babel compiler path again and has zero references todraft-mode.compator the deletedcompatibility/tree.scripts/check/check-package.ts) — clean forcode/frameworks/nextjsandcode/lib/cli-storybook.Manual testing
Automated coverage carries this change; no manual steps are strictly required:
yarn test autoblock— new unit test covers the Next.js 15 blocker (next 14 → blocked with the migration link; next 15/16 → pass;--forcebypasses).yarn test code/frameworks/nextjs— framework unit tests pass after the compatibility deletions.scripts/build-package nextjs— package build succeeds with the restored Babel path bundled and zero references to the deleteddraft-mode.compattree..babelrc.QA
Visual evidence not applicable — no rendered UI, visual state, or interactive workflow changes.
🔗 Obvious Project · 🧵 Obvious Thread