Skip to content

CLI: Align the Vite upgrade blocker with the 6.3.0 floor - #36793

Merged
valentinpalkovic merged 1 commit into
nextfrom
fix/vite-floor-blocker-message
Oct 15, 2026
Merged

valentinpalkovic merged 1 commit into
nextfrom
fix/vite-floor-blocker-message

Conversation

@obvious-autobuild

Copy link
Copy Markdown
Contributor

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 — the vite entry in minimalVersionsMap (the gate) and the new case '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 against next at 37aadd153:

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):

  • Before, vite 4.5.2: exit 1, blocker detected, generic message, no link.
  • After, vite 4.5.2: exit 1, blocker detected: "Vite 6.3 or newer required" / "Support for Vite < 6.3.0 has been removed." / "More information: MIGRATION.md#vite-requires-vite-63-or-higher".
  • After, vite 6.2.2: exit 1, same blocker. This case previously passed, which was the gap.
  • After, vite 6.3.0 and 6.4.4: exit 0, "Storybook upgrade completed!", no blocker.

Unit tests: block-dependencies-versions.test.ts passes 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 dev and storybook build both 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.md and 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:

  • unit tests
  • stories
  • integration tests
  • end-to-end tests

Manual testing

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

  1. Run a sandbox for template, e.g. yarn task --task sandbox --start-from auto --template react-vite/default-ts
  2. In the sandbox, downgrade Vite below the floor: npm install vite@6.2.2 --legacy-peer-deps
  3. Run the upgrade CLI — expect it to stop with the blocker "Vite 6.3 or newer required", the message "Support for Vite < 6.3.0 has been removed.", and a link to the migration guide
  4. Restore the floor: npm install vite@6.3.0 --legacy-peer-deps and run the upgrade again — expect no Vite blocker

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

MIGRATION.md already 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:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • Make 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.

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.
@obvious-autobuild obvious-autobuild Bot added bug ci:normal Run our default set of CI jobs (choose this for most PRs). qa:needed Pull Requests that will need manual QA prior to release. labels Oct 14, 2026
@storybook-contribution-review storybook-contribution-review Bot added builder-vite cli sev:S4 Low priority. Wait for community PRs. labels Oct 15, 2026
@storybook-app-bot

storybook-app-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Package Benchmarks

Commit: 7a826c6, ran on 15 October 2026 at 08:20:26 UTC

The following packages have significant changes to their size or dependencies:

storybook

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

@storybook-contribution-review storybook-contribution-review Bot added the review:1-architecture In automated review pipeline: awaiting stage 1 architecture review label Oct 15, 2026
@storybook-contribution-review

Copy link
Copy Markdown

🤖 I am the Storybook contribution review bot; a human maintainer approved this message before it was posted.
Review phase: Runtime verification (stage 3 of 3)

We are trying a three-stage automated review: architecture, code quality, and runtime verification. This message states which stages ran and which were skipped. A human maintainer approves each public message and makes the final decision. Please tell us whether the feedback and evidence are useful.

Thanks for this! Raising the Vite autoblocker floor to 6.3.0 brings storybook upgrade in line with builder-vite's peer range (^6.3.0 || ^7.0.0 || ^8.0.0), so projects on Vite 5.4 or 6.2 hear about it before the upgrade instead of after. The change is one data edit plus one message arm that follows the existing React message.

Stages run on head 7a826c6 against base 37aadd1: architecture (stage 1): passed. Code quality (stage 2): passed. Runtime verification (stage 3): passed. A maintainer makes the merge decision.

What was verified

  • The PR's unit tests fail on base and pass on head. With only block-dependencies-versions.ts swapped to its base version, 4 of 38 tests fail (Vite 4.5.2 is blocked at the old 5.0.0 floor, and 5.4.21, 6.2.2 and 6.3.0-beta.0 aren't blocked). On head, 38 of 38 pass.
  • Against a real npm fixture project (real NPMProxy, no mocks, calling blocker.check()), base lets Vite 5.4.21 and 6.2.2 through. Head blocks them with "Vite 6.3 or newer required" and still lets 6.3.0 and 7.1.2 through. Vite 4.5.2 is blocked on both, which shows the fixture reads the installed version.
  • The MIGRATION.md link resolves. #vite-requires-vite-63-or-higher matches the ### Vite: requires Vite 6.3 or higher heading and its table-of-contents entry, both at head and on the live next branch.
  • The vite-plus path picks up the new floor. findOutdatedPackage checks the Vite version that vite-plus vendors against the same map. With a test where vite-plus reports 6.2.2, base passes it and head blocks it.
  • On head, lib/cli-storybook/src/autoblock passes (7 files, 88 tests), and yarn nx check cli succeeds.

Optional: the PR has no test for the vite-plus path. A small regression test would cover it: vite-plus reports vite: '6.2.2' while node_modules/vite/package.json reports the wrapper's own version, and the blocker should return the 6.3.0 result.

Not verified: a full storybook upgrade run against a real sandbox (the fixture calls blocker.check() directly; message rendering goes through unchanged shared code), a real vite-plus install (mocked only), and pnpm or Yarn fixtures (npm only). CI isn't covered here.

If a new commit is pushed, this result no longer applies and the review restarts on the new head.

@storybook-contribution-review storybook-contribution-review Bot added review:verified Three-step review passed: architecture, code quality, runtime verification and removed review:1-architecture In automated review pipeline: awaiting stage 1 architecture review labels Oct 15, 2026
@valentinpalkovic
valentinpalkovic merged commit 09bf9f8 into next Oct 15, 2026
194 of 206 checks passed
@valentinpalkovic
valentinpalkovic deleted the fix/vite-floor-blocker-message branch October 15, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug builder-vite ci:normal Run our default set of CI jobs (choose this for most PRs). cli qa:needed Pull Requests that will need manual QA prior to release. review:verified Three-step review passed: architecture, code quality, runtime verification sev:S4 Low priority. Wait for community PRs.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants