Skip to content

Commit a50c057

Browse files
committed
chore: migrate to vite-plus
1 parent d48a383 commit a50c057

7 files changed

Lines changed: 1124 additions & 178 deletions

File tree

.github/workflows/autofix.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,24 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
18-
- run: corepack enable
19-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
18+
- uses: voidzero-dev/setup-vp@b5d848f5a62488f3d3d920f8aa6ac318a60c5f07 # v1
2019
with:
21-
node-version: lts/-1
22-
cache: pnpm
23-
24-
- name: 📦 Install dependencies
25-
run: pnpm install
20+
node-version: '22'
21+
cache: true
2622

2723
# - name: 📦 Install browsers
28-
# run: pnpm playwright install
24+
# run: vp dlx playwright install
2925

3026
- name: 🔠 Fix lint errors
31-
run: pnpm lint --fix
27+
run: vp run lint -- --fix
3228

3329
- name: 🧪 Update unit test snapshots
34-
run: pnpm test:unit -u
30+
run: vp run -r test:unit -- -u
3531

3632
# - name: 🏃 Update component test snapshots
37-
# run: pnpm test:nuxt -u
33+
# run: vp run test:nuxt -- -u
3834

3935
# - name: 🖥️ Update browser test snapshots
40-
# run: pnpm test:browser --update-snapshots
36+
# run: vp run test:browser -- --update-snapshots
4137

4238
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # 635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/ci.yml

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,44 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
17-
- run: corepack enable
18-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
17+
- uses: voidzero-dev/setup-vp@b5d848f5a62488f3d3d920f8aa6ac318a60c5f07 # v1
1918
with:
20-
node-version: lts/-1
21-
cache: pnpm
22-
23-
- name: 📦 Install dependencies
24-
run: pnpm install
19+
node-version: '22'
20+
cache: true
2521

2622
- name: 🔠 Lint project
27-
run: pnpm lint
23+
run: vp run lint
2824

2925
test:
3026
runs-on: ubuntu-latest
3127

3228
steps:
3329
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
34-
- run: corepack enable
35-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
30+
- uses: voidzero-dev/setup-vp@b5d848f5a62488f3d3d920f8aa6ac318a60c5f07 # v1
3631
with:
37-
node-version: lts/-1
38-
cache: pnpm
39-
40-
- name: 📦 Install dependencies
41-
run: pnpm install
32+
node-version: '22'
33+
cache: true
4234

4335
- name: 💪 Type check
44-
run: pnpm test:types
36+
run: vp run test:types
4537

4638
- name: 🧪 Unit test
47-
run: pnpm test:unit
39+
run: vp run test:unit
4840

4941
# - name: 🏃 Component tests
50-
# run: pnpm test:nuxt
42+
# run: vp run test:nuxt
5143

5244
# browser:
5345
# runs-on: ubuntu-latest
5446
# container:
5547
# image: mcr.microsoft.com/playwright:v1.49.1-noble
5648

5749
# steps:
58-
# - uses: actions/checkout@v4
59-
# - run: corepack enable
60-
# - uses: actions/setup-node@v4
50+
# - uses: actions/checkout@v6
51+
# - uses: voidzero-dev/setup-vp@v1
6152
# with:
62-
# node-version: lts/-1
63-
# cache: pnpm
64-
65-
# - name: 📦 Install dependencies
66-
# run: pnpm install
53+
# node-version: '22'
54+
# cache: true
6755

6856
# - name: 🖥️ Test project (browser)
69-
# run: pnpm test:browser
57+
# run: vp run test:browser

.github/workflows/release-extension.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,15 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
44-
- run: corepack enable
45-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
44+
- uses: voidzero-dev/setup-vp@b5d848f5a62488f3d3d920f8aa6ac318a60c5f07 # v1
4645
with:
47-
node-version: lts/-1
48-
cache: pnpm
49-
50-
- name: Install dependencies
51-
run: pnpm install
46+
node-version: '22'
47+
cache: true
5248

5349
- name: Build and zip extensions
5450
run: |
55-
pnpm --filter unsight zip
56-
pnpm --filter unsight zip:firefox
51+
vp run --filter unsight zip
52+
vp run --filter unsight zip:firefox
5753
5854
- name: Upload artifacts
5955
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
@@ -66,7 +62,7 @@ jobs:
6662
- name: Submit to stores
6763
working-directory: packages/extension
6864
run: |
69-
npx wxt submit \
65+
vpx wxt submit \
7066
--chrome-zip .output/*-chrome.zip \
7167
--firefox-zip .output/*-firefox.zip \
7268
--firefox-sources-zip .output/*-sources.zip
@@ -79,6 +75,6 @@ jobs:
7975
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
8076
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}
8177

82-
- run: pnpm changelogithub
78+
- run: vp dlx changelogithub
8379
env:
8480
GITHUB_TOKEN: ${{ github.token }}

package.json

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,17 @@
44
"private": true,
55
"packageManager": "pnpm@10.21.0",
66
"scripts": {
7-
"dev": "pnpm --filter web dev",
8-
"dev:ext": "pnpm --filter unsight dev",
7+
"dev": "vp run --filter web dev",
8+
"dev:ext": "vp run --filter unsight dev",
99
"lint": "eslint --cache .",
10-
"test:types": "pnpm -r test:types",
11-
"test:unit": "pnpm -r test:unit",
12-
"postinstall": "simple-git-hooks"
10+
"test:types": "vp run -r test:types",
11+
"test:unit": "vp run -r test:unit"
1312
},
1413
"devDependencies": {
1514
"@antfu/eslint-config": "6.0.0",
1615
"changelogithub": "14.0.0",
1716
"eslint": "9.39.4",
18-
"nano-staged": "0.9.0",
19-
"simple-git-hooks": "2.13.1",
20-
"typescript": "5.9.2"
21-
},
22-
"simple-git-hooks": {
23-
"pre-commit": "npx nano-staged"
24-
},
25-
"nano-staged": {
26-
"*.{js,ts,mjs,cjs,json,.*rc}": [
27-
"npx eslint --fix"
28-
]
17+
"typescript": "5.9.2",
18+
"vite-plus": "^0.1.12"
2919
}
3020
}

0 commit comments

Comments
 (0)