chore(deps): bump vite from 7.3.2 to 8.0.3 - #4759
Conversation
8c84148 to
b088c67
Compare
pomfrida
left a comment
There was a problem hiding this comment.
Checked the PR — CI is all green and the changes look correct (package.json + lockfile only).
One thing to be aware of: Vite 8 replaces Rollup with Rolldown, and build.rollupOptions is deprecated in favor of build.rolldownOptions. We have 4 config files still using rollupOptions:
apps/eds-color-palette-generator/vite.config.tspackages/eds-tokens-sync/vite.config.tspackages/eds-tokens/vite.generate-variables.config.tspackages/eds-tokens-build/vite.config.ts
This works for now (Vite 8 has a compat layer), but should be renamed in a follow-up PR.
Otherwise looks good to merge 👍
|
Follow-up PR for the |
|
@claude review |
|
Claude finished @pomfrida's task in 58s —— View job PR Review:
|
| File | Change |
|---|---|
apps/eds-color-palette-generator/package.json |
vite ^7.3.1 → ^8.0.3 |
packages/eds-tailwind/package.json |
same |
packages/eds-tokens-build/package.json |
same |
packages/eds-tokens-sync/package.json |
same |
packages/eds-tokens/package.json |
same |
packages/eds-utils/package.json |
same |
pnpm-lock.yaml |
resolved versions updated |
Notable: rollupOptions deprecation (already tracked)
Vite 8 ships Rolldown as the bundler and deprecates build.rollupOptions in favour of build.rolldownOptions. Four configs still use the old key:
apps/eds-color-palette-generator/vite.config.ts:13packages/eds-tokens-sync/vite.config.ts:21packages/eds-tokens-build/vite.config.ts:41packages/eds-tokens/vite.generate-variables.config.ts:10
Vite 8 keeps a compatibility shim so these work for now, but they will produce deprecation warnings at build time. The follow-up is already tracked in #4762. Fix this →
Verdict
Looks good to merge. No issues with the bump itself. The rollupOptions follow-up in #4762 covers the one post-upgrade housekeeping item.
591255d to
96a85fb
Compare
|
Dependabot can't authenticate to a private package registry. Because of this, Dependabot cannot update this pull request. |
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.3.1 to 8.0.3. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/create-vite@8.0.3/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 8.0.3 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
96a85fb to
323e484
Compare
Vite 8 (Rolldown + lightningcss) bundles consumers re-process @equinor/eds-tokens CSS through lightningcss; without targets, lightningcss polyfills light-dark() into a :root-baked var() pattern that breaks [data-color-scheme="dark"] subtree scoping in production. Storybook regressed when this repo bumped to Vite 8 in #4759 (April 2026). Eliminate light-dark() from the published variables.min.css. The eds-tokens-build pipeline now emits explicit [data-color-scheme="dark"] scope rules plus a prefers-color-scheme media fallback for system dark mode. The output is correct on every browser at the EDS 2.0 baseline and is robust against any downstream CSS bundler. Also configures lightningcss targets in the eds-core-react Storybook Vite config so subsequent eds-tokens consumers can follow the same pattern. Fixes #4863
…#4864) * fix: emit explicit dark-scope rules instead of light-dark() in tokens Vite 8 (Rolldown + lightningcss) bundles consumers re-process @equinor/eds-tokens CSS through lightningcss; without targets, lightningcss polyfills light-dark() into a :root-baked var() pattern that breaks [data-color-scheme="dark"] subtree scoping in production. Storybook regressed when this repo bumped to Vite 8 in #4759 (April 2026). Eliminate light-dark() from the published variables.min.css. The eds-tokens-build pipeline now emits explicit [data-color-scheme="dark"] scope rules plus a prefers-color-scheme media fallback for system dark mode. The output is correct on every browser at the EDS 2.0 baseline and is robust against any downstream CSS bundler. Also configures lightningcss targets in the eds-core-react Storybook Vite config so subsequent eds-tokens consumers can follow the same pattern. Fixes #4863 * chore: revert unrelated build-generate-variables churn These minified build artifacts re-generate on every pipeline run with cosmetic differences (variable renames from the bundler) and are unrelated to the dark-scope fix. They should not have been included in the previous commit. * test: add unit tests for build-dark-scope Covers the four behaviours called out in the review: 1. light-dark() declarations are replaced with the light value and the three explicit scope blocks are appended 2. var(--ref) values inside light-dark() arguments are preserved correctly in both scopes 3. early-exit when no light-dark() declarations exist leaves the file unchanged 4. the explicit-dark and prefers-color-scheme media blocks declare the same set of dark values Also documents the regex limitation (one level of nested parens) in eds-tokens-build/CLAUDE.md so future contributors know when build-dark-scope.ts needs updating, and fixes a stray-space typo in the Storybook config comment. * refactor: extract build-time assertion to scripts/assert-no-light-dark.mjs The inline node -e assertion used CommonJS require() in a package declared as type: module, and was hard to read in diffs. Extract to a standalone ESM file using import. Behavior is identical: the script exits non-zero with a readable error if variables.min.css contains light-dark(), --lightningcss-* polyfill markers, or is missing the [data-color-scheme=dark] override rule. * refactor: widen :root selector instead of duplicating light scope The previous build-dark-scope output emitted a separate [data-color-scheme="light"] block whose declarations duplicated the light values already in :root — ~100 lines of pure repetition in variables.css. Replace that with selector widening: when a :root block contains light-dark() declarations, change its selector to `:root, [data-color-scheme="light"]`. This is the same pattern the existing color-scheme rule uses at the top of the file, and it preserves the nested-light-inside-dark behaviour (an explicit [data-color-scheme="light"] descendant of a dark scope re-applies the light values rather than inheriting dark). Verified with Playwright: a [data-color-scheme="light"] element nested inside the dark-mode story wrapper resolves --eds-color-bg-fill-muted-default to #e1e1e1 (light) rather than Adds a fifth unit test covering the case where multiple :root blocks exist but only the dual-bearing one is widened.
Bumps vite from 7.3.2 to 8.0.3.
Release notes
Sourced from vite's releases.
... (truncated)
Changelog
Sourced from vite's changelog.
... (truncated)
Commits
572aacarelease: v7.2.2728c8eefix: revert "refactor: use fs.cpSync (#21019)" (#21081)a532e68release: v7.2.182d2d6cfix(worker): some worker asset was missing (#21074)f83264frefactor(build): renameindexOfMatchInSlicetofindPreloadMarker(#21054)8293de0release: v7.2.02833c55fix(types): add undefined to optional properties for exactOptionalProperties ...e3a6a83chore(deps): update rolldown-related dependencies (#21047)b1fd616fix(css): fallback to sass when sass-embedded platform binary is missing (#21...ad5b3bffix(module-runner): makegetBuiltinsresponse JSON serializable (#21029)