Repository navigation
CLI: Align the Vite upgrade blocker with the 6.3.0 floor - #36793
Conversation
The upgrade blocker gated Vite at 5.0.0 while MIGRATION.md and the Vite-based frameworks' peer range (^6.3.0 || ^7.0.0 || ^8.0.0) state 6.3.0 as the supported floor. A project on Vite 5.4 or 6.0 could upgrade through the blocker and land on an unsupported Vite, and a genuinely incompatible Vite got a generic message with no migration link. Raise the threshold to 6.3.0 and add a Vite-specific title, message, and migration-guide link, matching the react and angular blockers. Regression tests pin the boundary (blocks 4.5.2/5.4.21/6.2.2 and 6.3.0-beta.0, accepts 6.3.0/6.4.4/7.1.2) and the corrected message.
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 73 | 73 | 0 |
| Self size | 21.58 MB | 21.61 MB | 🚨 +35 KB 🚨 |
| Dependency size | 31.24 MB | 31.24 MB | 0 B |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 179 | 179 | 0 |
| Self size | 884 KB | 881 KB | 🎉 -3 KB 🎉 |
| Dependency size | 87.03 MB | 87.06 MB | 🚨 +35 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 172 | 172 | 0 |
| Self size | 44 KB | 44 KB | 0 B |
| Dependency size | 85.51 MB | 85.54 MB | 🚨 +35 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 74 | 74 | 0 |
| Self size | 1.07 MB | 1.07 MB | 🚨 +48 B 🚨 |
| Dependency size | 52.82 MB | 52.85 MB | 🚨 +35 KB 🚨 |
| Bundle Size Analyzer | node | node |
Thanks for this! Raising the Vite autoblocker floor to 6.3.0 brings Stages run on head What was verified
Optional: the PR has no test for the vite-plus path. A small regression test would cover it: vite-plus reports Not verified: a full If a new commit is pushed, this result no longer applies and the review restarts on the new head. |
What I did
The Vite version blocker gated at 5.0.0 while
MIGRATION.md("Vite: requires Vite 6.3 or higher") and the Vite-based frameworks' peer range (^6.3.0 || ^7.0.0 || ^8.0.0) state 6.3.0 as the supported floor. A project on Vite 5.4, 6.0, or 6.2 could upgrade straight through the blocker and land on an unsupported Vite, and a genuinely incompatible Vite received a generic message with no migration link.This PR raises the threshold to 6.3.0 and adds a Vite-specific title, message, and migration-guide link, matching how the react and angular blockers in the same file are phrased. Regression tests pin the boundary and the corrected wording.
How to review it
code/lib/cli-storybook/src/autoblock/block-dependencies-versions.ts— theviteentry inminimalVersionsMap(the gate) and the newcase 'vite'in the message switch (the title, message, and link). The react and angular cases are the pattern it follows.code/lib/cli-storybook/src/autoblock/block-dependencies-versions.test.ts— boundary tests: blocks 4.5.2, 5.4.21, 6.2.2, and 6.3.0-beta.0; accepts 6.3.0, 6.4.4, 7.1.2; asserts the corrected title, message, and migration link.Evidence
Gate matrix from the blocker check (
semver.lt(installed, minimum)), probed across 12 versions againstnextat37aadd153:Before: 4.0.0 and 4.5.2 blocked with the generic "Support for below 5.0.0 has been removed" message; everything from 5.0.0 through 8.0.0 passed the gate, including 5.4.21, 6.0.11, and 6.2.2.
After: 4.0.0, 4.5.2, 5.0.0, 5.4.21, 6.0.11, 6.2.2, and 6.3.0-beta.0 block with the corrected output; 6.3.0, 6.3.5, 6.4.4, 7.1.2, and 8.0.0 pass.
Real-CLI runs on a clean fixture (Storybook 10.6.2 +
@storybook/react-vite+vite@X,storybook upgrade --yes --dry-run):Unit tests:
block-dependencies-versions.test.tspasses 38/38. A mutation check that reverts the threshold to 5.0.0 fails exactly the four blocked-path tests, confirming the tests pin this change.Runtime note for reviewers: published 11.0.0-alpha.6 was probed in a clean consumer fixture across Vite 4.5.2 through 7.1.2.
storybook devandstorybook buildboth complete and index the story on every one of those versions, including the ones below 6.3.0. So 6.3.0 is the documented support floor (MIGRATION.mdand the peer ranges), and this PR aligns the upgrade-time gate with that documented floor. The diff adds no runtime enforcement and does not change dev or build behavior.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
yarn task --task sandbox --start-from auto --template react-vite/default-tsnpm install vite@6.2.2 --legacy-peer-depsnpm install vite@6.3.0 --legacy-peer-depsand run the upgrade again — expect no Vite blockerDocumentation
MIGRATION.MD
MIGRATION.mdalready documents the 6.3.0 floor ("Vite: requires Vite 6.3 or higher"); this PR aligns the gate with the existing documentation, so no documentation change was needed.Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.