Skip to content

Commit 84ad6ae

Browse files
authored
Merge branch 'main' into feat/cli-completion
2 parents 9fb37ec + 5e77c9b commit 84ad6ae

20 files changed

Lines changed: 194 additions & 348 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# My Custom Claude Instructions
2+
3+
Do not modify this file.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "command-config-no-agent-writes"
3+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
> git init
2+
> vp config
3+
> cat CLAUDE.md # should be unchanged
4+
# My Custom Claude Instructions
5+
6+
Do not modify this file.
7+
8+
> test -f AGENTS.md && echo 'AGENTS.md exists' || echo 'AGENTS.md not created' # should not exist
9+
AGENTS.md not created
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"commands": [
3+
{ "command": "git init", "ignoreOutput": true },
4+
"vp config",
5+
"cat CLAUDE.md # should be unchanged",
6+
"test -f AGENTS.md && echo 'AGENTS.md exists' || echo 'AGENTS.md not created' # should not exist"
7+
]
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "command-config-prepare-auto-hooks"
3+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
> git init
2+
> vp config # should install hooks automatically without prompting
3+
> git config --local core.hooksPath # should be .vite-hooks/_
4+
.vite-hooks/_
5+
6+
> cat .vite-hooks/pre-commit # should have vp staged
7+
vp staged
8+
9+
> cat vite.config.ts # should have staged config
10+
import { defineConfig } from 'vite-plus';
11+
12+
export default defineConfig({
13+
staged: {
14+
"*": "vp check --fix"
15+
},
16+
17+
});
18+
19+
> vp config # run again to ensure idempotent
20+
> cat .vite-hooks/pre-commit # should remain unchanged
21+
vp staged
22+
23+
> cat vite.config.ts # should remain unchanged
24+
import { defineConfig } from 'vite-plus';
25+
26+
export default defineConfig({
27+
staged: {
28+
"*": "vp check --fix"
29+
},
30+
31+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"env": {
3+
"npm_lifecycle_event": "prepare"
4+
},
5+
"commands": [
6+
{ "command": "git init", "ignoreOutput": true },
7+
"vp config # should install hooks automatically without prompting",
8+
"git config --local core.hooksPath # should be .vite-hooks/_",
9+
"cat .vite-hooks/pre-commit # should have vp staged",
10+
"cat vite.config.ts # should have staged config",
11+
"vp config # run again to ensure idempotent",
12+
"cat .vite-hooks/pre-commit # should remain unchanged",
13+
"cat vite.config.ts # should remain unchanged"
14+
]
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# My Project
2+
3+
Custom instructions here.
4+
5+
<!--VITE PLUS START-->
6+
7+
OUTDATED CONTENT THAT SHOULD BE REPLACED
8+
9+
<!--VITE PLUS END-->
10+
11+
More custom content below.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "command-config-update-agents"
3+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
> git init
2+
> vp config # should auto-update agent instructions
3+
> head -5 AGENTS.md # verify user content preserved
4+
# My Project
5+
6+
Custom instructions here.
7+
8+
<!--VITE PLUS START-->
9+
10+
> tail -3 AGENTS.md # verify user content preserved
11+
<!--VITE PLUS END-->
12+
13+
More custom content below.
14+
15+
> grep -q 'OUTDATED CONTENT' AGENTS.md && echo 'ERROR: outdated content still present' || echo 'outdated content replaced' # verify old content gone
16+
outdated content replaced

0 commit comments

Comments
 (0)