Skip to content

Commit d04c2fa

Browse files
committed
feat: 用 pnpm 取代 npm
1 parent 14e13a2 commit d04c2fa

5 files changed

Lines changed: 1674 additions & 2877 deletions

File tree

.github/workflows/check.yaml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ jobs:
2626
with:
2727
persist-credentials: false
2828

29+
- name: Enable pnpm
30+
run: corepack enable
31+
2932
- name: Setup Node.js
3033
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3134
with:
3235
node-version: 22
33-
cache: npm
34-
cache-dependency-path: package-lock.json
36+
cache: pnpm
37+
cache-dependency-path: pnpm-lock.yaml
3538

3639
- name: Install dependencies
37-
run: npm ci --prefer-offline --no-audit --no-fund
40+
run: pnpm install --frozen-lockfile --prefer-offline
3841

3942
- name: Verify generated worker types are up to date
40-
run: npm run types:check
43+
run: pnpm run types:check
4144

4245
typecheck:
4346
runs-on: ubuntu-24.04
@@ -49,18 +52,21 @@ jobs:
4952
with:
5053
persist-credentials: false
5154

55+
- name: Enable pnpm
56+
run: corepack enable
57+
5258
- name: Setup Node.js
5359
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
5460
with:
5561
node-version: 22
56-
cache: npm
57-
cache-dependency-path: package-lock.json
62+
cache: pnpm
63+
cache-dependency-path: pnpm-lock.yaml
5864

5965
- name: Install dependencies
60-
run: npm ci --prefer-offline --no-audit --no-fund
66+
run: pnpm install --frozen-lockfile --prefer-offline
6167

6268
- name: Type check
63-
run: npm run typecheck
69+
run: pnpm run typecheck
6470

6571
format:
6672
runs-on: ubuntu-24.04
@@ -72,18 +78,21 @@ jobs:
7278
with:
7379
persist-credentials: false
7480

81+
- name: Enable pnpm
82+
run: corepack enable
83+
7584
- name: Setup Node.js
7685
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
7786
with:
7887
node-version: 22
79-
cache: npm
80-
cache-dependency-path: package-lock.json
88+
cache: pnpm
89+
cache-dependency-path: pnpm-lock.yaml
8190

8291
- name: Install dependencies
83-
run: npm ci --prefer-offline --no-audit --no-fund
92+
run: pnpm install --frozen-lockfile --prefer-offline
8493

8594
- name: Prettier format check
86-
run: npm run format:check
95+
run: pnpm run format:check
8796

8897
test:
8998
runs-on: ubuntu-24.04
@@ -95,15 +104,18 @@ jobs:
95104
with:
96105
persist-credentials: false
97106

107+
- name: Enable pnpm
108+
run: corepack enable
109+
98110
- name: Setup Node.js
99111
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
100112
with:
101113
node-version: 22
102-
cache: npm
103-
cache-dependency-path: package-lock.json
114+
cache: pnpm
115+
cache-dependency-path: pnpm-lock.yaml
104116

105117
- name: Install dependencies
106-
run: npm ci --prefer-offline --no-audit --no-fund
118+
run: pnpm install --frozen-lockfile --prefer-offline
107119

108120
- name: Run unit tests
109-
run: npm run test:run
121+
run: pnpm run test:run

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
worker-configuration.d.ts
1+
worker-configuration.d.ts
2+
pnpm-lock

0 commit comments

Comments
 (0)