Skip to content

Commit a148c27

Browse files
authored
Merge e6d3386 into 62a159a
2 parents 62a159a + e6d3386 commit a148c27

9 files changed

Lines changed: 149 additions & 175 deletions

File tree

‎package-lock.json‎

Lines changed: 140 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/theme/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
### Internal
1212

13+
- Update the Vite development dependency to 8.3.1. ([#83569](https://github.com/WordPress/gutenberg/pull/83569))
1314
- Restore color-scale Storybook accessibility checks with labeled color samples, readable seed labels, and keyboard scrolling ([#83358](https://github.com/WordPress/gutenberg/pull/83358)).
1415

1516
### Documentation

‎packages/theme/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"source-map": "^0.6.1",
113113
"storybook": "^10.5.3",
114114
"stylelint": "^17.14.1",
115-
"vite": "^8.2.2",
115+
"vite": "^8.3.1",
116116
"vitest": "^5.0.0",
117117
"vitest-browser-react": "^2.3.0"
118118
},

‎storybook/main.ts‎

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import path from 'node:path';
22
import { fileURLToPath } from 'node:url';
33
import { type InlineConfig, type PluginOption, mergeConfig } from 'vite';
44
import react from '@vitejs/plugin-react';
5+
import emotion from '@rolldown/plugin-emotion';
56
import type { StorybookConfig } from '@storybook/react-vite';
67
import dsTokenFallbacks from '@wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks';
78
import dsTokenFallbacksJs from '@wordpress/theme/vite-plugins/vite-ds-token-fallbacks';
8-
import babel from './vite-babel-plugin.js';
99
import { statusIndexer } from './status-indexer.js';
1010

1111
/**
@@ -132,22 +132,7 @@ const config: StorybookConfig = {
132132
plugins: [
133133
dsTokenFallbacksJs(),
134134
react() as PluginOption,
135-
// @rolldown/plugin-babel requires Node 22, but Gutenberg still
136-
// supports Node 20. Keep the same call shape so this fallback can
137-
// be replaced with the package after the Node upgrade.
138-
await babel( {
139-
generatorOpts: {
140-
decoratorsBeforeExport: true,
141-
importAttributesKeyword: 'with',
142-
},
143-
overrides: [
144-
{
145-
test: /x(?:$|\?)/,
146-
retainLines: NODE_ENV !== 'production',
147-
},
148-
],
149-
plugins: [ getAbsolutePath( '@emotion/babel-plugin' ) ],
150-
} ),
135+
emotion( { sourceMap: true } ),
151136
// Stub the vips and wasm-vips packages for Storybook since they use WASM modules that Vite can't handle.
152137
{
153138
name: 'stub-vips',

‎storybook/package.json‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,16 @@
2424
"./preview": "./preview.jsx"
2525
},
2626
"devDependencies": {
27-
"@babel/core": "^7.25.7",
2827
"@babel/types": "^7.29.7",
29-
"@emotion/babel-plugin": "^11.13.5",
3028
"@emotion/is-prop-valid": "^1.4.0",
3129
"@emotion/react": "^11.14.0",
3230
"@emotion/styled": "^11.14.1",
31+
"@rolldown/plugin-emotion": "^0.2.0",
3332
"@storybook/addon-a11y": "^10.5.3",
3433
"@storybook/addon-docs": "^10.5.3",
3534
"@storybook/addon-vitest": "^10.5.3",
3635
"@storybook/icons": "^2.0.1",
3736
"@storybook/react-vite": "^10.5.3",
38-
"@types/babel__core": "^7.20.5",
3937
"@types/js-yaml": "^3.12.10",
4038
"@types/react": "^18.3.27",
4139
"@vitejs/plugin-react": "^6.0.5",
@@ -76,7 +74,7 @@
7674
"storybook-addon-tag-badges": "^3.0.4",
7775
"terser": "^5.37.0",
7876
"typescript": "npm:@typescript/typescript6@^6.0.2",
79-
"vite": "^8.2.2",
77+
"vite": "^8.3.1",
8078
"vitest": "^5.0.0"
8179
},
8280
"publishConfig": {
@@ -87,7 +85,7 @@
8785
"postmanifest-snapshot": "prettier --write components-manifest.yml",
8886
"storybook:build": "NODE_OPTIONS=--max-old-space-size=8192 storybook build -c . -o ./build && node ./scripts/sanitize-components-manifest.mjs ./build/manifests/components.json && node ./scripts/inject-legacy-docgen.mjs ./build/manifests/components.json",
8987
"storybook:dev": "storybook dev -c . -p 50240",
90-
"test:smoke": "npm run test:smoke:build && vitest run --config vitest.config.ts",
88+
"test:smoke": "npm run test:smoke:build && vitest run --config vitest.config.mts",
9189
"test:smoke:build": "node ./scripts/smoke-static-build.mjs",
9290
"test:smoke:setup": "playwright install chromium --with-deps"
9391
}

‎storybook/vite-babel-plugin.ts‎

Lines changed: 0 additions & 66 deletions
This file was deleted.

‎storybook/vitest.setup.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* enough of them pile up it drops the page's connection to Vitest, which fails
55
* the run with "Browser connection was closed while running tests". A full
66
* garbage collection before each file keeps the page healthy. `gc` is exposed
7-
* by the `--js-flags=--expose-gc` launch argument in `vitest.config.ts`.
7+
* by the `--js-flags=--expose-gc` launch argument in `vitest.config.mts`.
88
*/
99
if ( typeof globalThis.gc !== 'function' ) {
1010
throw new Error(

‎test/unit/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"resize-observer-polyfill": "^1.5.1",
4343
"timezone-mock": "^1.3.6",
4444
"typescript": "npm:@typescript/typescript6@^6.0.2",
45-
"vite": "^8.2.2",
45+
"vite": "^8.3.1",
4646
"vitest": "^5.0.0",
4747
"yargs": "^17.3.0"
4848
},

0 commit comments

Comments
 (0)