Skip to content

Commit cd8697d

Browse files
authored
Merge branch 'main' into upgrade-github-actions-node24-general
2 parents b858336 + 3252ee5 commit cd8697d

78 files changed

Lines changed: 2721 additions & 1510 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/build-upstream/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ runs:
4040
packages/cli/binding/index.d.cts
4141
target/${{ inputs.target }}/release/vp
4242
target/${{ inputs.target }}/release/vp.exe
43+
target/${{ inputs.target }}/release/vp-shim.exe
4344
key: ${{ steps.cache-key.outputs.key }}
4445

4546
# Apply Vite+ branding patches to rolldown-vite source (CI checks out
@@ -111,6 +112,11 @@ runs:
111112
shell: bash
112113
run: cargo build --release --target ${{ inputs.target }} -p vite_global_cli
113114

115+
- name: Build trampoline shim binary (Windows only)
116+
if: steps.cache-restore.outputs.cache-hit != 'true' && contains(inputs.target, 'windows')
117+
shell: bash
118+
run: cargo build --release --target ${{ inputs.target }} -p vite_trampoline
119+
114120
- name: Save NAPI binding cache
115121
if: steps.cache-restore.outputs.cache-hit != 'true'
116122
uses: actions/cache/save@94b89442628ad1d101e352b7ee38f30e1bef108e # v5
@@ -123,6 +129,7 @@ runs:
123129
packages/cli/binding/index.d.cts
124130
target/${{ inputs.target }}/release/vp
125131
target/${{ inputs.target }}/release/vp.exe
132+
target/${{ inputs.target }}/release/vp-shim.exe
126133
key: ${{ steps.cache-key.outputs.key }}
127134

128135
# Build vite-plus TypeScript after native bindings are ready

.github/renovate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"vite_path",
2222
"vite_str",
2323
"vite_task",
24-
"vite_workspace"
24+
"vite_workspace",
25+
"https://github.com/voidzero-dev/vite-task"
2526
],
2627
"enabled": false
2728
}

.github/workflows/ci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,21 @@ defaults:
2323
shell: bash
2424

2525
jobs:
26+
optimize-ci:
27+
runs-on: ubuntu-latest # or whichever runner you use for your CI
28+
outputs:
29+
skip: ${{ steps.check_skip.outputs.skip }}
30+
steps:
31+
- name: Optimize CI
32+
id: check_skip
33+
uses: withgraphite/graphite-ci-action@ee395f3a78254c006d11339669c6cabddf196f72
34+
with:
35+
graphite_token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
36+
2637
detect-changes:
2738
runs-on: ubuntu-latest
39+
needs: optimize-ci
40+
if: needs.optimize-ci.outputs.skip == 'false'
2841
permissions:
2942
contents: read
3043
pull-requests: read
@@ -404,7 +417,7 @@ jobs:
404417
vp upgrade --check
405418
406419
# full upgrade: download, extract, swap
407-
vp upgrade --tag alpha --force
420+
vp upgrade --force
408421
vp --version
409422
vp env doctor
410423
@@ -450,7 +463,7 @@ jobs:
450463
vp upgrade --check
451464
452465
# full upgrade: download, extract, swap
453-
vp upgrade --tag alpha --force
466+
vp upgrade --force
454467
vp --version
455468
vp env doctor
456469
@@ -489,7 +502,7 @@ jobs:
489502
vp upgrade --check
490503
491504
REM full upgrade: download, extract, swap
492-
vp upgrade --tag alpha --force
505+
vp upgrade --force
493506
vp --version
494507
vp env doctor
495508

.github/workflows/claude.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Claude Code
2+
3+
on:
4+
issues:
5+
types: [assigned]
6+
7+
jobs:
8+
analyze:
9+
if: github.repository == 'voidzero-dev/vite-plus' && github.event.action == 'assigned' && github.event.assignee.login == 'boshen' && github.event.sender.login == 'boshen'
10+
runs-on: ubuntu-slim
11+
permissions:
12+
contents: read
13+
issues: write
14+
id-token: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
fetch-depth: 100
20+
persist-credentials: true
21+
22+
- name: Run Claude Code
23+
id: claude
24+
uses: anthropics/claude-code-action@26ec041249acb0a944c0a47b6c0c13f05dbc5b44 # v1.0.70
25+
with:
26+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
27+
claude_args: --allowedTools "Read,Glob,Grep,Bash(gh:*),Bash(cargo:*),Bash(git:*),WebFetch"
28+
issue_number: ${{ github.event.issue.number }}
29+
prompt: |
30+
Analyze the linked issue and determine if it can be fixed.
31+
32+
1. Search the codebase to gather relevant context (related files, existing implementations, tests)
33+
2. Determine if the issue is fixable and estimate the complexity
34+
35+
Post a comment on the issue with:
36+
- A brief summary of your understanding of the issue
37+
- Relevant files/code you found
38+
- Whether this issue is fixable (yes/no/needs clarification)
39+
- If the issue is unclear, ask for more context
40+
- If fixable, provide a concrete implementation plan with specific steps
41+
- Any potential concerns or blockers

.github/workflows/e2e-test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
cd packages/cli && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
113113
# Copy vp binary for e2e-test job (findVpBinary expects it in target/)
114114
cp target/${{ matrix.target }}/release/vp tmp/tgz/vp 2>/dev/null || cp target/${{ matrix.target }}/release/vp.exe tmp/tgz/vp.exe 2>/dev/null || true
115+
cp target/${{ matrix.target }}/release/vp-shim.exe tmp/tgz/vp-shim.exe 2>/dev/null || true
115116
ls -la tmp/tgz
116117
117118
- name: Upload tgz artifacts
@@ -289,12 +290,16 @@ jobs:
289290
# Place vp binary where install-global-cli.ts expects it (target/release/)
290291
mkdir -p target/release
291292
cp tmp/tgz/vp target/release/vp 2>/dev/null || cp tmp/tgz/vp.exe target/release/vp.exe 2>/dev/null || true
293+
cp tmp/tgz/vp-shim.exe target/release/vp-shim.exe 2>/dev/null || true
292294
chmod +x target/release/vp 2>/dev/null || true
293295
node $GITHUB_WORKSPACE/packages/tools/src/install-global-cli.ts --tgz $GITHUB_WORKSPACE/tmp/tgz/vite-plus-0.0.0.tgz
294-
echo "$HOME/.vite-plus/bin" >> $GITHUB_PATH
296+
# Use USERPROFILE (native Windows path) instead of HOME (Git Bash path /c/Users/...)
297+
# so cmd.exe and Node.js execSync can resolve binaries in PATH
298+
echo "${USERPROFILE:-$HOME}/.vite-plus/bin" >> $GITHUB_PATH
295299
296300
- name: Migrate in ${{ matrix.project.name }}
297301
working-directory: ${{ runner.temp }}/vite-plus-ecosystem-ci/${{ matrix.project.name }}${{ matrix.project.directory && format('/{0}', matrix.project.directory) || '' }}
302+
shell: bash
298303
run: |
299304
node $GITHUB_WORKSPACE/ecosystem-ci/patch-project.ts ${{ matrix.project.name }}
300305
vp install --no-frozen-lockfile

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ jobs:
124124
path: |
125125
./target/${{ matrix.settings.target }}/release/vp
126126
./target/${{ matrix.settings.target }}/release/vp.exe
127+
./target/${{ matrix.settings.target }}/release/vp-shim.exe
127128
if-no-files-found: error
128129

129130
- name: Remove .node files before upload dist

.github/workflows/test-standalone-install.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defaults:
1919
shell: bash
2020

2121
env:
22-
VITE_PLUS_VERSION: latest
22+
VITE_PLUS_VERSION: alpha
2323

2424
jobs:
2525
test-install-sh:
@@ -131,7 +131,7 @@ jobs:
131131
run: |
132132
docker run --rm --platform linux/arm64 \
133133
-v "${{ github.workspace }}:/workspace" \
134-
-e VITE_PLUS_VERSION=latest \
134+
-e VITE_PLUS_VERSION=alpha \
135135
ubuntu:20.04 bash -c "
136136
ls -al ~/
137137
apt-get update && apt-get install -y curl ca-certificates
@@ -233,7 +233,7 @@ jobs:
233233
exit 1
234234
}
235235
236-
$expectedShims = @("node.cmd", "npm.cmd", "npx.cmd")
236+
$expectedShims = @("node.exe", "npm.exe", "npx.exe")
237237
foreach ($shim in $expectedShims) {
238238
$shimFile = Join-Path $binPath $shim
239239
if (-not (Test-Path $shimFile)) {
@@ -300,7 +300,7 @@ jobs:
300300
exit 1
301301
}
302302
303-
$expectedShims = @("node.cmd", "npm.cmd", "npx.cmd")
303+
$expectedShims = @("node.exe", "npm.exe", "npx.exe")
304304
foreach ($shim in $expectedShims) {
305305
$shimFile = Join-Path $binPath $shim
306306
if (-not (Test-Path $shimFile)) {
@@ -380,8 +380,8 @@ jobs:
380380
exit 1
381381
}
382382
383-
# Verify shim executables exist (all use .cmd wrappers on Windows)
384-
$expectedShims = @("node.cmd", "npm.cmd", "npx.cmd")
383+
# Verify shim executables exist (trampoline .exe files on Windows)
384+
$expectedShims = @("node.exe", "npm.exe", "npx.exe")
385385
foreach ($shim in $expectedShims) {
386386
$shimFile = Join-Path $binPath $shim
387387
if (-not (Test-Path $shimFile)) {
@@ -419,8 +419,8 @@ jobs:
419419
set "BIN_PATH=%USERPROFILE%\.vite-plus\bin"
420420
dir "%BIN_PATH%"
421421
422-
REM Verify shim executables exist (Windows uses .cmd wrappers)
423-
for %%s in (node.cmd npm.cmd npx.cmd vp.cmd) do (
422+
REM Verify shim executables exist (Windows uses trampoline .exe files)
423+
for %%s in (node.exe npm.exe npx.exe vp.exe) do (
424424
if not exist "%BIN_PATH%\%%s" (
425425
echo Error: Shim not found: %BIN_PATH%\%%s
426426
exit /b 1
@@ -462,22 +462,13 @@ jobs:
462462
exit 1
463463
fi
464464
465-
# Verify .cmd wrappers exist (for cmd.exe/PowerShell)
466-
for shim in node.cmd npm.cmd npx.cmd vp.cmd; do
465+
# Verify trampoline .exe files exist
466+
for shim in node.exe npm.exe npx.exe vp.exe; do
467467
if [ ! -f "$BIN_PATH/$shim" ]; then
468-
echo "Error: .cmd wrapper not found: $BIN_PATH/$shim"
468+
echo "Error: Trampoline shim not found: $BIN_PATH/$shim"
469469
exit 1
470470
fi
471-
echo "Found .cmd wrapper: $BIN_PATH/$shim"
472-
done
473-
474-
# Verify shell scripts exist (for Git Bash)
475-
for shim in node npm npx vp; do
476-
if [ ! -f "$BIN_PATH/$shim" ]; then
477-
echo "Error: Shell script not found: $BIN_PATH/$shim"
478-
exit 1
479-
fi
480-
echo "Found shell script: $BIN_PATH/$shim"
471+
echo "Found trampoline shim: $BIN_PATH/$shim"
481472
done
482473
483474
# Verify vp env doctor works

.husky/pre-commit

100644100755
File mode changed.

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Initial Setup
44

5+
### macOS / Linux
6+
57
You'll need the following tools installed on your system:
68

79
```
@@ -21,6 +23,28 @@ Initial setup to install dependencies for Vite+:
2123
just init
2224
```
2325

26+
### Windows
27+
28+
You'll need the following tools installed on your system. You can use [winget](https://learn.microsoft.com/en-us/windows/package-manager/).
29+
30+
```powershell
31+
winget install pnpm.pnpm OpenJS.NodeJS.LTS Casey.Just Kitware.CMake
32+
```
33+
34+
Install Rust & Cargo from [rustup.rs](https://rustup.rs/), then install `cargo-binstall`:
35+
36+
```powershell
37+
cargo install cargo-binstall
38+
```
39+
40+
Initial setup to install dependencies for Vite+:
41+
42+
```powershell
43+
just init
44+
```
45+
46+
**Note:** Run commands in PowerShell or Windows Terminal. Some commands may require elevated permissions.
47+
2448
## Build Vite+ and upstream dependencies
2549

2650
To create a release build of Vite+ and all upstream dependencies, run:

0 commit comments

Comments
 (0)