@@ -169,26 +169,27 @@ jobs:
169169 uses : actions/setup-node@v4
170170 with :
171171 node-version : 22
172+ cache : " pnpm"
172173
173- - name : Get NPM cache directory
174- id : npm -cache-dir
175- run : echo "dir=$(npm config get cache )" >> ${GITHUB_OUTPUT}
174+ - name : Get PNPM cache directory
175+ id : pnpm -cache-dir
176+ run : echo "dir=$(pnpm store path )" >> ${GITHUB_OUTPUT}
176177
177- - name : Restore NPM cache
178+ - name : Restore PNPM cache
178179 uses : actions/cache/restore@v4
179180 with :
180- path : ${{ steps.npm -cache-dir.outputs.dir }}
181- key : npm -main-${{ matrix.platform }}-${{ hashFiles('./package -lock.json ') }}
181+ path : ${{ steps.pnpm -cache-dir.outputs.dir }}
182+ key : pnpm -main-${{ matrix.platform }}-${{ hashFiles('./pnpm -lock.yaml ') }}
182183 restore-keys : |
183- npm -main-${{ matrix.platform }}-
184+ pnpm -main-${{ matrix.platform }}-
184185
185186 - name : Download dependencies
186187 # Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors :(
187188 run : |
188- npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
189+ pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
189190
190191 - name : Compile code
191- run : npm run build -- --ignore @temporalio/core-bridge
192+ run : pnpm run build -- --ignore @temporalio/core-bridge
192193
193194 - name : Publish to Verdaccio
194195 run : node scripts/publish-to-verdaccio.js --registry-dir ./tmp/registry
@@ -199,13 +200,13 @@ jobs:
199200 name : verdaccio-repo
200201 path : ./tmp/registry/storage
201202
202- - name : Save NPM cache
203+ - name : Save PNPM cache
203204 uses : actions/cache/save@v4
204205 # Only saves NPM cache from the main branch, to reduce pressure on the cache (limited to 10GB).
205206 if : ${{ env.IS_MAIN_OR_RELEASE == 'true' }}
206207 with :
207- path : ${{ steps.npm -cache-dir.outputs.dir }}
208- key : npm -main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
208+ path : ${{ steps.pnpm -cache-dir.outputs.dir }}
209+ key : pnpm -main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
209210
210211 # Tests that npm init @temporalio results in a working worker and client
211212 test-npm-init :
@@ -259,23 +260,23 @@ jobs:
259260 with :
260261 node-version : ${{ matrix.node }}
261262
262- - name : Get NPM cache directory
263- id : npm -cache-dir
263+ - name : Get PNPM cache directory
264+ id : pnpm -cache-dir
264265 shell : bash
265- run : echo "dir=$(npm config get cache )" >> ${GITHUB_OUTPUT}
266+ run : echo "dir=$(pnpm store path )" >> ${GITHUB_OUTPUT}
266267
267268 - name : Restore NPM cache
268269 uses : actions/cache/restore@v4
269270 with :
270- path : ${{ steps.npm -cache-dir.outputs.dir }}
271- key : npm -main-${{ matrix.platform }}-${{ hashFiles('./package -lock.json ') }}
271+ path : ${{ steps.pnpm -cache-dir.outputs.dir }}
272+ key : pnpm -main-${{ matrix.platform }}-${{ hashFiles('./pnpm -lock.yaml ') }}
272273 restore-keys : |
273- npm -main-${{ matrix.platform }}-
274+ pnpm -main-${{ matrix.platform }}-
274275
275276 # No need to compile anything, we just need the package ./scripts and their dependencies
276277 - name : Install dependencies without compilation
277278 run : |
278- npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
279+ pnpm install ---frozen-lockfile || pnpm install ---frozen-lockfile || pnpm install ---frozen-lockfile
279280
280281 - name : Restore Verdaccio repo artifact
281282 uses : actions/download-artifact@v4
0 commit comments