1010 - ' docs/**'
1111 - ' example/**'
1212 - ' site/**'
13- - ' .npmignore'
13+ - ' .node-version'
14+ - ' .nvmrc'
1415 - ' .prettierignore'
15- - ' .prettierrc'
16- - ' .renovaterc.json'
16+ - ' .prettierrc.json'
1717 - ' *.md'
1818 - ' LICENSE'
1919 pull_request :
2323 - ' docs/**'
2424 - ' example/**'
2525 - ' site/**'
26- - ' .npmignore'
26+ - ' .node-version'
27+ - ' .nvmrc'
2728 - ' .prettierignore'
28- - ' .prettierrc'
29- - ' .renovaterc.json'
29+ - ' .prettierrc.json'
3030 - ' *.md'
3131 - ' LICENSE'
3232 workflow_dispatch :
@@ -46,24 +46,27 @@ jobs:
4646 steps :
4747 - uses : actions/checkout@v4
4848
49+ - name : Install pnpm
50+ uses : pnpm/action-setup@v4
51+
4952 - name : Use Node.js ${{ matrix.node-version }}
5053 uses : actions/setup-node@v4
5154 with :
55+ cache : ' pnpm'
5256 node-version : ${{ matrix.node-version }}
53- cache : ' npm'
5457
5558 - name : Install dependencies
56- run : npm ci
59+ run : pnpm install
5760
5861 - name : Run docker compose
5962 run : docker compose up -d
6063
6164 - name : Run node tests
62- run : ${{ matrix.with-transformer && 'TEST_TRANSFORMER=1 ' || '' }}npm test
65+ run : ${{ matrix.with-transformer && 'TEST_TRANSFORMER=1 ' || '' }}pnpm test
6366
6467 - name : Run esbuild test
6568 if : ${{ !matrix.with-transformer }}
66- run : npm run test:esbuild
69+ run : pnpm test:esbuild
6770
6871 deno :
6972 name : Deno
@@ -78,28 +81,31 @@ jobs:
7881 steps :
7982 - uses : actions/checkout@v4
8083
84+ - name : Install pnpm
85+ uses : pnpm/action-setup@v4
86+
8187 - name : Use Node.js
8288 uses : actions/setup-node@v4
8389 with :
90+ cache : ' pnpm'
8491 node-version : lts/*
85- cache : ' npm'
8692
8793 - name : Use Deno ${{ matrix.deno-version }}
8894 uses : denoland/setup-deno@v2
8995 with :
9096 deno-version : ${{ matrix.deno-version }}
9197
9298 - name : Install dependencies
93- run : npm ci
99+ run : pnpm install
94100
95101 - name : Run docker compose
96102 run : docker compose up -d
97103
98104 - name : Build
99- run : npm run build
105+ run : pnpm build
100106
101107 - name : Run deno tests
102- run : npm run test:deno
108+ run : pnpm test:deno
103109
104110 bun :
105111 name : Bun
@@ -113,14 +119,17 @@ jobs:
113119 steps :
114120 - uses : actions/checkout@v4
115121
122+ - name : Install pnpm
123+ uses : pnpm/action-setup@v4
124+
116125 - name : Use Node.js
117126 uses : actions/setup-node@v4
118127 with :
128+ cache : ' pnpm'
119129 node-version : lts/*
120- cache : ' npm'
121130
122131 - name : Install dependencies
123- run : npm ci
132+ run : pnpm install
124133
125134 - name : Use Bun ${{ matrix.bun-version }}
126135 uses : oven-sh/setup-bun@v2
@@ -131,7 +140,7 @@ jobs:
131140 run : docker compose up -d
132141
133142 - name : Run bun tests
134- run : npm run test:bun
143+ run : pnpm test:bun
135144
136145 browser :
137146 name : Browser
@@ -140,20 +149,23 @@ jobs:
140149 steps :
141150 - uses : actions/checkout@v4
142151
152+ - name : Install pnpm
153+ uses : pnpm/action-setup@v4
154+
143155 - name : Use Node.js
144156 uses : actions/setup-node@v4
145157 with :
158+ cache : ' pnpm'
146159 node-version : lts/*
147- cache : ' npm'
148160
149161 - name : Install dependencies
150- run : npm ci
162+ run : pnpm install
151163
152164 - name : Install playwright
153- run : npx playwright install chromium
165+ run : pnpx playwright install chromium
154166
155167 - name : Run browser tests
156- run : npm run test:browser
168+ run : pnpm test:browser
157169
158170 cloudflare-workers :
159171 name : Cloudflare Workers
@@ -162,20 +174,23 @@ jobs:
162174 steps :
163175 - uses : actions/checkout@v4
164176
177+ - name : Install pnpm
178+ uses : pnpm/action-setup@v4
179+
165180 - name : Use Node.js
166181 uses : actions/setup-node@v4
167182 with :
183+ cache : ' pnpm'
168184 node-version : lts/*
169- cache : ' npm'
170185
171186 - name : Install dependencies
172- run : npm ci
187+ run : pnpm install
173188
174189 - name : Run docker compose
175190 run : docker compose up -d
176191
177192 - name : Run cloudflare workers test
178- run : npm run test:cloudflare-workers
193+ run : pnpm test:cloudflare-workers
179194
180195 older-typescript-version :
181196 name : Older TypeScript version
@@ -198,30 +213,33 @@ jobs:
198213 steps :
199214 - uses : actions/checkout@v4
200215
216+ - name : Install pnpm
217+ uses : pnpm/action-setup@v4
218+
201219 - name : Use Node.js
202220 uses : actions/setup-node@v4
203221 with :
222+ cache : ' pnpm'
204223 node-version : 20.x
205- cache : ' npm'
206224
207225 - name : Install dependencies
208- run : npm ci
226+ run : pnpm install
209227
210228 - name : Run build with newer TypeScript
211- run : npm run build
229+ run : pnpm build
212230
213231 - run : |
214232 echo "TS_VERSION=${{ matrix.typescript-version }}" >> $GITHUB_ENV
215233 echo "TSD_VERSION=${{ fromJson('{ "^4.6":"0.20.0", "^4.7":"0.22.0", "^4.8":"0.24.1", "^4.9":"0.27.0", "^5.0":"0.28.1", "^5.2":"0.29.0", "^5.3":"0.30.7", "^5.4":"0.31.2" }')[env.TS_VERSION] }} >> $GITHUB_ENV"
216234
217235 - name : Install Typescript (${{ env.TS_VERSION }}) and TSD (${{ env.TSD_VERSION }})
218- run : npm i -D typescript@${{ env.TS_VERSION }} tsd@${{ env.TSD_VERSION }}
236+ run : pnpm i -w -D typescript@${{ env.TS_VERSION }} tsd@${{ env.TSD_VERSION }}
219237
220238 - name : Exclude non-backward compatible tests
221- run : npx tsx ./scripts/exclude-test-files-for-backwards-compat.mts
239+ run : pnpx tsx ./scripts/exclude-test-files-for-backwards-compat.mts
222240
223241 - name : Run tests with older TypeScript version
224- run : npm run test:typings && npm run test:node:build
242+ run : pnpm test:typings && pnpm test:node:build
225243
226244 jsdocs :
227245 name : JSDocs
@@ -230,25 +248,28 @@ jobs:
230248 steps :
231249 - uses : actions/checkout@v4
232250
251+ - name : Install pnpm
252+ uses : pnpm/action-setup@v4
253+
233254 - name : Use Node.js
234255 uses : actions/setup-node@v4
235256 with :
257+ cache : ' pnpm'
236258 node-version : lts/*
237- cache : ' npm'
238259
239260 - name : Use Deno
240261 uses : denoland/setup-deno@v2
241262 with :
242263 deno-version : 2.x
243264
244265 - name : Install dependencies
245- run : npm ci
266+ run : pnpm install
246267
247268 - name : Build
248- run : npm run build
269+ run : pnpm build
249270
250271 - name : Type-check JSDocs code blocks
251- run : npm run test:jsdocs
272+ run : pnpm test:jsdocs
252273
253274 typescript-benchmarks :
254275 name : TypeScript Benchmarks
@@ -257,17 +278,20 @@ jobs:
257278 steps :
258279 - uses : actions/checkout@v4
259280
281+ - name : Install pnpm
282+ uses : pnpm/action-setup@v4
283+
260284 - name : Use Node.js
261285 uses : actions/setup-node@v4
262286 with :
287+ cache : ' pnpm'
263288 node-version : lts/*
264- cache : ' npm'
265289
266290 - name : Install dependencies
267- run : npm ci
291+ run : pnpm install
268292
269293 - name : Run benchmarks
270- run : npm run bench:ts
294+ run : pnpm bench:ts
271295
272296 typescript-native :
273297 name : TypeScript Native
@@ -276,17 +300,20 @@ jobs:
276300 steps :
277301 - uses : actions/checkout@v4
278302
303+ - name : Install pnpm
304+ uses : pnpm/action-setup@v4
305+
279306 - name : Use Node.js
280307 uses : actions/setup-node@v4
281308 with :
309+ cache : ' pnpm'
282310 node-version : lts/*
283- cache : ' npm'
284311
285312 - name : Install dependencies
286- run : npm ci && npm install -D @typescript/native-preview
313+ run : pnpm i && pnpm i -w -D @typescript/native-preview
287314
288315 - name : Build
289- run : npm run build
316+ run : pnpm build
290317
291318 - name : Run TypeScript Native tests
292- run : npx tsgo --project ./tsconfig.json && npx tsgo --project ./test/node/tsconfig.json
319+ run : pnpm tsgo --project ./tsconfig.json && pnpm tsgo --project ./test/node/tsconfig.json
0 commit comments