Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,27 @@ jobs:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version: '24'

- name: Setup Vite+
uses: voidzero-dev/setup-vite-plus-action@v1
with:
node-version: '24'
cache: true
run-install: true

- name: Run lint
run: vite run lint
run: vp run lint

- name: Check dedupe
run: vite dedupe --check
run: vp dedupe --check

- name: Run typecheck
run: vite run typecheck
run: vp run typecheck

- name: Run format check
run: vite run fmtcheck
run: vp run fmtcheck

- name: Run build check
run: vite run build
run: vp run build

test:
strategy:
Expand All @@ -64,22 +60,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version: ${{ matrix.node }}

- name: Setup Vite+
uses: voidzero-dev/setup-vite-plus-action@v1
with:
node-version: ${{ matrix.node }}
cache: true
run-install: true

- name: Run lint
run: vite run lint
run: vp run lint

- name: Run tests
run: vite run ci
run: vp run ci

- name: Code Coverage
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: 22

- name: Setup Vite+
uses: voidzero-dev/setup-vite-plus-action@v1
with:
node-version: 22
cache: true
run-install: true

- name: Build
run: vite run build
run: vp run build

- run: vite dlx pkg-pr-new publish
- run: vp dlx pkg-pr-new publish
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,39 +45,39 @@
"tag": "latest"
},
"scripts": {
"lint": "vite lint src test --type-aware --type-check",
"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"
Comment on lines +48 to 72
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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
fi

Repository: 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 -20

Repository: node-modules/urllib

Length of output: 107


🏁 Script executed:

#!/bin/bash
# Read CLAUDE.md to check what it currently documents
cat CLAUDE.md

Repository: 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.json

Repository: 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:

  • vite
  • vp

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:

  1. 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]

  2. vp CLI is commonly “VersionPress CLI”
    A known vp command comes from @versionpress/vp-cli (“VersionPress.com CLI”), installed globally and run as vp. [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 vitevp 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 lintvp lint
  • Change vite fmtvp fmt
  • Change vite testvp test
  • Change vite installvp install
  • Change vite runvp run
  • Update the "Review Checklist" section to use vp commands
🤖 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.

},
"dependencies": {
"form-data": "^4.0.5",
"formstream": "^1.5.2",
"mime-types": "^2.1.35",
"qs": "^6.14.1",
"qs": "^6.15.0",
"type-fest": "^4.41.0",
"undici": "^7.19.0",
"undici": "^7.22.0",
"ylru": "^2.0.0"
},
"devDependencies": {
Expand All @@ -86,7 +86,7 @@
"@eggjs/tsconfig": "^2.0.0",
"@types/busboy": "^1.5.4",
"@types/mime-types": "^2.1.4",
"@types/node": "^22.19.7",
"@types/node": "^22.19.11",
"@types/proxy": "^1.0.4",
"@types/qs": "^6.14.0",
"@types/selfsigned": "^2.1.0",
Expand All @@ -103,7 +103,7 @@
"selfsigned": "^3.0.1",
"string.prototype.towellformed": "^1.0.2",
"tar-stream": "^2.2.0",
"tshy": "^3.1.0",
"tshy": "^3.3.2",
"tshy-after": "^1.4.1",
"typescript": "^5.9.3",
"vite-plus": "latest",
Expand All @@ -115,8 +115,8 @@
},
"lint-staged": {
"*": [
"vite run lint --fix",
"vite fmt --no-error-on-unmatched-pattern"
"vp run lint --fix",
"vp fmt --no-error-on-unmatched-pattern"
]
},
"tshy": {
Expand Down
Loading
Loading