Skip to content

Commit 04de6c3

Browse files
committed
test(snapshot): single-package repos bypass elicitation
Bare vp build and vp pack in a standalone repo (no workspaces field) run in place even in an interactive terminal: no picker, no auto-select line, no listing. Guards resolution-order step 6 against regressions.
1 parent 507d6db commit 04de6c3

8 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!doctype html>
2+
<html>
3+
<body>
4+
<h1>single package</h1>
5+
</body>
6+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "name": "single-package", "private": true, "type": "module" }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[[case]]
2+
name = "build_in_place"
3+
vp = ["local", "global"]
4+
comment = """
5+
Regression guard: a single-package repo (no workspaces field) never goes
6+
through target elicitation. Bare vp build runs in place even in an
7+
interactive terminal: no picker, no Selected line, no listing
8+
(rfcs/cwd-flag.md, resolution order step "anywhere else").
9+
"""
10+
steps = [["vp", "build"]]
11+
12+
[[case]]
13+
name = "pack_in_place"
14+
vp = ["local", "global"]
15+
comment = "Same guard for vp pack: the standalone library packs in place via tsdown's default entry."
16+
steps = [
17+
["vp", "pack"],
18+
{ argv = ["vpt", "list-dir", "dist"], comment = "output lands in the repo itself" },
19+
]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# build_in_place
2+
3+
Regression guard: a single-package repo (no workspaces field) never goes
4+
through target elicitation. Bare vp build runs in place even in an
5+
interactive terminal: no picker, no Selected line, no listing
6+
(rfcs/cwd-flag.md, resolution order step "anywhere else").
7+
8+
## `vp build`
9+
10+
```
11+
VITE+ - The Unified Toolchain for the Web
12+
13+
vite <version> building client environment for production...
14+
✓ 2 modules transformed.
15+
computing gzip size...
16+
dist/index.html 0.07 kB │ gzip: 0.08 kB
17+
18+
✓ built in <duration>
19+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# build_in_place
2+
3+
Regression guard: a single-package repo (no workspaces field) never goes
4+
through target elicitation. Bare vp build runs in place even in an
5+
interactive terminal: no picker, no Selected line, no listing
6+
(rfcs/cwd-flag.md, resolution order step "anywhere else").
7+
8+
## `vp build`
9+
10+
```
11+
vite <version> building client environment for production...
12+
✓ 2 modules transformed.
13+
computing gzip size...
14+
dist/index.html 0.07 kB │ gzip: 0.08 kB
15+
16+
✓ built in <duration>
17+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# pack_in_place
2+
3+
Same guard for vp pack: the standalone library packs in place via tsdown's default entry.
4+
5+
## `vp pack`
6+
7+
```
8+
VITE+ - The Unified Toolchain for the Web
9+
10+
ℹ entry: src/index.ts
11+
ℹ Build start
12+
ℹ dist/index.mjs 0.11 kB │ gzip: 0.11 kB
13+
ℹ 1 files, total: 0.11 kB
14+
✔ Build complete in <duration>
15+
```
16+
17+
## `vpt list-dir dist`
18+
19+
output lands in the repo itself
20+
21+
```
22+
index.mjs
23+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# pack_in_place
2+
3+
Same guard for vp pack: the standalone library packs in place via tsdown's default entry.
4+
5+
## `vp pack`
6+
7+
```
8+
ℹ entry: src/index.ts
9+
ℹ Build start
10+
ℹ dist/index.mjs 0.11 kB │ gzip: 0.11 kB
11+
ℹ 1 files, total: 0.11 kB
12+
✔ Build complete in <duration>
13+
```
14+
15+
## `vpt list-dir dist`
16+
17+
output lands in the repo itself
18+
19+
```
20+
index.mjs
21+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function single(name: string): string {
2+
return `single ${name}`;
3+
}

0 commit comments

Comments
 (0)