Skip to content

Commit b1dfcc8

Browse files
authored
chore: migrate to Vite+ (vp) (#356)
* chore: use vite-plus * chore: disable keytar build in pnpm workspace configuration
1 parent 76fec93 commit b1dfcc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+850
-582
lines changed

.github/actions/setup-node-and-node-modules/action.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/check-generated-in-examples.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ jobs:
1414
runs-on: ubuntu-24.04-arm
1515
steps:
1616
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17-
- uses: ./.github/actions/setup-node-and-node-modules
17+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
1818
with:
1919
node-version: 22
20+
cache: true
2021
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
2122
with:
2223
path: |
@@ -25,6 +26,6 @@ jobs:
2526
tsconfig.tsbuildinfo
2627
key: check-generated-in-examples-${{ runner.arch }}-${{ runner.os }}-${{ github.sha }}
2728
restore-keys: check-generated-in-examples-${{ runner.arch }}-${{ runner.os }}
28-
- run: pnpm run update-generated-in-examples
29+
- run: vp run update-generated-in-examples
2930
- name: Check for uncommitted changes
3031
run: git diff --exit-code

.github/workflows/ci.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ jobs:
1717
runs-on: ubuntu-24.04-arm
1818
steps:
1919
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20-
- uses: ./.github/actions/setup-node-and-node-modules
20+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
2121
with:
2222
node-version: 22
23-
- run: pnpm run lint
23+
cache: true
24+
- run: vp check
2425
build:
2526
runs-on: ubuntu-24.04-arm
2627
steps:
2728
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28-
- uses: ./.github/actions/setup-node-and-node-modules
29+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
2930
with:
3031
node-version: 22
31-
- run: pnpm run build
32+
cache: true
33+
- run: vp run build
3234
test:
3335
strategy:
3436
fail-fast: false
@@ -38,9 +40,10 @@ jobs:
3840
runs-on: ${{ matrix.os }}
3941
steps:
4042
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41-
- uses: ./.github/actions/setup-node-and-node-modules
43+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
4244
with:
4345
node-version: ${{ matrix.node }}
46+
cache: true
4447
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
4548
with:
4649
path: |
@@ -50,20 +53,16 @@ jobs:
5053
tsconfig.tsbuildinfo
5154
key: test-tools-${{ runner.arch }}-${{ runner.os }}-node-${{ matrix.node }}-${{ github.sha }}
5255
restore-keys: test-tools-${{ runner.arch }}-${{ runner.os }}-node-${{ matrix.node }}
53-
- run: pnpm run test
56+
- run: vp test
5457
test-stylelint-v16:
5558
runs-on: ubuntu-24.04-arm
5659
steps:
5760
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
58-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
59-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
61+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
6062
with:
6163
node-version: 22
62-
- run: pnpm add -D -w stylelint@16
63-
- uses: ./.github/actions/setup-node-and-node-modules
64-
with:
65-
node-version: 22
66-
- run: pnpm run test -- packages/stylelint-plugin
64+
- run: vp add -D -w stylelint@16
65+
- run: vp test packages/stylelint-plugin
6766
vscode-test:
6867
strategy:
6968
fail-fast: false
@@ -73,9 +72,10 @@ jobs:
7372
runs-on: ${{ matrix.os }}
7473
steps:
7574
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
76-
- uses: ./.github/actions/setup-node-and-node-modules
75+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
7776
with:
7877
node-version: ${{ matrix.node }}
78+
cache: true
7979
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
8080
with:
8181
path: |
@@ -89,7 +89,7 @@ jobs:
8989
path: .vscode-test
9090
key: vscode-test-${{ runner.arch }}-${{ runner.os }}-vscode-${{ env.VSCODE_VERSION }}
9191

92-
- run: xvfb-run -a pnpm run vscode-test
92+
- run: xvfb-run -a vp run vscode-test
9393
if: runner.os == 'Linux'
94-
- run: pnpm run vscode-test
94+
- run: vp run vscode-test
9595
if: runner.os != 'Linux'

.github/workflows/release.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,30 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
23-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
22+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
2423
with:
2524
node-version: 24
26-
cache: 'pnpm'
27-
- run: pnpm install --frozen-lockfile
28-
- run: pnpm run build
25+
cache: true
26+
- run: vp run build
2927
- name: set release variables
3028
run: echo "date=$(date -u +'%Y-%m-%dT%H:%MZ')" >> $GITHUB_ENV
3129
- name: Create Release Pull Request or Publish to npm
3230
id: changesets
3331
uses: dotansimha/changesets-action@069996e9be15531bd598272996fa23853d61590e # v1.5.2
3432
with:
35-
version: pnpm run version
36-
publish: pnpm exec changeset publish
33+
version: vp run version
34+
publish: vp exec changeset publish
3735
createGithubReleases: aggregate
3836
githubReleaseName: Release ${{ env.date }}
3937
env:
4038
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4139
NPM_CONFIG_PROVENANCE: true
42-
- run: pnpm exec vsce publish --no-git-tag-version --skip-duplicate
40+
- run: vp exec vsce publish --no-git-tag-version --skip-duplicate
4341
if: steps.changesets.outputs.hasChangesets == 'false'
4442
working-directory: packages/vscode
4543
env:
4644
VSCE_PAT: ${{ secrets.VSCE_PAT }}
47-
- run: pnpm exec ovsx publish --skip-duplicate
45+
- run: vp exec ovsx publish --skip-duplicate
4846
if: steps.changesets.outputs.hasChangesets == 'false'
4947
working-directory: packages/vscode
5048
env:

.oxfmtrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.vite-hooks/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vp staged

.vscode/launch.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"cwd": "${workspaceFolder}/examples/1-basic",
99
"program": "${workspaceFolder}/packages/codegen/bin/cmk.js",
1010
"console": "integratedTerminal",
11-
"preLaunchTask": "pnpm: build - packages/codegen",
11+
"preLaunchTask": "vp: build - packages/codegen",
1212
"presentation": {
1313
"group": "codegen"
1414
}
@@ -21,7 +21,7 @@
2121
"program": "${workspaceFolder}/packages/codegen/bin/cmk.js",
2222
"args": ["--watch", "--preserveWatchOutput"],
2323
"console": "integratedTerminal",
24-
"preLaunchTask": "pnpm: build - packages/codegen",
24+
"preLaunchTask": "vp: build - packages/codegen",
2525
"presentation": {
2626
"group": "codegen"
2727
}
@@ -33,7 +33,7 @@
3333
"cwd": "${workspaceFolder}/examples/2-named-exports",
3434
"program": "${workspaceFolder}/packages/codegen/bin/cmk.js",
3535
"console": "integratedTerminal",
36-
"preLaunchTask": "pnpm: build - packages/codegen",
36+
"preLaunchTask": "vp: build - packages/codegen",
3737
"presentation": {
3838
"group": "codegen"
3939
}
@@ -45,7 +45,7 @@
4545
"cwd": "${workspaceFolder}/examples/3-import-alias",
4646
"program": "${workspaceFolder}/packages/codegen/bin/cmk.js",
4747
"console": "integratedTerminal",
48-
"preLaunchTask": "pnpm: build - packages/codegen",
48+
"preLaunchTask": "vp: build - packages/codegen",
4949
"presentation": {
5050
"group": "codegen"
5151
}
@@ -55,10 +55,10 @@
5555
"type": "node",
5656
"request": "launch",
5757
"cwd": "${workspaceFolder}/examples/1-basic",
58-
"runtimeExecutable": "pnpm",
58+
"runtimeExecutable": "vp",
5959
"runtimeArgs": ["exec", "stylelint", "src/**/*.css"],
6060
"console": "integratedTerminal",
61-
"preLaunchTask": "pnpm: build - packages/stylelint-plugin",
61+
"preLaunchTask": "vp: build - packages/stylelint-plugin",
6262
"presentation": {
6363
"group": "stylelint-plugin"
6464
}
@@ -68,10 +68,10 @@
6868
"type": "node",
6969
"request": "launch",
7070
"cwd": "${workspaceFolder}/examples/1-basic",
71-
"runtimeExecutable": "pnpm",
71+
"runtimeExecutable": "vp",
7272
"runtimeArgs": ["exec", "eslint", "src/**/*.css"],
7373
"console": "integratedTerminal",
74-
"preLaunchTask": "pnpm: build - packages/eslint-plugin",
74+
"preLaunchTask": "vp: build - packages/eslint-plugin",
7575
"presentation": {
7676
"group": "eslint-plugin"
7777
}
@@ -90,7 +90,7 @@
9090
"--folder-uri=${workspaceFolder}/examples/1-basic",
9191
"${workspaceFolder}/examples/1-basic/src/a.tsx"
9292
],
93-
"preLaunchTask": "pnpm: build - packages/vscode",
93+
"preLaunchTask": "vp: build - packages/vscode",
9494
"env": {
9595
"TSS_DEBUG": "5859"
9696
}
@@ -109,7 +109,7 @@
109109
"--folder-uri=${workspaceFolder}/examples/2-named-exports",
110110
"${workspaceFolder}/examples/2-named-exports/src/a.tsx"
111111
],
112-
"preLaunchTask": "pnpm: build - packages/vscode",
112+
"preLaunchTask": "vp: build - packages/vscode",
113113
"env": {
114114
"TSS_DEBUG": "5859"
115115
}
@@ -128,7 +128,7 @@
128128
"--folder-uri=${workspaceFolder}/examples/3-import-alias",
129129
"${workspaceFolder}/examples/3-import-alias/src/a.tsx"
130130
],
131-
"preLaunchTask": "pnpm: build - packages/vscode",
131+
"preLaunchTask": "vp: build - packages/vscode",
132132
"env": {
133133
"TSS_DEBUG": "5859"
134134
}
@@ -147,7 +147,7 @@
147147
"--folder-uri=${workspaceFolder}/examples/4-multiple-tsconfig",
148148
"${workspaceFolder}/examples/4-multiple-tsconfig/src/dir-1/a.tsx"
149149
],
150-
"preLaunchTask": "pnpm: build - packages/vscode",
150+
"preLaunchTask": "vp: build - packages/vscode",
151151
"env": {
152152
"TSS_DEBUG": "5859"
153153
}
@@ -166,7 +166,7 @@
166166
"--folder-uri=${workspaceFolder}/examples/5-normal-css",
167167
"${workspaceFolder}/examples/5-normal-css/src/a.tsx"
168168
],
169-
"preLaunchTask": "pnpm: build - packages/vscode",
169+
"preLaunchTask": "vp: build - packages/vscode",
170170
"env": {
171171
"TSS_DEBUG": "5859"
172172
}
@@ -185,7 +185,7 @@
185185
"--folder-uri=${workspaceFolder}/examples/6-project-external-file",
186186
"${workspaceFolder}/examples/6-project-external-file/src/a.tsx"
187187
],
188-
"preLaunchTask": "pnpm: build - packages/vscode",
188+
"preLaunchTask": "vp: build - packages/vscode",
189189
"env": {
190190
"TSS_DEBUG": "5859"
191191
}

.vscode/tasks.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "pnpm: build - packages/codegen",
5+
"label": "vp: build - packages/codegen",
66
"type": "shell",
7-
"command": "pnpm run build",
7+
"command": "vp run build",
88
"options": {
99
"cwd": "${workspaceFolder}/packages/codegen"
1010
},
1111
"group": "build"
1212
},
1313
{
14-
"label": "pnpm: build - packages/stylelint-plugin",
14+
"label": "vp: build - packages/stylelint-plugin",
1515
"type": "shell",
16-
"command": "pnpm run build",
16+
"command": "vp run build",
1717
"options": {
1818
"cwd": "${workspaceFolder}/packages/stylelint-plugin"
1919
},
2020
"group": "build"
2121
},
2222
{
23-
"label": "pnpm: build - packages/eslint-plugin",
23+
"label": "vp: build - packages/eslint-plugin",
2424
"type": "shell",
25-
"command": "pnpm run build",
25+
"command": "vp run build",
2626
"options": {
2727
"cwd": "${workspaceFolder}/packages/eslint-plugin"
2828
},
2929
"group": "build"
3030
},
3131
{
32-
"label": "pnpm: build - packages/vscode",
32+
"label": "vp: build - packages/vscode",
3333
"type": "shell",
34-
"command": "pnpm run build",
34+
"command": "vp run build",
3535
"options": {
3636
"cwd": "${workspaceFolder}/packages/vscode"
3737
},

AGENTS.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@ Package dependencies:
2929
## Development Commands
3030

3131
```bash
32-
pnpm run build # Build all packages
32+
vp run build # Build all packages
3333

34-
pnpm run lint # Run all linting
35-
pnpm run lint-fix # Auto-fix linting issues
34+
vp check # Run format, lint, and type checks
35+
vp check --fix # Auto-fix format and lint issues
3636

37-
pnpm run test # Run all tests except VS Code extension tests
38-
pnpm exec vitest --run --project unit # Run only unit tests
39-
pnpm exec vitest --run --project e2e # Run only E2E tests
40-
pnpm exec vitest --run packages/core/src/parser/css-module-parser.test.ts # Run a specific test file
41-
pnpm run vscode-test # Run VS Code extension tests
37+
vp test # Run all tests except VS Code extension tests
38+
vp test --project unit # Run only unit tests
39+
vp test --project e2e # Run only E2E tests
40+
vp test packages/core/src/parser/css-module-parser.test.ts # Run a specific test file
41+
vp run vscode-test # Run VS Code extension tests
4242
```
4343

4444
### Updating generated files in examples
4545

4646
The examples directory contains generated type definition files produced by codegen as examples. If the generated type definition files change, these files must also be updated. You can update them with the following command:
4747

4848
```bash
49-
pnpm run update-generated-in-examples
49+
vp run update-generated-in-examples
5050
```
5151

5252
## Coding Conventions
@@ -107,9 +107,7 @@ function myFunction() {
107107
## Tech Stack
108108

109109
- TypeScript
110-
- Vitest
111-
- Oxlint
112-
- Oxfmt
110+
- Vite+ (`vp`) — unified toolchain for test, lint, fmt
113111
- pnpm, pnpm workspaces
114112
- Changesets
115113

0 commit comments

Comments
 (0)