Skip to content

Commit fd19e06

Browse files
authored
refactor: remove vp CLI cache feature (#16)
## Summary - Remove the vp CLI caching feature (`src/cache-vp.ts`) which was disabled due to Windows `Cannot find module 'which'` issue (#10) - Remove `force-install` test matrix dimension and `SETUP_VP_FORCE_INSTALL` env var from all CI jobs, halving the number of CI matrix combinations - Dependency caching (`cache: true`) is unaffected ## Test plan - [x] `vp run typecheck` passes - [x] `vp run test` passes (73 tests) - [x] `vp run check` passes - [x] `vp run build` succeeds 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 6401f38 commit fd19e06

File tree

8 files changed

+41
-394
lines changed

8 files changed

+41
-394
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616
version: [latest, alpha]
17-
force-install: [false, true]
1817
runs-on: ${{ matrix.os }}
19-
env:
20-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
2118
steps:
2219
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
2320

@@ -37,10 +34,7 @@ jobs:
3734
matrix:
3835
node-version: ["22", "24"]
3936
version: [latest, alpha]
40-
force-install: [false, true]
4137
runs-on: ubuntu-latest
42-
env:
43-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
4438
steps:
4539
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
4640

@@ -67,10 +61,7 @@ jobs:
6761
fail-fast: false
6862
matrix:
6963
version: [latest, alpha]
70-
force-install: [false, true]
7164
runs-on: ubuntu-latest
72-
env:
73-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
7465
steps:
7566
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
7667

@@ -101,10 +92,7 @@ jobs:
10192
fail-fast: false
10293
matrix:
10394
version: [latest, alpha]
104-
force-install: [false, true]
10595
runs-on: ubuntu-latest
106-
env:
107-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
10896
steps:
10997
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
11098

@@ -135,10 +123,7 @@ jobs:
135123
fail-fast: false
136124
matrix:
137125
version: [latest, alpha]
138-
force-install: [false, true]
139126
runs-on: ubuntu-latest
140-
env:
141-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
142127
steps:
143128
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
144129

@@ -170,10 +155,7 @@ jobs:
170155
matrix:
171156
os: [ubuntu-latest, macos-latest, windows-latest]
172157
version: [latest, alpha]
173-
force-install: [false, true]
174158
runs-on: ${{ matrix.os }}
175-
env:
176-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
177159
steps:
178160
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
179161

@@ -193,10 +175,7 @@ jobs:
193175
matrix:
194176
os: [ubuntu-latest, macos-latest, windows-latest]
195177
version: [latest, alpha]
196-
force-install: [false, true]
197178
runs-on: ${{ matrix.os }}
198-
env:
199-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
200179
steps:
201180
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
202181

@@ -228,10 +207,7 @@ jobs:
228207
fail-fast: false
229208
matrix:
230209
version: [latest, alpha]
231-
force-install: [false, true]
232210
runs-on: ubuntu-latest
233-
env:
234-
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
235211
steps:
236212
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
237213

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ GitHub Action to set up [Vite+](https://viteplus.dev) (`vp`) with dependency cac
55
## Features
66

77
- Install Vite+ globally via official install scripts
8-
- **Cache the Vite+ installation** to skip re-downloading on subsequent runs
98
- Optionally set up a specific Node.js version via `vp env use`
109
- Cache project dependencies with auto-detection of lock files
1110
- Optionally run `vp install` after setup
@@ -138,15 +137,6 @@ jobs:
138137

139138
## Caching
140139

141-
### Vite+ Installation Cache
142-
143-
The Vite+ CLI installation (`~/.vite-plus/`) is cached automatically on a best-effort basis — no configuration needed. If a cache key can be constructed for the resolved version, it will be saved and reused on subsequent runs. On cache hit, the install script is skipped entirely, saving 10–60s depending on network conditions.
144-
145-
The cache key includes OS, architecture, Vite+ version, and Node.js version:
146-
`setup-vp-{OS}-{arch}-{vp-version}-node{node-version}`
147-
148-
When the `version` input is a dist-tag (e.g. `latest`, `alpha`), it is resolved to a precise semver version via the npm registry before constructing the cache key. If version resolution fails (for example, due to npm registry/network issues or an unresolvable version/tag), no cache key is saved and the Vite+ installation will not be cached for that run.
149-
150140
### Dependency Cache
151141

152142
When `cache: true` is set, the action additionally caches project dependencies by auto-detecting your lock file:

dist/index.mjs

Lines changed: 35 additions & 35 deletions
Large diffs are not rendered by default.

src/cache-vp.test.ts

Lines changed: 0 additions & 207 deletions
This file was deleted.

0 commit comments

Comments
 (0)