From 60c9faeba611dc89dcd41e76e2b50f941ed3a833 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 13 Apr 2026 10:46:17 -0700 Subject: [PATCH] chore: don't run npm update in CI (cherry picked from commit 07552f58111dea3aa563693ea103342fb625d47b) --- .github/workflows/ci-libnpmaccess.yml | 8 -------- .github/workflows/ci-libnpmdiff.yml | 8 -------- .github/workflows/ci-libnpmexec.yml | 8 -------- .github/workflows/ci-libnpmfund.yml | 8 -------- .github/workflows/ci-libnpmorg.yml | 8 -------- .github/workflows/ci-libnpmpack.yml | 8 -------- .github/workflows/ci-libnpmpublish.yml | 8 -------- .github/workflows/ci-libnpmsearch.yml | 8 -------- .github/workflows/ci-libnpmteam.yml | 8 -------- .github/workflows/ci-libnpmversion.yml | 8 -------- .github/workflows/ci-npmcli-arborist.yml | 8 -------- .github/workflows/ci-npmcli-config.yml | 8 -------- .github/workflows/ci-npmcli-docs.yml | 12 ------------ .github/workflows/ci-npmcli-mock-globals.yml | 8 -------- .github/workflows/ci-npmcli-mock-registry.yml | 8 -------- .github/workflows/ci-npmcli-smoke-tests.yml | 8 -------- package.json | 3 ++- scripts/template-oss/index.js | 1 + 18 files changed, 3 insertions(+), 133 deletions(-) diff --git a/.github/workflows/ci-libnpmaccess.yml b/.github/workflows/ci-libnpmaccess.yml index b606e9beaa9de..4c5d778f84991 100644 --- a/.github/workflows/ci-libnpmaccess.yml +++ b/.github/workflows/ci-libnpmaccess.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmdiff.yml b/.github/workflows/ci-libnpmdiff.yml index c07a8b4f79458..6956b6004ae2b 100644 --- a/.github/workflows/ci-libnpmdiff.yml +++ b/.github/workflows/ci-libnpmdiff.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmexec.yml b/.github/workflows/ci-libnpmexec.yml index 0eb2c86345b5c..aae5d1a865d50 100644 --- a/.github/workflows/ci-libnpmexec.yml +++ b/.github/workflows/ci-libnpmexec.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmfund.yml b/.github/workflows/ci-libnpmfund.yml index 94e6b528ae5fb..288a64dc29a65 100644 --- a/.github/workflows/ci-libnpmfund.yml +++ b/.github/workflows/ci-libnpmfund.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmorg.yml b/.github/workflows/ci-libnpmorg.yml index 73b5503dbc63d..cff5871dd346e 100644 --- a/.github/workflows/ci-libnpmorg.yml +++ b/.github/workflows/ci-libnpmorg.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmpack.yml b/.github/workflows/ci-libnpmpack.yml index ce4555f93d481..c9051f5d227ab 100644 --- a/.github/workflows/ci-libnpmpack.yml +++ b/.github/workflows/ci-libnpmpack.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmpublish.yml b/.github/workflows/ci-libnpmpublish.yml index b5681712e69e6..d92f1f3fdbe33 100644 --- a/.github/workflows/ci-libnpmpublish.yml +++ b/.github/workflows/ci-libnpmpublish.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmsearch.yml b/.github/workflows/ci-libnpmsearch.yml index 62c1f5d037cfd..57d2319ce0dbd 100644 --- a/.github/workflows/ci-libnpmsearch.yml +++ b/.github/workflows/ci-libnpmsearch.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmteam.yml b/.github/workflows/ci-libnpmteam.yml index 1e998b3e77dd6..0190b48952a37 100644 --- a/.github/workflows/ci-libnpmteam.yml +++ b/.github/workflows/ci-libnpmteam.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-libnpmversion.yml b/.github/workflows/ci-libnpmversion.yml index 2c05cbd38dd35..1daa34f7c003e 100644 --- a/.github/workflows/ci-libnpmversion.yml +++ b/.github/workflows/ci-libnpmversion.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-npmcli-arborist.yml b/.github/workflows/ci-npmcli-arborist.yml index 178eb95677bc3..a6e541bbf7214 100644 --- a/.github/workflows/ci-npmcli-arborist.yml +++ b/.github/workflows/ci-npmcli-arborist.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-npmcli-config.yml b/.github/workflows/ci-npmcli-config.yml index fbc57bb1f7180..4e5b9c22c5c89 100644 --- a/.github/workflows/ci-npmcli-config.yml +++ b/.github/workflows/ci-npmcli-config.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-npmcli-docs.yml b/.github/workflows/ci-npmcli-docs.yml index f3b24e5c7d034..7ff09c1b04218 100644 --- a/.github/workflows/ci-npmcli-docs.yml +++ b/.github/workflows/ci-npmcli-docs.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -97,10 +93,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -135,10 +127,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-npmcli-mock-globals.yml b/.github/workflows/ci-npmcli-mock-globals.yml index 5945a92a84522..eef7336ae2c71 100644 --- a/.github/workflows/ci-npmcli-mock-globals.yml +++ b/.github/workflows/ci-npmcli-mock-globals.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-npmcli-mock-registry.yml b/.github/workflows/ci-npmcli-mock-registry.yml index bb21fc4ca4eac..01446dcf72197 100644 --- a/.github/workflows/ci-npmcli-mock-registry.yml +++ b/.github/workflows/ci-npmcli-mock-registry.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/.github/workflows/ci-npmcli-smoke-tests.yml b/.github/workflows/ci-npmcli-smoke-tests.yml index eebc0d08e87cc..38c7a70ad671c 100644 --- a/.github/workflows/ci-npmcli-smoke-tests.yml +++ b/.github/workflows/ci-npmcli-smoke-tests.yml @@ -42,10 +42,6 @@ jobs: node-version: 22.x check-latest: contains('22.x', '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps @@ -106,10 +102,6 @@ jobs: node-version: ${{ matrix.node-version }} check-latest: contains(matrix.node-version, '.x') cache: npm - - name: Install Latest npm - uses: ./.github/actions/install-latest-npm - with: - node: ${{ steps.node.outputs.node-version }} - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps diff --git a/package.json b/package.json index 022dfee6f4bd9..db592f42b69ab 100644 --- a/package.json +++ b/package.json @@ -249,7 +249,8 @@ "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "version": "4.29.0", - "content": "./scripts/template-oss/root.js" + "content": "./scripts/template-oss/root.js", + "updateNpm": false }, "license": "Artistic-2.0", "engines": { diff --git a/scripts/template-oss/index.js b/scripts/template-oss/index.js index 0f214723f558c..ab4d034d1d8f4 100644 --- a/scripts/template-oss/index.js +++ b/scripts/template-oss/index.js @@ -4,4 +4,5 @@ module.exports = { // This is needed while workspaces and npm have different engines. // TODO: make npm and its workspaces always use the same engines and delete this. npm: 'npm', + updateNpm: false, }