Bump vite and @vitejs/plugin-react-swc in /bwell-typescript-react#188
Bump vite and @vitejs/plugin-react-swc in /bwell-typescript-react#188dependabot[bot] wants to merge 1 commit into
Conversation
| "@vitejs/plugin-react-swc": "^4.3.1", | ||
| "eslint": "^8.57.0", | ||
| "eslint-plugin-react-hooks": "^4.6.0", | ||
| "eslint-plugin-react-refresh": "^0.4.6", | ||
| "playwright": "^1.56.1", | ||
| "toml": "^3.0.0", | ||
| "typescript": "^5.4.5", | ||
| "vite": "^7.1.11" | ||
| "vite": "^8.1.2" |
There was a problem hiding this comment.
🟣 The devcontainer Dockerfile (bwell-typescript-react/.devcontainer/Dockerfile:4) pins FROM node:21, which doesn't satisfy the ^20.19.0 || >=22.12.0 engine range declared by Vite (already in Vite 7) and now also by @vitejs/plugin-react-swc@4 and Vite 8's new rolldown native bindings. This is a pre-existing inconsistency (README.md:8 already says "Node 22 (or higher)"), but this PR makes it more likely to bite — worth bumping the Dockerfile to node:22 (or node:20 at 20.19+) in a follow-up.
Extended reasoning...
What the bug is
The devcontainer Dockerfile at bwell-typescript-react/.devcontainer/Dockerfile line 4 reads:
FROM node:21This is the image used by the documented test workflow — README.md lines 22-29 explicitly direct users to "Reopen in container" and then run npm run e2e. The container's postCreateCommand runs npm install.
After this PR, the resolved lockfile contains several packages declaring engines: { node: "^20.19.0 || >=22.12.0" }:
vite@8.1.2@vitejs/plugin-react-swc@4.3.1(the 3.x line had noenginesfield)rolldown@1.1.3and every@rolldown/binding-*native binding (e.g.@rolldown/binding-linux-x64-gnu)
The caret ^20.19.0 resolves to >=20.19.0 <21.0.0. Node 21.x sits in the gap between the two disjuncts and satisfies neither side of the OR.
Step-by-step proof
- User follows
README.md→ "Reopen in container" → image is built fromnode:21(e.g.node:21.7.x). postCreateCommandrunsnpm install. The package manifest now requiresvite@^8.1.2and@vitejs/plugin-react-swc@^4.3.1.- npm walks the lockfile and resolves dozens of packages whose
engines.nodefield excludes Node 21. Each one emits anEBADENGINEwarning. Install completes (npm is non-strict by default), so the user sees a wall of warnings but believes the install succeeded. - The
@rolldown/binding-*packages are optionalDependencies ofrolldown. With non-strict engines they still install on Node 21, but their N-API/ABI was compiled against the Node 20.19+/22.12+ baseline — the binding may load, may throw atrequiretime, or may silently misbehave when invoked. Even when it loads, the user is running on an EOL (2024-06-01) runtime that the toolchain author did not test against. npm run e2e→vite build→ loads rolldown → either fails outright or runs on an unsupported configuration.
Why this is pre_existing rather than normal
The verifiers split on severity. The strongest counter is that Vite 7.1.11 already declared the same engines: { node: "^20.19.0 || >=22.12.0" } — this constraint was introduced in Vite 7.0, not Vite 8. So the EBADENGINE warning on Node 21 was already happening before this PR, and README.md already documents Node 22+ as the requirement. The Dockerfile has been inconsistent with both the docs and the prior Vite 7 engine range for some time, and this PR doesn't touch the Dockerfile.
What this PR does change is the failure surface: @vitejs/plugin-react-swc 3.x had no engines field at all, and Vite 7 used rollup + esbuild (which accept Node ≥18). Vite 8 swaps to rolldown with engine-gated native bindings, so the consequences of running on Node 21 are now more concrete than just a startup warning.
How to fix
Bump bwell-typescript-react/.devcontainer/Dockerfile line 4 to either:
FROM node:22(matching what README.md already states) or FROM node:20 if you want the LTS lower bound (and pin to a tag at 20.19+). This is a one-line change and brings the devcontainer in line with both the documented requirement and what the dependency tree actually asks for. Recommend doing it in a follow-up commit since it's not introduced by this dependabot bump.
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) and [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react-swc). These dependencies needed to be updated together. Updates `vite` from 7.1.11 to 8.1.4 - [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/v8.1.4/packages/vite) Updates `@vitejs/plugin-react-swc` from 3.10.2 to 4.3.1 - [Release notes](https://github.com/vitejs/vite-plugin-react/releases) - [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite-plugin-react/commits/v4.3.1/packages/plugin-react-swc) --- updated-dependencies: - dependency-name: "@vitejs/plugin-react-swc" dependency-version: 4.3.1 dependency-type: direct:development - dependency-name: vite dependency-version: 8.1.2 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
a1b95a7 to
e264ded
Compare
|
Superseded by #192. |
Bumps vite and @vitejs/plugin-react-swc. These dependencies needed to be updated together.
Updates
vitefrom 7.1.11 to 8.1.4Release notes
Sourced from vite's releases.
... (truncated)
Changelog
Sourced from vite's changelog.
... (truncated)
Commits
a477454release: v8.1.4ab5dafafeat(legacy): prefer oxc as minifier (fix #21973) (#22468)173a1b6fix(ssr): align named export function call stacktrace column with Node (#22829)575c32cfix(build): add workaround for building on stackblitz (#22840)72a5e21fix(optimizer): avoid optimizer run for transform request before init (#22852)a9539d6chore(deps): update dependency postcss-modules to v9 (#22867)70435b2docs: fix incorrect@defaultforserver.cors(#22859)2c4a217build: remove the custom onLog function (#22878)c581b55build: replace deprecatedonwarnwithonLog(#22741)ea22fb3refactor: eliminate ineffectiveDynamicImport warn (#22876)Updates
@vitejs/plugin-react-swcfrom 3.10.2 to 4.3.1Release notes
Sourced from @vitejs/plugin-react-swc's releases.
... (truncated)
Changelog
Sourced from @vitejs/plugin-react-swc's changelog.
... (truncated)
Commits
Maintainer changes
This version was pushed to npm by GitHub Actions, a new releaser for
@vitejs/plugin-react-swcsince your current version.