From 42f138751001a9fd956bba1710e1e05421540dbc Mon Sep 17 00:00:00 2001 From: gkc Date: Mon, 14 Oct 2024 14:31:28 +0100 Subject: [PATCH 1/2] build: pin npm to 10.8.2 as a temporary measure because Dependabot uses 10.8.2 --- .github/workflows/multibuild.yaml | 2 +- apps/admin/webapp/package-lock.json | 2 +- apps/admin/webapp/package.json | 2 +- packages/dart/sshnoports/buildArchive | 2 +- tools/multibuild/Dockerfile.package | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/multibuild.yaml b/.github/workflows/multibuild.yaml index 6c42d5159..818da3ef8 100644 --- a/.github/workflows/multibuild.yaml +++ b/.github/workflows/multibuild.yaml @@ -103,7 +103,7 @@ jobs: - name: build admin webapp working-directory: ./apps/admin/webapp run: | - npm install -g npm@10.9.0 + npm install -g npm@10.8.2 npm install npm run build - if: ${{ matrix.os != 'windows-latest' }} diff --git a/apps/admin/webapp/package-lock.json b/apps/admin/webapp/package-lock.json index 74ae4659d..64b17136d 100644 --- a/apps/admin/webapp/package-lock.json +++ b/apps/admin/webapp/package-lock.json @@ -14,7 +14,7 @@ }, "engines": { "node": ">=v20.15.0 <23", - "npm": "10.9.0" + "npm": "10.8.2" } }, "node_modules/@ampproject/remapping": { diff --git a/apps/admin/webapp/package.json b/apps/admin/webapp/package.json index 52d4f2771..90c98b4ba 100644 --- a/apps/admin/webapp/package.json +++ b/apps/admin/webapp/package.json @@ -15,6 +15,6 @@ }, "engines": { "node": ">=v20.15.0 <23", - "npm": "10.9.0" + "npm": "10.8.2" } } diff --git a/packages/dart/sshnoports/buildArchive b/packages/dart/sshnoports/buildArchive index 7bc246d13..8fb0bf54d 100755 --- a/packages/dart/sshnoports/buildArchive +++ b/packages/dart/sshnoports/buildArchive @@ -38,7 +38,7 @@ echo "Compiling admin_api"; dart compile exe --verbosity error bin/np_admin.dart wait cd ../webapp || exit 1 echo "Building admin webapp" -npm install -g npm@10.9.0 || exit 1 +npm install -g npm@10.8.2 || exit 1 npm install || exit 1 npm run build || exit 1 diff --git a/tools/multibuild/Dockerfile.package b/tools/multibuild/Dockerfile.package index f8922b193..cccaf5659 100644 --- a/tools/multibuild/Dockerfile.package +++ b/tools/multibuild/Dockerfile.package @@ -10,7 +10,7 @@ WORKDIR /noports # hadolint ignore=DL3008 RUN apt-get update; \ apt-get install -y --no-install-recommends npm; \ - npm install -g npm@10.9.0 + npm install -g npm@10.8.2 COPY . . From d5f7e87918207b2af35646b27e5f51e20ba48812 Mon Sep 17 00:00:00 2001 From: gkc Date: Mon, 14 Oct 2024 14:51:52 +0100 Subject: [PATCH 2/2] build: for the policy webapp, use `npm ci` rather than `npm install` in order to respect package-lock.json --- .github/workflows/multibuild.yaml | 2 +- packages/dart/sshnoports/buildArchive | 2 +- tools/multibuild/Dockerfile.package | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multibuild.yaml b/.github/workflows/multibuild.yaml index 818da3ef8..91ff9b665 100644 --- a/.github/workflows/multibuild.yaml +++ b/.github/workflows/multibuild.yaml @@ -104,7 +104,7 @@ jobs: working-directory: ./apps/admin/webapp run: | npm install -g npm@10.8.2 - npm install + npm ci npm run build - if: ${{ matrix.os != 'windows-latest' }} run: | diff --git a/packages/dart/sshnoports/buildArchive b/packages/dart/sshnoports/buildArchive index 8fb0bf54d..07ab4cd5d 100755 --- a/packages/dart/sshnoports/buildArchive +++ b/packages/dart/sshnoports/buildArchive @@ -39,7 +39,7 @@ wait cd ../webapp || exit 1 echo "Building admin webapp" npm install -g npm@10.8.2 || exit 1 -npm install || exit 1 +npm ci || exit 1 npm run build || exit 1 wait diff --git a/tools/multibuild/Dockerfile.package b/tools/multibuild/Dockerfile.package index cccaf5659..238a94ab0 100644 --- a/tools/multibuild/Dockerfile.package +++ b/tools/multibuild/Dockerfile.package @@ -42,7 +42,7 @@ RUN dart pub get --enforce-lockfile; \ # Build apps/admin/webapp WORKDIR /noports/apps/admin/webapp -RUN npm install; \ +RUN npm ci; \ npm run build; \ mkdir -p /sshnp/web/admin; \ cp -r ./dist/* /sshnp/web/admin/