Repository navigation
study(deps): VitePress 2.0.0-alpha.17 for the docs site (addresses the nine open docs advisories) - #497
study(deps): VitePress 2.0.0-alpha.17 for the docs site (addresses the nine open docs advisories)#497Alajmah wants to merge 1 commit into
Conversation
Experimental branch for the VitePress upgrade study (Dependabot alert #105: vite <= 6.4.3, first patched 6.4.4). Not for merge without review. No stable VitePress release depends on a patched vite: every 1.x release depends on vite 5.x. 2.0.0-alpha.17 is the newest pre-release that still supports Node 20; alpha.18 and later require Node 22. docs/package.json: vitepress ^1.6.4 -> 2.0.0-alpha.17. docs/package-lock.json: resolved by npm. vite 5.4.21 -> 7.3.8. Local build on Windows with Node 22: 150 pages and 472 files, as on master. The visible text of 149 of the 150 pages differs only in the search button shortcut. Search works in a browser. npm audit of the lockfile reports 0 findings; on master it reports 3. Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com>
There was a problem hiding this comment.
🤖 AI Code Review — ✅ Approved
Confidence: high · Findings: 2
AI judgment: APPROVE · Evidence: COMPLETE · Authority: advisory
Evidence complete · 2/2 changed files accounted for
Other findings (2)
- [low] New toolchain raises Node requirement to ^20.19.0 || >=22.12.0 — verify docs build environments
- [low] Prerelease semver range may float to newer alphas or stable 2.x with different Node requirements
⚠️ unverified
🔮 Devil's Advocate (2 turns): 1 downgraded · 1 missed risk found
GitWire AI Review Gate (bundle-driven v2) · Structured schema · Scope-validated · Devil's Advocate · AI recommendation — maintainers and repository policy retain authority
Finding details (not annotatable inline)
-
[LOW] Prerelease semver range may float to newer alphas or stable 2.x with different Node requirements
If docs/package.json declares vitepress as '^2.0.0-alpha.17' (likely, given the cited line 16), npm's semver semantics for prerelease caret ranges mean the range matches other 2.0.0 prereleases >= alpha.17 AND any stable 2.x/2.y. The initial review flagged the Node constraint as an environment concern but missed that the manifest itself can drift: a lockfile-less install,
npm update, or fresh environment resolution could pull a newer alpha (with unknown breaking changes or its own Node floor, e.g., alpha.18+) or even the stable 2.0.0 release, silently reintroducing exactly the incompatibility class the review worried about. Mitigation is cheap: pin the exact alpha version and pair any added 'engines' field with engine-strict=true in .npmrc so it actually enforces.
| "type": "module", | ||
| "devDependencies": { | ||
| "vitepress": "^1.6.4", | ||
| "vitepress": "2.0.0-alpha.17", |
There was a problem hiding this comment.
[LOW] New toolchain raises Node requirement to ^20.19.0 || >=22.12.0 — verify docs build environments
The lockfile now pins vite 7.3.8 and @vitejs/plugin-vue 6.0.11, both of which declare engines "^20.19.0 || >=22.12.0" (previously vite 5.4.21 accepted "^18.0.0 || >=20.0.0"). Vite 7 relies on Node >= 20.19 runtime features, so any CI job, Docker stage, or local environment used to build/preview the docs on Node 18 or Node 20.0–20.18 will either emit EBADENGINE warnings or fail at runtime. The PR description shows Node 20 support was a deliberate reason to choose alpha.17 over alpha.18+, but nothing in this diff updates the docs build image/CI config to guarantee >= 20.19. Suggested fix: confirm (or explicitly pin/document) the Node version in the docs Dockerfile and CI workflows is >= 20.19 (e.g. node:22-alpine), and add the constraint to docs/package.json "engines" so npm fails fast with a clear message instead of a confusing runtime crash.
|
Both findings of the automated review were checked against this branch. Node requirement. vite 7.3.8 declares Floating range. An |
Decision recorded (maintainer, 2026-11-22)This pull request stays a draft and is not merged into production. Three things keep the merge on hold: the release is still an alpha, Node 20 is past end of life, and the interface tests have not covered the theme switch, the sidebar on small screens and the Mermaid diagrams. The published docs image does not install from its lockfile either. Dependabot alert #105 stays open. A clean An approval later needs four things first:
Vite is not forced onto the old VitePress with |
Interface comparison of the alpha.17 build with the current one (2026-11-22)This is progress on the second of the four conditions: the docs interface tested for function and appearance. HowBoth builds were made locally from the same sources, the current lockfile and the alpha.17 lockfile. A static server served each one, and a headless Chromium drove both at 1280×800 and at 390×844, in light and in dark. I compared three things: the computed style and position of 26 page elements, the behaviour of the theme switch and of the small-screen menu, and lossless screenshots pixel by pixel. Two loads of the same build give the same picture to the pixel, 0 pixels apart, so a difference between the builds is a real one. What is identical
What differs
The share of pixels that differ:
MermaidNeither build renders Mermaid. 29 pages hold a Mermaid block, and all 29 show it as source text in a code block. No Mermaid script is shipped. So this is not a difference between the builds. It is a gap in the published site today, and it needs its own decision: a Mermaid plugin for the docs, or the source display as it is. Not covered
Where the four conditions stand
|
Status
Experimental, and a draft. Merge and deployment need an independent review. Dependabot alert #105 stays open until a change like this is merged.
The advisories this addresses
Nine alerts are open on
docs/package-lock.json. With the lockfile in this PR,npm auditreports 0 findings. Dependabot re-evaluates its alerts after a merge.<= 6.4.3<= 6.4.3<= 6.4.3<= 6.4.3<= 6.4.3<= 6.4.1<= 6.4.2<= 6.4.2<= 0.24.2They sit in the Vite development server, in its
launch-editorhelper, and in esbuild's development server. Vite and esbuild run at build time. The published docs image isnginx:alpinewith the built static files, so this code is not in it.npm auditof the lockfile on master reports 3 of them (vite, esbuild, vitepress) and offers no fix. There is no lockfile-only fix: a patched vite needs a VitePress release that allows one.No stable VitePress release allows a patched vite
From the npm registry, 2026-11-22:
latest)^5.4.14^6.0.11^6.3.5^7.0.0^7.3.1^8.1.3next)^8.3.4Every stable release from 1.4.0 to 1.6.4 depends on vite 5.x. The 2.0 line has been in alpha since January 2025.
From alpha.18 on, VitePress drops Node 20. Node 20 reached end of life on 2026-04-30 in the Node.js release schedule; Node 22 runs to 2027-04-30 and Node 24 to 2028-04-30. This repository builds its images on
node:20-alpineand runs CI on Node 20.Two candidates, both measured
study/vitepress-alpha6, commit35ca102)Kbecomes⌘ Ctrl K)npm auditenginesexclude Node 20.19Linux builds, both manual CI runs on the candidate branches: 45065940624 (alpha.17) and 45065957207 (alpha.6).
Why alpha.17 is the candidate here
It is the newest pre-release that still runs on the Node this repository uses. Its vite is one major behind the current line; the vite of alpha.6 is two behind. alpha.6 changes less: its output is identical to today's. The choice between them is a decision, not a finding.
Compatibility changes in the 2.0 line, and their effect on this site
The site uses the default theme, no Vite plugin, no custom component, and local search with default options.
useLocalNavanduseSidebarremoved;vp-codeandvp-adaptive-themeclasses no longer added to code blocksglobOptionsofcreateContentLoadernarrowedcreateContentLoaderis not usedpostcssIsolateStylesdefaultmarkdown-it-attrsoff inside fenced code blocks;cjkFriendlyrenamed;lastUpdateddefaults to 0@includeof a missing file is now an errorWhat this PR changes
docs/package.json(vitepressto the exact version2.0.0-alpha.17) anddocs/package-lock.json, resolved by npm. Nothing else.Risks
docs/Dockerfilerunsnpm installfromdocs/package.json, so an image built after this PR would take VitePress 2.0.0-alpha.17 with whatever transitive versions resolve that day. Making that image install from the lockfile is a separate unit.Not verified