Skip to content

Commit 31e151e

Browse files
branchseerclaude
andcommitted
fix: revert wrong ANSI stripping fix and update vite-task to cc005960
The ANSI stripping added in 4754dbc was incorrect — the empty PR #625 proves rolldown doesn't break tests. The real issue was that clap help text contains ANSI codes which should be preserved in snapshots as-is. Changes: - Revert ANSI escape code stripping from replaceUnstableOutput - Restore command-helper and command-vp-alias snaps with ANSI codes - Update vite-task rev to cc005960 (includes flush fix for reporter) - Update cache-scripts-default snap: flush fix makes script stdout visible via Stdio::inherit() - Remove temporary local vite-task patch from Cargo.toml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2d0c478 commit 31e151e

File tree

6 files changed

+69
-72
lines changed

6 files changed

+69
-72
lines changed

Cargo.lock

Lines changed: 31 additions & 31 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 = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
85+
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
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 = "7d49f24fb40ada5d86fbb7541421d516c9f4dfef" }
184+
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
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 = "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" }
188+
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
189+
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
190+
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
191+
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
192192
walkdir = "2.5.0"
193193
wax = "0.6.0"
194194
which = "8.0.0"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
> vp run hello # cache should be disabled by default for package.json scripts
22
$ node hello.mjs ⊘ cache disabled: no cache config
3+
hello from script
34

45

56
> vp run hello # second run should also show cache disabled
67
$ node hello.mjs ⊘ cache disabled: no cache config
8+
hello from script
79

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

packages/tools/src/utils.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ 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, '');
127
if (cwd) {
138
output = output.replaceAll(cwd, '<cwd>');
149
if (path.dirname(cwd) !== '/') {

0 commit comments

Comments
 (0)