From 5da183dcc20bf6dd11ccbc4bf4c49e7c6cdcce64 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 23 Jan 2023 18:10:03 +0000 Subject: [PATCH] Bump npm to v9.2.0 npm v9.3.0 is out, but seems to have a bug with `npm ci` on macOS where it will complain that `node_modules/.bin` is a directory. We specify an exact version for reproducibility of builds. --- .github/workflows/script/check-node-modules.sh | 3 +-- .github/workflows/update-dependencies.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/script/check-node-modules.sh b/.github/workflows/script/check-node-modules.sh index 0e471524d..a817f5f0f 100755 --- a/.github/workflows/script/check-node-modules.sh +++ b/.github/workflows/script/check-node-modules.sh @@ -7,10 +7,9 @@ if [ ! -z "$(git status --porcelain)" ]; then >&2 echo "Failed: Repo should be clean before testing!" exit 1 fi -# Pin npm to v8 since v9 doesn't support Node 12. # When updating this, make sure to update the npm version in # `.github/workflows/update-dependencies.yml` too. -sudo npm install --force -g npm@^8.19.3 +sudo npm install --force -g npm@9.2.0 # Reinstall modules and then clean to remove absolute paths # Use 'npm ci' instead of 'npm install' as this is intended to be reproducible npm ci diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 67f400b39..eef8687bc 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -27,10 +27,9 @@ jobs: run: | git fetch origin "$BRANCH" --depth=1 git checkout "origin/$BRANCH" - # Pin npm to v8 since v9 doesn't support Node 12. # When updating this, make sure to update the npm version in # `.github/workflows/script/check-node-modules.sh` too. - sudo npm install --force -g npm@^8.19.3 + sudo npm install --force -g npm@9.2.0 npm install npm ci npm run removeNPMAbsolutePaths