feat(tools): install Vite+ releases - #7338
afonsojramos wants to merge 6 commits into
Conversation
## Summary Vite+ releases can now tell external automation how to align Vite+, Vite+ core, Vitest, and official Vitest packages without reading or changing the project itself. This provides the release-owned compatibility contract needed to prevent dependency bots from producing mixed toolchains. This is the first part of a three-repository integration. Containerbase installation and Renovate reconciliation follow after this contract ships in a Vite+ release. ## Design - `vp sync-versions --json` accepts bounded manifest snapshots over stdin and returns deterministic before/after replacements. - Planning updates only existing managed declarations. It preserves catalog protocols, JSON formatting, and YAML comments, quoting, indentation, and line endings. - The command does not load project configuration, run installs or lifecycle scripts, format source, or write to the repository. - Both the npm CLI and standalone archive expose the same protocol. Release archives include the self-contained planner, toolchain manifest, and checksums needed for verified installation. ## Validation - Planner, protocol, package-override, and migration suites: 395 tests passed. - Focused sync-version suites: 39 tests passed. - Global CLI Rust suite: 486 tests passed, 2 ignored. - CLI TypeScript build, optimized Rust build, npm entrypoint smoke test, and standalone archive-layout simulation passed. - Scoped formatting, lint, type checks, and `git diff --check` passed. Related: #2356 Downstream drafts: - containerbase/base#7338 - renovatebot/renovate#45630 --------- Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
|
Upstream update: voidzero-dev/vite-plus#2600 has merged. This draft is now waiting for a Vite+ release containing Once that ships, I'll validate |
Exercise Vite+ 0.3.1 installation and dependency alignment on both Linux architectures and in the distro test matrix. Check repeat execution and verify that project manifests and configuration remain unchanged.
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds Vite+ ( ChangesVite+ support
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant install-tool
participant VpInstallService
participant HttpService
participant CompressionService
install-tool->>VpInstallService: Install vp version
VpInstallService->>HttpService: Check and download release metadata
VpInstallService->>HttpService: Download checksum-verified archive
VpInstallService->>CompressionService: Extract archive into versioned bin directory
VpInstallService->>install-tool: Link and test vp
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. (5 skipped: 5 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Group Vite+ with its Node parent and keep planner smoke tests in the Node images. Use released download examples and assert the actual version-check command.
|
@viceice, can you take another look? Thanks 🙏 |
Address review feedback on containerbase#7338 with promises and execa. Bundle the fixture with the existing locked dependencies for both Node test images, and simplify the distro check to a direct versioned install.
|
@viceice Thanks for the review and clarification! The distro checks are installation-only and now use the simpler versioned install you suggested. The functional checks remain in the Node images. |
| "bats": "node tools/bats.js --timing --verbose-run", | ||
| "build": "run-s 'build:*'", | ||
| "build:cli": "node tools/build.js", | ||
| "build:test": "rolldown test/node/vp/sync-versions.mjs --platform node --format esm --file dist/test/vp-sync-versions.mjs", |
There was a problem hiding this comment.
why rolldown? our node version should be new enough to allow esm with top-level await by default
There was a problem hiding this comment.
Apologies, had this locally for testing. Have undone the change
| ARG VP_VERSION=0.3.1 | ||
| RUN install-tool vp "${VP_VERSION}" | ||
|
|
||
| COPY dist/test/vp-sync-versions.mjs /test/vp-sync-versions.mjs |
There was a problem hiding this comment.
⚠️ Bug: Docker COPY targets unbuilt dist/test/vp-sync-versions.mjs
Both node Dockerfiles run COPY dist/test/vp-sync-versions.mjs /test/vp-sync-versions.mjs, and .dockerignore was updated to un-ignore dist/test, but the planner script lives at test/node/vp/sync-versions.mjs. The build pipeline (tools/build.js) only populates dist/docker, dist/app, dist/package.json and dist/cli; no step copies/renames test/node/vp/sync-versions.mjs to dist/test/vp-sync-versions.mjs. Unless such a copy step is added, the COPY layer fails with "file not found" and the test-vp stage cannot build. Add a build step that emits dist/test/vp-sync-versions.mjs (or point the COPY at the actual source path).
Emit the planner script to dist/test during build so the Docker COPY resolves.:
# in tools/build.js, add after the docker copy step:
shell.mkdir('-p', 'dist/test');
shell.cp('test/node/vp/sync-versions.mjs', 'dist/test/vp-sync-versions.mjs');
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
Code Review
|
| Auto-apply | Compact |
|
|
Important
Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.
Was this helpful? React with 👍 / 👎 | Gitar
Summary
Containerbase can install an exact Vite+ release as
vp, giving downstream tools a verified way to run the compatibility planner owned by that release.This is the second part of the Vite+ dependency-alignment integration. The planner from voidzero-dev/vite-plus#2600 is now available in Vite+ 0.3.1. The downstream Renovate integration is in renovatebot/renovate#45630.
Design
vp-checksums.txt.vp, planner sidecar, and toolchain manifest retain the release layout expected by the global CLI.Validation
git diff --checkpassed.linux/amd64andlinux/arm64) installed Vite+ 0.3.1 and ran the bundledsync-versions --jsonplanner as a non-root user.Summary by CodeRabbit
New Features
vp) tool.Documentation
Tests