chore: upgrade vite-plus and use setup-vite-plus-action for Node.js setup#659
chore: upgrade vite-plus and use setup-vite-plus-action for Node.js setup#659
Conversation
…etup Use node-version input in setup-vite-plus-action instead of separate actions/setup-node steps. Rename vite CLI to vp in workflow commands.
📝 WalkthroughWalkthroughRemoved explicit Node.js setup from GitHub Actions, passed node-version into the Setup Vite+ action, and switched CLI invocations from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @fengmk2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on modernizing the project's foundational packages and streamlining the continuous integration pipeline. It updates key dependencies to ensure the development environment remains robust and current, while also making the CI workflows more efficient and consistent through simplified Node.js setup and standardized command usage. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request upgrades several dependencies, including vite-plus, and refactors the CI workflows. The dependency updates in package.json are mostly fine, but I've identified a significant inconsistency with the vitest dependency versioning. Pinning it in devDependencies while using @latest in overrides can lead to non-deterministic builds. My review includes a comment with a high severity to address this potential issue.
There was a problem hiding this comment.
Pull request overview
This PR upgrades vite-plus and related dependencies, modernizes the GitHub Actions workflows to use the new setup-vite-plus-action with integrated Node.js setup, and renames the CLI command from vite to vp in workflow files.
Changes:
- Upgraded dependencies: qs (6.14.1→6.15.0), undici (7.19.0→7.22.0),
@types/node(22.19.7→22.19.11), tshy (3.1.0→3.3.2) - Updated vite-plus packages to version 0.0.0-b1666489.20260220-0254
- Consolidated Node.js setup in workflows by using
node-versioninput insetup-vite-plus-actioninstead of separateactions/setup-nodesteps - Renamed CLI commands from
vitetovpin all GitHub Actions workflows
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Updated dependency versions (qs, undici, @types/node, tshy) and pinned vitest to specific vite-plus-test version |
| pnpm-lock.yaml | Lockfile updates reflecting all dependency version changes and vite-plus upgrades |
| .github/workflows/pkg.pr.new.yml | Removed redundant corepack enable and separate Node.js setup steps; added node-version to setup-vite-plus-action; renamed vite to vp commands |
| .github/workflows/nodejs.yml | Removed separate Node.js setup steps; added node-version to setup-vite-plus-action; renamed vite to vp commands in both typecheck and test jobs |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
package.json:135
- The vitest devDependency specifies a pinned version
0.0.0-b1666489.20260220-0254but both the root overrides section (line 114) and the pnpm.overrides section (line 135) still uselatest. This creates an inconsistency where the direct dependency is pinned but overrides allow any version. Consider either:
- Pinning both override sections to the same version:
"vitest": "npm:@voidzero-dev/vite-plus-test@0.0.0-b1666489.20260220-0254" - Or using
latestfor all three locations
This inconsistency could lead to unexpected behavior where different parts of the dependency tree resolve to different versions of vite-plus-test.
"vitest": "npm:@voidzero-dev/vite-plus-test@0.0.0-b1666489.20260220-0254"
},
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
},
"lint-staged": {
"*": [
"vite run lint --fix",
"vite fmt --no-error-on-unmatched-pattern"
]
},
"tshy": {
"exports": {
".": "./src/index.ts",
"./package.json": "./package.json"
}
},
"engines": {
"node": ">= 18.19.0"
},
"packageManager": "pnpm@10.28.1",
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
package.json (1)
110-110: Version mismatch between pinned nightly indevDependenciesandlatestinpnpm.overrides.The
vitestdevDependency is now pinned to a specific nightly build (0.0.0-b1666489.20260220-0254) whilepnpm.overrides.vitestremains at@voidzero-dev/vite-plus-test@latest. This creates two problems:
- Diverging resolution: Transitive packages requesting
vitest(including@vitest/coverage-v8's peer dependency) will receive@voidzero-dev/vite-plus-test@latest, whereas direct scripts run against the pinned nightly — potentially two different binaries in the same install.- Registry stability: Canary/nightly builds in
0.0.0-*ranges are sometimes pruned from registries, which would break fresh installs on any machine without a lockfile hit.Consider either aligning both to the pinned nightly for full reproducibility, or keeping both at
latestand relying on the lockfile for pinning:♻️ Option A — align overrides to the nightly pin
- "vitest": "npm:`@voidzero-dev/vite-plus-test`@latest" + "vitest": "npm:`@voidzero-dev/vite-plus-test`@0.0.0-b1666489.20260220-0254"(Apply the same change to both the root
overridesandpnpm.overrides.)♻️ Option B — revert devDependencies to `latest` and rely on lockfile
- "vitest": "npm:`@voidzero-dev/vite-plus-test`@0.0.0-b1666489.20260220-0254" + "vitest": "latest"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 110, The package.json currently pins "vitest" in devDependencies to a specific nightly ("0.0.0-b1666489.20260220-0254") while pnpm.overrides.vitest (and any root "overrides") point to `@voidzero-dev/vite-plus-test`@latest, causing inconsistent resolution; pick one approach and make both locations consistent: either set devDependencies."vitest" and pnpm.overrides.vitest (and root overrides if present) to the same nightly version string for reproducible installs, or change devDependencies."vitest" to `@voidzero-dev/vite-plus-test`@latest and make pnpm.overrides.vitest use `@voidzero-dev/vite-plus-test`@latest so the lockfile handles pinning—update both symbols ("vitest" in devDependencies, pnpm.overrides.vitest, and any top-level "overrides") accordingly..github/workflows/pkg.pr.new.yml (1)
18-18: Nit: quotenode-versionconsistently withnodejs.yml
node-version: 22is a YAML integer;nodejs.ymlusesnode-version: '24'(quoted string). GitHub Actions coerces both to strings, so it won't break — but a quoted value is more explicit and consistent.🔧 Proposed fix
- node-version: 22 + node-version: '22'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pkg.pr.new.yml at line 18, Change the unquoted YAML integer node-version to a quoted string to match the style used elsewhere: update the node-version key value from 22 to '22' (i.e., use node-version: '22') so it is explicitly a string and consistent with nodejs.yml.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/pkg.pr.new.yml:
- Line 18: Change the unquoted YAML integer node-version to a quoted string to
match the style used elsewhere: update the node-version key value from 22 to
'22' (i.e., use node-version: '22') so it is explicitly a string and consistent
with nodejs.yml.
In `@package.json`:
- Line 110: The package.json currently pins "vitest" in devDependencies to a
specific nightly ("0.0.0-b1666489.20260220-0254") while pnpm.overrides.vitest
(and any root "overrides") point to `@voidzero-dev/vite-plus-test`@latest, causing
inconsistent resolution; pick one approach and make both locations consistent:
either set devDependencies."vitest" and pnpm.overrides.vitest (and root
overrides if present) to the same nightly version string for reproducible
installs, or change devDependencies."vitest" to
`@voidzero-dev/vite-plus-test`@latest and make pnpm.overrides.vitest use
`@voidzero-dev/vite-plus-test`@latest so the lockfile handles pinning—update both
symbols ("vitest" in devDependencies, pnpm.overrides.vitest, and any top-level
"overrides") accordingly.
commit: |
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #659 +/- ##
=======================================
Coverage 92.77% 92.77%
=======================================
Files 10 10
Lines 747 747
Branches 233 233
=======================================
Hits 693 693
Misses 51 51
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 48-72: Update CLAUDE.md to replace all documented uses of the old
"vite" CLI with the new "vp" alias: change examples and commands such as "vite
lint" → "vp lint", "vite fmt" → "vp fmt", "vite test" → "vp test", "vite
install" → "vp install", "vite run" → "vp run", and update the entire "Review
Checklist" section to show the corresponding vp commands so the contributor
guide matches package.json and lint-staged usage.
| "lint": "vp lint src test --type-aware --type-check", | ||
| "typecheck": "tsc --noEmit && tsgo --noEmit", | ||
| "fmt": "vite fmt", | ||
| "fmtcheck": "vite fmt --check", | ||
| "prebuild": "vite run clean", | ||
| "build": "vite run build:ts && vite run build:version", | ||
| "fmt": "vp fmt", | ||
| "fmtcheck": "vp fmt --check", | ||
| "prebuild": "vp run clean", | ||
| "build": "vp run build:ts && vp run build:version", | ||
| "build:ts": "tsc --version && tshy && tshy-after", | ||
| "build:version": "node ./scripts/replace_urllib_version.js", | ||
| "build:cjs:test": "cd test/cjs && rm -rf node_modules && npm link ../.. && node index.js", | ||
| "build:esm:test": "cd test/esm && rm -rf node_modules && npm link ../.. && node index.js", | ||
| "build:mts:test": "cd test/mts && rm -rf node_modules && npm link ../.. && tsc", | ||
| "build:test": "vite run build && vite run build:cjs:test && vite run build:esm:test && vite run build:mts:test && vite run test-tsc", | ||
| "test-tsc": "vite run test-tsc:cjs:es2021 && vite run test-tsc:cjs && vite run test-tsc:esm", | ||
| "test-tsc:cjs": "cd test/fixtures/ts && rm -rf node_modules && npm link ../../.. && vite run build", | ||
| "test-tsc:cjs:es2021": "cd test/fixtures/ts-cjs-es2021 && rm -rf node_modules && npm link ../../.. && vite run build", | ||
| "test-tsc:esm": "cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && vite run build", | ||
| "test": "vite run lint -- --fix && vite test run --reporter=dot", | ||
| "bench": "vite test bench", | ||
| "test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vite test run --reporter=dot --test-timeout 180000 keep-alive-header.test.ts", | ||
| "build:test": "vp run build && vp run build:cjs:test && vp run build:esm:test && vp run build:mts:test && vp run test-tsc", | ||
| "test-tsc": "vp run test-tsc:cjs:es2021 && vp run test-tsc:cjs && vp run test-tsc:esm", | ||
| "test-tsc:cjs": "cd test/fixtures/ts && rm -rf node_modules && npm link ../../.. && vp run build", | ||
| "test-tsc:cjs:es2021": "cd test/fixtures/ts-cjs-es2021 && rm -rf node_modules && npm link ../../.. && vp run build", | ||
| "test-tsc:esm": "cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && vp run build", | ||
| "test": "vp run lint -- --fix && vp test run --reporter=dot", | ||
| "bench": "vp test bench", | ||
| "test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vp test run --reporter=dot --test-timeout 180000 keep-alive-header.test.ts", | ||
| "test-node16": "node examples/httpclient.cjs && node examples/search_github.cjs && node examples/timing.cjs", | ||
| "cov": "vite test run --reporter=dot --coverage", | ||
| "ci": "vite run cov && vite run prepublishOnly && npm pack && attw --pack", | ||
| "cov": "vp test run --reporter=dot --coverage", | ||
| "ci": "vp run cov && vp run prepublishOnly && npm pack && attw --pack", | ||
| "clean": "rm -rf dist && tsc -b --clean", | ||
| "prepublishOnly": "vite run build", | ||
| "prepublishOnly": "vp run build", | ||
| "prepare": "husky" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check repo structure and locate CLAUDE.md
git ls-files | head -20
echo "---"
# Look for CLAUDE.md
find . -maxdepth 2 -name "CLAUDE.md" -o -name "claude.md" 2>/dev/null
echo "---"
# Check current vite-plus version in package.json
head -100 package.json | grep -A 5 "vite-plus"Repository: node-modules/urllib
Length of output: 548
🏁 Script executed:
#!/bin/bash
# Check if vite-plus is installed and what binary it exports
if [ -f node_modules/vite-plus/package.json ]; then
echo "=== vite-plus package.json bin field ==="
jq '.bin' node_modules/vite-plus/package.json 2>/dev/null || \
python3 -c "import json; pkg=json.load(open('node_modules/vite-plus/package.json')); print('bin:', pkg.get('bin', {}))"
else
echo "vite-plus not found in node_modules"
# Try to find package info in package-lock or online sources
echo "=== Looking for vite-plus version info ==="
grep -A 2 '"vite-plus"' package.json package-lock.json 2>/dev/null | head -20
fiRepository: node-modules/urllib
Length of output: 268
🏁 Script executed:
#!/bin/bash
# Search for CLAUDE.md in the repo
find . -type f -name "CLAUDE.md" -o -name "claude.md" 2>/dev/null | head -5
# Also check what documentation files exist
git ls-files | grep -i "\.md$" | head -20Repository: node-modules/urllib
Length of output: 107
🏁 Script executed:
#!/bin/bash
# Read CLAUDE.md to check what it currently documents
cat CLAUDE.mdRepository: node-modules/urllib
Length of output: 6369
🏁 Script executed:
#!/bin/bash
# Read package.json lines around scripts and lint-staged
echo "=== Lines 48-72 (scripts section) ==="
sed -n '48,72p' package.json
echo ""
echo "=== Lines 118-119 (lint-staged) ==="
sed -n '118,119p' package.json
echo ""
echo "=== Check vite-plus entry ==="
sed -n '75,85p' package.jsonRepository: node-modules/urllib
Length of output: 2303
🌐 Web query:
vite-plus npm package vp binary command
💡 Result:
The vite-plus npm package installs two CLI binaries:
vitevp
In the package metadata, both commands point to the same executable (./bin/vite), so vp is just an alias of vite. [1]
That means you can run the same subcommands either way, e.g. vite dev / vp dev, vite build / vp build, etc. (Vite+’s CLI is described as adding commands like vite test, vite lint, vite fmt, vite run, etc.). [2]
Sources: [1] [2]
🌐 Web query:
vite-plus vp cli tool
💡 Result:
There isn’t a widely documented “vp” CLI for Vite+. What’s online points to two different things:
-
Vite+ (VoidZero) unified toolchain
Vite+ is a “drop-in superset of Vite” that aims to unify dev/build, test, lint, format, monorepo task running (with caching), UI devtools, and library bundling under a single CLI experience. The public overview lists these capabilities (dev & build, test, lint, fmt, run, ui, lib). [1] It was announced as a unified CLI/toolchain by VoidZero. [2] -
vpCLI is commonly “VersionPress CLI”
A knownvpcommand comes from@versionpress/vp-cli(“VersionPress.com CLI”), installed globally and run asvp. [3]
If you share where you saw “vite-plus vp” (a repo link, npm package name, or command snippet), I can pinpoint exactly which tool it refers to.
Sources: [1] [2] [3]
Update CLAUDE.md to reflect the renamed vp CLI
The vite → vp rename in scripts is correct and applied consistently across all package.json scripts (lines 48–72) and lint-staged (lines 118–119). The vp binary is a documented official alias exported by vite-plus alongside vite, so all commands will function correctly.
However, CLAUDE.md still documents vite commands (vite lint, vite fmt, vite test, vite install). Since this file guides contributors and is the source of project learnings, update it to reference vp instead so the stored guidance remains accurate:
- Change
vite lint→vp lint - Change
vite fmt→vp fmt - Change
vite test→vp test - Change
vite install→vp install - Change
vite run→vp run - Update the "Review Checklist" section to use
vpcommands
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` around lines 48 - 72, Update CLAUDE.md to replace all
documented uses of the old "vite" CLI with the new "vp" alias: change examples
and commands such as "vite lint" → "vp lint", "vite fmt" → "vp fmt", "vite test"
→ "vp test", "vite install" → "vp install", "vite run" → "vp run", and update
the entire "Review Checklist" section to show the corresponding vp commands so
the contributor guide matches package.json and lint-staged usage.
Summary
node-versioninput insetup-vite-plus-actioninstead of separateactions/setup-nodestepsviteCLI tovpin all workflow commandscorepack enablestep inpkg.pr.new.ymlTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit