Skip to content

Tests: Update Vitest to 5.0.3 and Storybook to 10.6.1 - #83996

Merged
ciampo merged 4 commits into
trunkfrom
codex/update-vitest-5.0.3
Oct 2, 2026
Merged

ciampo merged 4 commits into
trunkfrom
codex/update-vitest-5.0.3

Conversation

@ciampo

@ciampo ciampo commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

See Vitest 5.0.3, Storybook 10.6.1, and storybookjs/storybook#36270. Related follow-ups: storybookjs/storybook#36221 and #83495.

What?

Update the aligned Vitest packages to 5.0.3 and Storybook packages to 10.6.1. Remove the obsolete interceptor-warning tracking comment.

Why?

Vitest 5.0.3 fixes the Browser Mode interceptor warning. Storybook 10.6.1 adds Vitest 5 support through storybookjs/storybook#36270, so the dependency update no longer needs to wait for storybookjs/storybook#36221.

How?

Update workspace ranges and the lockfile together, including the Storybook ESLint plugin, icons, badge range, and Flakiness reporter 1.10.1 with Vitest 5 support. Keep the live-iframe provider and its regression test from #83495. Remove the local Storybook optimizer include now covered by the upgraded addon.

Notable release changes

Release audit against the previous locked versions

The audit covers Vitest 5.0.1 through 5.0.3, Storybook 10.5.9 through 10.6.1, migration notes, and the companion-package releases. The old lockfile already mixed Storybook versions, so the starting point differs by package.

Package family Previous lock This PR
Vitest and Browser Mode packages 5.0.0 5.0.3
Storybook core 10.6.0 10.6.1
A11y/docs addons, React/Vite renderer and builder, ESLint plugin 10.5.8 10.6.1
Vitest addon 10.5.9 10.6.1
Storybook icons 2.0.2 2.1.0
Flakiness reporter 1.9.2 1.10.1
Tag badges 3.1.0 3.1.0, with the minimum range raised
Vitest/Storybook transitive MagicString 0.30.21 / 1.3.1 1.4.2; legacy consumers retain 0.30.21
Vitest process diagnostics why-is-node-running 2.3.0 Required 3.2.1
  • Vitest correctness and diagnostics. The patch releases fix nested asymmetric assertions, equality testers in custom asymmetric matchers, Browser Mode mock-path boundaries and cancellation, and collection failures returning success from vitest list. These apply to our matcher-heavy tests, monorepo Browser Mode setup, and discovery tooling. See the 5.0.1, 5.0.2, and 5.0.3 notes.
  • Fake-timer compatibility. Using toNotFake now always keeps nextTick and queueMicrotask native; use toFake to mock either explicitly. No toNotFake usage was found in the repo, so no adaptation is needed. See vitest-dev/vitest#11261.
  • One workaround removed. The addon now prebundles storybook/test, replacing our custom storybook > @testing-library/dom include. A forced optimizer rebuild passes all 891 story tests, the unchanged 233-file discovery set, and story-index parity. Its project-root discovery fix does not replace our test.dir setting: removing that setting additionally collects 36 MDX files, which are skipped. Keep the directory and MDX settings.
  • Story failures and manifest extraction. The addon filters instrumentation from failure stacks, making story-source locations easier to find. React shares TypeScript's document registry across component-meta projects, which suits our monorepo manifest extraction. Build and manifest checks pass; no Gutenberg performance gain is claimed without a benchmark.
  • A11y and migration checks. The enabled accessibility addon fixes Firefox vision-simulator filters. Our smoke runs use Chromium, so this is an upstream fix, not a local Firefox verification. The 10.6 migration notes remove experimental Playwright component-test exports and move CSF source enrichment into addon-docs. We use neither the removed exports nor @storybook/csf-plugin directly; its lockfile removal is expected. The Vitest Playwright provider remains supported.
  • Companion packages. Icons 2.1.0 replaces StatusNewIcon with SparkleIcon and adds QR/status icons. Our JumpToIcon and MirrorIcon imports remain available, and no removed-icon consumer was found. Flakiness 1.10.0 supports Vitest 5, and 1.10.1 fixes config-path detection. The ESLint plugin retains the same 16 rules and eight presets; its CSF helpers are now bundled rather than imported from Storybook internals. Tag-badges 3.1.0 was already locked, so its individual badge exports are not a new runtime benefit of this PR.
  • Transitive resolution. The lockfile now resolves magic-string@1.4.2 for the upgraded Storybook/Vitest packages and Vitest's exact why-is-node-running@3.2.1 requirement. MagicString 1.3.2 through 1.4.2 fixes edits and source-map encoding and adds optional APIs; installed consumers remain compatible. Older consumers retain 0.30.21. Why-is-node-running 3.0 requires ESM and Node >=20.11, which fit Vitest's dynamic import and our supported runners; 3.2 removes siginfo and stackback and improves diagnostics.
  • Optional follow-ups. The new focused Vitest Trace View layout is a possible follow-up for Vitest UI debugging. Gutenberg's saved per-file traces currently use Playwright's viewer, so the UI change does not improve that existing workflow automatically. Repeat-status and expected-failure retry fixes make repeated diagnostics safer, but we do not enable retries or repeats globally. Filesystem-cache fixes only matter if fsModuleCache is enabled; it remains off pending separate correctness/performance evaluation. Storybook's 10.6.0 CLI skills/tools and search improvements were already present in the locked core. Its restored change-detection button needs an experimental feature we do not enable; composed-ref and other-framework fixes have no configured consumer here.
  • Workarounds retained. Vitest 5.0.3 still uses the name-based iframe lookup behind Tests: Resolve Browser Mode commands against the live iframe #83495. Browser cancellation fixes do not establish that detached-iframe reclamation is fixed, so Storybook's forced garbage collection stays. The jsdom Blob fixes target newer jsdom versions and do not justify removing our jsdom 26 Node Blob/File setup. Trunk's Vite 8.3.2 update already removes the separate PostCSS browser resolver; the rebase preserves that change. PostCSS Modules and react-docgen-typescript remain unchanged and do not justify further fallback removal. The legacy manifest shim still depends on published MCP consumer compatibility. Selected-child filtering and addon coverage remain unresolved as documented below.

Testing Instructions

  1. Run npm ci and verify npm ls --workspace @wordpress/storybook --workspace @wordpress/unit-tests vitest @vitest/browser-playwright @storybook/addon-vitest storybook --all reports the aligned versions without invalid peers.
  2. Run the Node/jsdom projects on Node 24 and 26, and the Chromium project on Node 24: npm run test:unit:vitest:shuffled -- --sequence.seed=80856 --project=node --project=jsdom, then npm run test:unit:vitest:shuffled -- --sequence.seed=80856 --project=browser. The obsolete interceptor warning should be absent.
  3. Run npm run storybook:build, the sidebar/manifest checks from .github/workflows/storybook-check.yml, and npm run --workspace @wordpress/storybook test:smoke. Confirm the manifest snapshot is unchanged and the story index matches the tested stories.
Verification and upstream limitations

The full Node, Browser Mode, and Storybook runs below use the repaired dependency graph on trunk 792c31b413b. A final conflict-free rebase onto 7e63d3db015 preserves that graph and all reviewed Storybook/Vitest configuration. The final build passes, and 25 focused package-packing/block-support tests pass on both Node versions after that refresh; root typecheck and dependency checks also pass.

  • Full build, root typecheck, dependency alignment, lockfile, peer declarations, published dependencies, manifest formatting, focused JS lint, test conventions, and exactly-one-project routing pass.
  • Complete Node/jsdom runs with the repaired dependency graph pass on Node 24.20.0 and 26.9.0 at seed 80856: 1,087 files, 35,520 passing tests, 144 existing expected-failure cases, and four skipped tests per runtime. The hanging-process reporter also loads its corrected diagnostic dependency and passes a focused suite on both runtimes.
  • Rebased onto trunk 7e63d3db015, retaining Vite 8.3.2 and aligning react-inert-value with Vitest 5.0.3. A fresh install, full build, typecheck, dependency/lockfile/peer/published-dependency checks, conventions, and routing pass. Recursive validation of the changed dependencies and their descendants passes. The unfiltered npm graph still reports seven unchanged trunk conflicts in other dependencies; those remain outside this PR.
  • Complete Chromium run with the repaired dependency graph passes 126 files and 1,691 tests, with 72 existing expected-failure cases. The interceptor warning is absent.
  • Storybook and E2E Storybook builds pass. Sidebar roots, design-system manifest contract, unchanged manifest snapshot, and story-index parity pass. All 891 static stories render, and all 891 Vitest story tests pass across 233 files.
  • The six timezone/locale combinations pass on Node 24 and 26, with 113 date tests in each combination.
  • Released @wordpress/scripts@36.0.0 / @wordpress/eslint-plugin@27.0.0 consumer checks pass with Vitest 5.0.3 on Node 22.22.2/Vite 7.0.0, Node 24.20.0/Vite 8.0.0, and Node 26.9.0/Vite 8.0.0. Node 24 also passes Browser Mode. These checks cover watch reruns, inspector resume, config discovery, generated CSS, jsdom, Jest compatibility, and lint defaults. They sample the supported combinations rather than claiming the complete CI cross-product.
  • Fresh root lockfile audits of the old and new dependency graphs both report 53 existing findings. No vulnerability entries were added.
  • Build and test CI for the updated head is pending. Optional package-changelog presence checks flag the manifest edits; these changes only update development dependencies and do not change published package behavior, so no package changelog entries are added.

A separate fixture uses published Storybook 10.6.1, Vitest/Playwright provider/coverage provider 5.0.3, Vite 8.3.1, React 18.3.1, and Playwright 1.63.0. It drives the actual addon backend and Chromium with one parent story, two named child tests, and a sibling story.

  • All four tests and parent selection pass. Automatic watch reruns pass through an intentional component failure and recovery. CLI V8 coverage passes and produces a non-empty report.
  • Selected-child filtering still fails: selecting one named child runs zero tests because the addon builds a space-separated filter while Vitest 5 joins nested names with >.
  • Addon coverage still fails: enabling coverage reports that @storybook/addon-vitest/internal/coverage-reporter must export a reporter class as its default export or module.exports. The off/on/off sequence cannot complete.
  • Both failures also reproduce with Vitest 5.0.0 and Storybook 10.6.1. These broader Addon Vitest: Support Vitest 5 storybookjs/storybook#36221 concerns remain open; the 10.6.1 release does not establish that they are fixed. Gutenberg's current configuration does not enable experimental child tests or the addon coverage UI.

No runner, timeout, assertion, or isolation setting is changed to hide these failures. The live-iframe workaround needs separate evidence before removal.

Use of AI Tools

Codex audited the releases and repository usage, updated dependencies, removed the verified optimizer workaround, ran verification, and reproduced the remaining addon issues with published packages.

@github-actions github-actions Bot added [Package] Element /packages/element [Package] Date /packages/date [Package] Data /packages/data [Package] Server Side Render /packages/server-side-render [Package] A11y /packages/a11y [Package] Autop /packages/autop [Tool] Babel preset /packages/babel-preset-default [Tool] Browserslist config /packages/browserslist-config [Package] DOM ready /packages/dom-ready [Package] Hooks /packages/hooks [Package] i18n /packages/i18n [Package] is-shallow-equal /packages/is-shallow-equal [Tool] npm-package-json-lint config /packages/npm-package-json-lint-config [Tool] WP Scripts /packages/scripts [Package] Url /packages/url [Package] Word count /packages/wordcount [Package] Deprecated packages/deprecated [Tool] Babel plugin makepot /packages/babel-plugin-makepot [Tool] Babel plugin import JSX pragma /packages/babel-plugin-import-jsx-pragma [Package] Blob /packages/blob [Package] Compose /packages/compose [Package] Core data /packages/core-data [Package] API fetch /packages/api-fetch [Package] HTML entities /packages/html-entities [Package] Viewport /packages/viewport [Package] DOM /packages/dom [Package] Keycodes /packages/keycodes [Package] Plugins /packages/plugins [Package] Components /packages/components [Package] Blocks /packages/blocks labels Oct 1, 2026
@github-actions github-actions Bot added [Package] Escape HTML /packages/escape-html [Package] Interface /packages/interface [Package] Icons /packages/icons [Tool] stylelint config /packages/stylelint-config [Package] Edit Site /packages/edit-site [Package] Warning /packages/warning [Tool] Readable JS Assets Webpack Plugin /packages/readable-js-assets-webpack-plugin [Package] Style Engine /packages/style-engine [Package] Preferences /packages/preferences [Package] Media Utils /packages/media-utils [Package] Private APIs /packages/private-apis [Package] Core commands /packages/core-commands [Package] Interactivity /packages/interactivity [Package] DataViews /packages/dataviews [Package] Interactivity Router /packages/interactivity-router [Package] Fields /packages/fields [Package] Theme /packages/theme [Package] UI /packages/ui [Package] wp-build /packages/wp-build [Package] Sync /packages/sync [Package] Admin UI /packages/admin-ui [Package] Abilities /packages/abilities labels Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: 0 B

Total Size: 8.25 MB

4baad5e Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 2595c0f trunk % Change
timeToFirstByte 58.2 ms +11.6% -1.89% 57.1 ms +12.7% -3.33% 1.93%
largestContentfulPaint 104 ms +1.92% -9.62% 94 ms +10.64% -6.38% 10.64%
lcpMinusTtfb 43.4 ms +5.18% -19.47% 35.15 ms +17.64% -4.27% 23.47%
wpBeforeTemplate 28.83 ms +6.07% -1.21% 28.27 ms +17.19% -2.44% 1.98%
wpTemplate 25.7 ms +3.19% -4.01% 24.75 ms +2.59% -4.61% 3.84%
wpTotal 54.24 ms +11.01% -1.79% 53.53 ms +11.79% -3.81% 1.33%
wpMemoryUsage 7.63 MB +0% -0% 7.59 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric 2595c0f trunk % Change
timeToFirstByte 48.45 ms +4.33% -2.17% 47.7 ms +8.28% -1.57% 1.57%
largestContentfulPaint 104 ms +3.85% -0% 104 ms +1.92% -3.85% 0%
lcpMinusTtfb 56.6 ms +3.27% -3.45% 54.05 ms +4.16% -2.13% 4.72%
wpBeforeTemplate 26.49 ms +2.98% -2.38% 26.42 ms +11.96% -2.01% 0.26%
wpTemplate 18.52 ms +6.05% -1.35% 18.21 ms +2.47% -1.92% 1.7%
wpTotal 45.27 ms +4.68% -2.32% 44.8 ms +8.04% -1.87% 1.05%
wpMemoryUsage 6.25 MB +0% -0% 6.21 MB +0% -0% 0.71%
wpDbQueries 14 +0% -0% 14 +0% -0% 0%

media-processing

Metric 2595c0f trunk % Change
mediaProcessingJpeg 403.47 ms +1.92% -0.21% 403.21 ms +1.25% -0.1% 0.06%
mediaProcessingAvif 6068.21 ms +0.12% -0.08% 6058.85 ms +0.07% -0.22% 0.15%
mediaProcessingJpegToAvif 4190.04 ms +0.24% -0.19% 4169.69 ms +0.31% -0.18% 0.49%

media-upload

Metric 2595c0f trunk % Change
jpegUploadProcessing 1433.06 ms +36.9% -2.09% 1430.6 ms +0.88% -1.7% 0.17%
pngUploadProcessing 184.16 ms +20.33% -5.91% 189.8 ms +20.12% -6.75% -2.97%
largeJpegUploadProcessing 1409.39 ms +1.37% -0.53% 1408.38 ms +1.29% -0.58% 0.07%
multipleImageUploadProcessing 1604.46 ms +33.19% -2.44% 1588.72 ms +8.73% -0.57% 0.99%

post-editor

Metric 2595c0f trunk % Change
serverResponse 401.1 ms +6.39% -4.27% 417.34 ms +4.38% -3.58% -3.89%
firstPaint 202.13 ms +13.96% -19.25% 237.93 ms +21.14% -25.52% -15.05%
domContentLoaded 1081.83 ms +2.06% -0.59% 1093.99 ms +1.08% -1.46% -1.11%
loaded 1083.24 ms +2.02% -0.61% 1095.25 ms +1.11% -1.45% -1.1%
firstContentfulPaint 449.61 ms +4.77% -6.55% 462.91 ms +1.57% -0.8% -2.87%
firstBlock 3176.51 ms +0.97% -1.13% 3150.83 ms +1.55% -1.45% 0.82%
type 18.17 ms +6.22% -4.02% 18.57 ms +10.12% -3.28% -2.15%
typeWithoutInspector 18.26 ms +7.34% -2.63% 18.37 ms +3.27% -1.8% -0.6%
typeWithTopToolbar 25.31 ms +6.87% -5.1% 24.16 ms +5.92% -3.6% 4.76%
typeContainer 8.88 ms +3.04% -7.32% 8.6 ms +2.91% -5.12% 3.26%
focus 74.44 ms +5.06% -9.55% 71.28 ms +7.51% -2.36% 4.43%
firstFocus 237.45 ms +0% -0% 200.04 ms +0% -0% 18.7%
selectAll 525.15 ms +1.94% -2.22% 505.4 ms +1.71% -0.89% 3.91%
listViewOpen 63.52 ms +2.03% -5.37% 59.75 ms +10.59% -6.44% 6.31%
inserterOpen 21.01 ms +24.8% -1.71% 22.73 ms +5.46% -11.79% -7.57%
inserterHover 2.34 ms +8.12% -10.26% 2.2 ms +4.09% -5% 6.36%
inserterSearch 8.7 ms +10% -7.47% 8.31 ms +2.17% -8.42% 4.69%
loadPatterns 649.52 ms +1.5% -3.96% 657.04 ms +2.7% -2.82% -1.14%
wpTotal 389.83 ms +6.6% -4.38% 406.07 ms +4.45% -3.85% -4%
wpMemoryUsage 13.18 MB +0% -0% 13.14 MB +0% -0% 0.28%
wpDbQueries 54 +0% -1.85% 54 +0% -1.85% 0%

site-editor

Metric 2595c0f trunk % Change
serverResponse 501.03 ms +4.42% -5.08% 495.52 ms +2.97% -6.36% 1.11%
firstPaint 237.05 ms +10.96% -2.06% 263.66 ms +8.7% -9.44% -10.09%
domContentLoaded 1153.67 ms +0.37% -0.86% 1147.39 ms +1.72% -1.24% 0.55%
loaded 1154.9 ms +0.37% -0.86% 1148.61 ms +1.7% -1.23% 0.55%
firstContentfulPaint 453.32 ms +4.01% -1.52% 456.8 ms +1.24% -3.43% -0.76%
firstBlock 4167.75 ms +0.81% -1.07% 4172.82 ms +1.02% -0.31% -0.12%
type 17.85 ms +2.86% -5.71% 20.12 ms +3.43% -2.68% -11.28%
navigate 118.93 ms +9.27% -15.32% 116.83 ms +10.1% -11.19% 1.8%
loadPatterns 1259.59 ms +17.87% -0.64% 1390.93 ms +13.83% -0.66% -9.44%
loadPages 1057.34 ms +0.64% -1.19% 1060.27 ms +2.22% -1.41% -0.28%
wpTotal 491.76 ms +4.32% -5.41% 485.85 ms +2.93% -6.44% 1.22%
wpMemoryUsage 12.14 MB +0% -0% 12.10 MB +0% -0% 0.31%
wpDbQueries 43.5 +1.15% -1.15% 43.5 +1.15% -1.15% 0%

4baad5e Run

@manzoorwanijk manzoorwanijk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like a straghforward change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] A11y /packages/a11y [Package] Abilities /packages/abilities [Package] Admin UI /packages/admin-ui [Package] API fetch /packages/api-fetch [Package] Autop /packages/autop [Package] Blob /packages/blob [Package] Block editor /packages/block-editor [Package] Block library /packages/block-library [Package] Blocks /packages/blocks [Package] Components /packages/components [Package] Compose /packages/compose [Package] Core commands /packages/core-commands [Package] Core data /packages/core-data [Package] Data Controls /packages/data-controls [Package] Data /packages/data [Package] DataViews /packages/dataviews [Package] Date /packages/date [Package] Deprecated packages/deprecated [Package] Design System MCP /packages/design-system-mcp [Package] DOM ready /packages/dom-ready [Package] DOM /packages/dom [Package] Edit Post /packages/edit-post [Package] Edit Site /packages/edit-site [Package] Edit Widgets /packages/edit-widgets [Package] Editor /packages/editor [Package] Element /packages/element [Package] Escape HTML /packages/escape-html [Package] Fields /packages/fields [Package] Format library /packages/format-library [Package] Grid /packages/grid [Package] Hooks /packages/hooks [Package] HTML entities /packages/html-entities [Package] i18n /packages/i18n [Package] Icons /packages/icons [Package] Interactivity Router /packages/interactivity-router [Package] Interactivity /packages/interactivity [Package] Interface /packages/interface [Package] is-shallow-equal /packages/is-shallow-equal [Package] Keycodes /packages/keycodes [Package] Media Utils /packages/media-utils [Package] Notices /packages/notices [Package] Plugins /packages/plugins [Package] Preferences /packages/preferences [Package] Priority Queue /packages/priority-queue [Package] Private APIs /packages/private-apis [Package] Project management automation /packages/project-management-automation [Package] Redux Routine /packages/redux-routine [Package] Rich text /packages/rich-text [Package] Server Side Render /packages/server-side-render [Package] Style Engine /packages/style-engine [Package] Sync /packages/sync [Package] Theme /packages/theme [Package] Token List /packages/token-list [Package] UI /packages/ui [Package] Url /packages/url [Package] Viewport /packages/viewport [Package] Views /packages/views [Package] Warning /packages/warning [Package] Widget Dashboard /packages/widget-dashboard [Package] Widget primitives /packages/widget-primitives [Package] Word count /packages/wordcount [Package] wp-build /packages/wp-build [Tool] Babel plugin import JSX pragma /packages/babel-plugin-import-jsx-pragma [Tool] Babel plugin makepot /packages/babel-plugin-makepot [Tool] Babel preset /packages/babel-preset-default [Tool] Browserslist config /packages/browserslist-config [Tool] Dependency Extraction Webpack Plugin /packages/dependency-extraction-webpack-plugin [Tool] Docgen /packages/docgen [Tool] Env /packages/env [Tool] ESLint plugin /packages/eslint-plugin [Tool] npm-package-json-lint config /packages/npm-package-json-lint-config [Tool] Prettier config /packages/prettier-config [Tool] Readable JS Assets Webpack Plugin /packages/readable-js-assets-webpack-plugin [Tool] stylelint config /packages/stylelint-config [Tool] WP Scripts /packages/scripts [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants