Skip to content

Commit 2d0c478

Browse files
committed
fix: update vite-task rev and fix CI snap test failures
- Update vite-task to 7d49f24f (summary-output e2e tests, fspy revert) - Strip ANSI escape codes in replaceUnstableOutput — third-party tools like rolldown emit ANSI on stderr even with NO_COLOR, causing [33m fragments in snap output on Linux/Windows - Add .gitignore with 'node_modules' to ignore_dist, plain-terminal-ui-nested, and oxlint-typeaware fixtures to prevent oxlint from traversing node_modules/.vite/task-cache (causes spurious cache misses) - Update ignore_dist snap: now correctly shows cache hit after adding .gitignore - Update command-helper/command-vp-alias snaps: ANSI stripped from clap help output
1 parent 78b0d2a commit 2d0c478

File tree

9 files changed

+766
-584
lines changed

9 files changed

+766
-584
lines changed

Cargo.lock

Lines changed: 701 additions & 547 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ dunce = "1.0.5"
8282
fast-glob = "1.0.0"
8383
flate2 = { version = "=1.1.5", features = ["zlib-rs"] }
8484
form_urlencoded = "1.2.1"
85-
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "fcc662b94410e6f68dececfe8ebf099eb7487ab6" }
85+
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
8686
futures = "0.3.31"
8787
futures-util = "0.3.31"
8888
glob = "0.3.2"
@@ -181,14 +181,14 @@ vfs = "0.12.1"
181181
vite_command = { path = "crates/vite_command" }
182182
vite_error = { path = "crates/vite_error" }
183183
vite_js_runtime = { path = "crates/vite_js_runtime" }
184-
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "fcc662b94410e6f68dececfe8ebf099eb7487ab6" }
184+
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
185185
vite_install = { path = "crates/vite_install" }
186186
vite_migration = { path = "crates/vite_migration" }
187187
vite_shared = { path = "crates/vite_shared" }
188-
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "fcc662b94410e6f68dececfe8ebf099eb7487ab6" }
189-
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "fcc662b94410e6f68dececfe8ebf099eb7487ab6" }
190-
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "fcc662b94410e6f68dececfe8ebf099eb7487ab6" }
191-
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "fcc662b94410e6f68dececfe8ebf099eb7487ab6" }
188+
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
189+
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
190+
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
191+
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
192192
walkdir = "2.5.0"
193193
wax = "0.6.0"
194194
which = "8.0.0"

packages/cli/snap-tests/command-helper/snap.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
> vp -h # help message
22
Vite+/<semver>
33

4-
Usage: vp <COMMAND>
5-
6-
Core Commands:
7-
dev Run the development server
8-
build Build for production
9-
test Run tests
10-
lint Lint code
11-
fmt Format code
12-
pack Build library
13-
run Run tasks
14-
preview Preview production build
15-
cache Manage the task cache
16-
17-
Package Manager Commands:
18-
install Install all dependencies, or add packages if package names are provided
4+
Usage: vp <COMMAND>
5+
6+
Core Commands:
7+
dev Run the development server
8+
build Build for production
9+
test Run tests
10+
lint Lint code
11+
fmt Format code
12+
pack Build library
13+
run Run tasks
14+
preview Preview production build
15+
cache Manage the task cache
16+
17+
Package Manager Commands:
18+
install Install all dependencies, or add packages if package names are provided
1919

2020
Options:
2121
-h, --help Print help

packages/cli/snap-tests/command-vp-alias/snap.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
> vp -h # vp should show help same as vite
22
Vite+/<semver>
33

4-
Usage: vp <COMMAND>
5-
6-
Core Commands:
7-
dev Run the development server
8-
build Build for production
9-
test Run tests
10-
lint Lint code
11-
fmt Format code
12-
pack Build library
13-
run Run tasks
14-
preview Preview production build
15-
cache Manage the task cache
16-
17-
Package Manager Commands:
18-
install Install all dependencies, or add packages if package names are provided
4+
Usage: vp <COMMAND>
5+
6+
Core Commands:
7+
dev Run the development server
8+
build Build for production
9+
test Run tests
10+
lint Lint code
11+
fmt Format code
12+
pack Build library
13+
run Run tasks
14+
preview Preview production build
15+
cache Manage the task cache
16+
17+
Package Manager Commands:
18+
install Install all dependencies, or add packages if package names are provided
1919

2020
Options:
2121
-h, --help Print help
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Prevent oxlint from scanning node_modules.
2+
# Without this, oxlint reads files in node_modules/.vite/task-cache, causing
3+
# fspy to fingerprint the cache directory as an input. The cache directory
4+
# changes between runs (DB writes, last-summary.json), producing flaky
5+
# cache-miss reasons that alternate between '' and
6+
# 'node_modules/.vite/task-cache'.
7+
node_modules

packages/cli/snap-tests/ignore_dist/snap.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ Finished in <variable>ms on 1 file with <variable> rules using <variable> thread
66

77
> mkdir dist
88
> vp run lint # new dist folder should not invalidate cache
9-
$ vp lint cache miss: content of input 'node_modules/.vite/task-cache' changed, executing
9+
$ vp lint cache hit, replaying
1010
Found 0 warnings and 0 errors.
1111
Finished in <variable>ms on 1 file with <variable> rules using <variable> threads.
1212

13+
---
14+
[vp run] cache hit, <variable>ms saved.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Prevent oxlint from scanning node_modules.
2+
# Without this, oxlint reads files in node_modules/.vite/task-cache, causing
3+
# fspy to fingerprint the cache directory as an input. The cache directory
4+
# changes between runs (DB writes, last-summary.json), producing flaky
5+
# cache-miss reasons that alternate between '' and
6+
# 'node_modules/.vite/task-cache'.
7+
node_modules
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Prevent oxlint from scanning node_modules.
2+
# Without this, oxlint reads files in node_modules/.vite/task-cache, causing
3+
# fspy to fingerprint the cache directory as an input. The cache directory
4+
# changes between runs (DB writes, last-summary.json), producing flaky
5+
# cache-miss reasons that alternate between '' and
6+
# 'node_modules/.vite/task-cache'.
7+
node_modules

packages/tools/src/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import path from 'node:path';
44
import { Minimatch } from 'minimatch';
55

66
export function replaceUnstableOutput(output: string, cwd?: string) {
7+
// Strip ANSI escape codes first. Tests set NO_COLOR=1 so vp output is clean,
8+
// but third-party tools (e.g. rolldown) may still emit ANSI codes on stderr
9+
// that leak into the captured output.
10+
// eslint-disable-next-line no-control-regex
11+
output = output.replaceAll(/\x1b\[[0-9;]*m/g, '');
712
if (cwd) {
813
output = output.replaceAll(cwd, '<cwd>');
914
if (path.dirname(cwd) !== '/') {

0 commit comments

Comments
 (0)