@@ -134,7 +134,9 @@ jobs:
134134 VSCODE_ARCH : ${{ matrix.vscode_arch }}
135135 npm_config_arch : ${{ matrix.npm_arch }}
136136 # Ensure native modules are built from source to avoid prebuilds and use
137- # the correct version of glibc.
137+ # the correct version of glibc. Although we use pnpm, this npm flag
138+ # appears to still work for argon2, and VS Code has its own configuration
139+ # for building from source.
138140 npm_config_build_from_source : true
139141 # Gulp target name.
140142 # TODO: Pull from VSCODE_ARCH instead.
@@ -161,38 +163,39 @@ jobs:
161163 # A merged update/ PR starts a release through pull_request_target.
162164 allow-unsafe-pr-checkout : true
163165 - run : quilt push -a
166+ - uses : pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
164167 - uses : actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
165168 with :
166169 node-version-file : .node-version
167- cache : npm
170+ cache : pnpm
168171 cache-dependency-path : |
169172 package-lock.json
170173 test/package-lock.json
171174
172175 - name : Build
173176 run : |
174177 cd lib/vscode/build
175- npm ci
178+ pnpm install --frozen-lockfile
176179 cd ..
177180 source ./build/azure-pipelines/linux/setup-env.sh
178181 # Run preinstall script before root dependencies are installed
179182 # so that v8 headers are patched correctly for native modules.
180- node build/npm/ preinstall.ts
183+ pnpm run preinstall
181184 cd ../..
182- npm ci
183- npm run build
184- npm run build:vscode
185+ pnpm install --frozen-lockfile
186+ pnpm run build
187+ pnpm run build:vscode
185188
186189 # Platform-agnostic NPM package.
187- - run : npm run release
190+ - run : pnpm run release
188191 if : ${{ matrix.vscode_arch == 'x64' }}
189192 # Into release-packages with the platform packages, so the artifact is one flat directory.
190193 - run : mkdir -p release-packages && tar -czf release-packages/package.tar.gz release
191194 if : ${{ matrix.vscode_arch == 'x64' }}
192195
193196 # Platform-specific release.
194- - run : KEEP_MODULES=1 npm run release
195- - run : npm run package
197+ - run : KEEP_MODULES=1 pnpm run release
198+ - run : pnpm run package
196199
197200 # The approve job and publish.yaml check every file against these.
198201 - uses : actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
@@ -224,6 +227,8 @@ jobs:
224227 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
225228 VERSION : ${{ needs.prepare.outputs.version }}
226229 # Ensure native modules are built from source to avoid prebuilds.
230+ # Although we use pnpm, this npm flag appears to still work for argon2,
231+ # and VS Code has its own configuration for building from source.
227232 npm_config_build_from_source : true
228233
229234 steps :
@@ -247,21 +252,22 @@ jobs:
247252 # A merged update/ PR starts a release through pull_request_target.
248253 allow-unsafe-pr-checkout : true
249254 - run : quilt push -a
255+ - uses : pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
250256 - uses : actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
251257 with :
252258 node-version-file : .node-version
253- cache : npm
259+ cache : pnpm
254260 cache-dependency-path : |
255261 package-lock.json
256262 test/package-lock.json
257263
258- - run : npm ci
259- - run : npm run build
260- - run : npm run build:vscode
261- - run : KEEP_MODULES=1 npm run release
262- - run : npm run test:native
264+ - run : pnpm install --frozen-lockfile
265+ - run : pnpm run build
266+ - run : pnpm run build:vscode
267+ - run : KEEP_MODULES=1 pnpm run release
268+ - run : pnpm run test:native
263269
264- - run : npm run package
270+ - run : pnpm run package
265271
266272 # The approve job and publish.yaml check every file against these.
267273 - uses : actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
@@ -291,6 +297,8 @@ jobs:
291297 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
292298 VERSION : ${{ needs.prepare.outputs.version }}
293299 # Ensure native modules are built from source to avoid prebuilds.
300+ # Although we use pnpm, this npm flag appears to still work for argon2,
301+ # and VS Code has its own configuration for building from source.
294302 npm_config_build_from_source : true
295303 OS : windows
296304
@@ -320,20 +328,21 @@ jobs:
320328 git apply --whitespace=nowarn "patches/$patch"
321329 done < patches/series
322330
331+ - uses : pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
323332 - uses : actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
324333 with :
325334 node-version-file : .node-version
326- cache : npm
335+ cache : pnpm
327336 cache-dependency-path : |
328337 package-lock.json
329338 test/package-lock.json
330339
331- # npm hands every script it runs to cmd, which cannot run the shell
340+ # pnpm hands every script it runs to cmd, which cannot run the shell
332341 # scripts this repository is built out of. Point it at the same bash
333342 # the steps here use rather than at a path, which moves between
334343 # images.
335- - name : Let npm run shell scripts
336- run : echo "npm_config_script_shell =$(cygpath -w "$(command -v bash)")" >> $GITHUB_ENV
344+ - name : Let pnpm run shell scripts
345+ run : echo "pnpm_config_script_shell =$(cygpath -w "$(command -v bash)")" >> $GITHUB_ENV
337346
338347 # The build merges json by handing jq a process substitution, which
339348 # bash presents as a file under /dev/fd. The jq on this image is a
@@ -381,10 +390,10 @@ jobs:
381390 run : C:\msys64\usr\bin\pacman -Sy --noconfirm --needed rsync
382391
383392 # Only rsync crosses over. Putting msys2's /usr/bin in front instead
384- # breaks the release step: npm on the path is a shell script whose
393+ # breaks the release step: pnpm on the path is a shell script whose
385394 # shebang reads /usr/bin/env bash, so with msys2 first it is msys2's
386395 # bash that runs it, and crossing into a second msys runtime does not
387- # carry the environment. npm then sees no script-shell and falls back
396+ # carry the environment. pnpm then sees no script-shell and falls back
388397 # to cmd, which cannot run ./ci/build/build-release.sh, and
389398 # KEEP_MODULES is dropped on the way. A forwarder avoids the whole
390399 # class: rsync is a native exe that loads its runtime from beside
@@ -397,10 +406,10 @@ jobs:
397406 SHIM
398407 chmod +x "$RUNNER_TEMP/shim/rsync"
399408
400- - run : npm ci
401- - run : npm run build
402- - run : npm run build:vscode
403- - run : KEEP_MODULES=1 npm run release
409+ - run : pnpm install --frozen-lockfile
410+ - run : pnpm run build
411+ - run : pnpm run build:vscode
412+ - run : KEEP_MODULES=1 pnpm run release
404413
405414 # Of the two tars on this image it is git bash's GNU one that can
406415 # rename the tree's top directory as it archives; the windows bsdtar
@@ -412,7 +421,7 @@ jobs:
412421 *GNU*) ;;
413422 *) echo "expected GNU tar for --transform, got $(tar --version | head -1)" >&2; exit 1 ;;
414423 esac
415- npm run package
424+ pnpm run package
416425
417426 # The approve job and publish.yaml check every file against these.
418427 - uses : actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
0 commit comments