Commit dd9f320
authored
fix(ci): pin rolldown binding version to match checked-out source (#597)
## Summary
- Pin the rolldown binding version in `download-rolldown-binaries` action to match the checked-out source, instead of fetching the latest from npm
- Remove the `VITE_TEST_BUILD=1 vp run tests-e2e#test` line from VitePress E2E (fix in follow-up #599)
## Background on the VitePress `VITE_TEST_BUILD=1` failure
There is a bug in vite's `ModuleRunner.directRequest()` where `dynamicRequest` uses the raw `url` parameter for relative path resolution (`posixResolve(posixDirname(url), dep)`). When a module is loaded via a `file://` URL (e.g. VitePress's `import(pathToFileURL(entryPath).href)`), `pathe.resolve` doesn't recognize `file://` as absolute, producing malformed paths like `<cwd>/file:<path>`.
### Why it doesn't happen with vanilla vitest
With vanilla vitest, VitePress is a regular npm dependency living in `node_modules/`. Vitest's externalization check (`id.includes('/node_modules/')`) returns `true`, so VitePress is **externalized** — loaded via native Node.js `import()` which handles `file://` URLs correctly. The module runner's `dynamicRequest` is never involved.
In vite-plus's ecosystem-ci, VitePress is a `workspace:*` dependency. Its files aren't in `node_modules/`, so it's **inlined** (SSR-transformed). Its `import(pathToFileURL(...))` becomes `__vite_ssr_dynamic_import__('file://...')`, which flows through `dynamicRequest` and hits the bug.
### Why it didn't fail before #588
Before #588, `vp test` commands had caching enabled. When CI ran `vp run tests-e2e#test` (without `VITE_TEST_BUILD`), it succeeded and created a cache entry. The next step `VITE_TEST_BUILD=1 vp run tests-e2e#test` ignored `VITE_TEST_BUILD` since it wasn't in the fingerprinted envs, hit the cache, and `vp test` never actually ran with `VITE_TEST_BUILD=1`. #588 disabled caching on `vp test` commands, so the second step actually ran for the first time and exposed the bug.
The fix is in follow-up #599.1 parent dca0482 commit dd9f320
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
| |||
0 commit comments