diff --git a/.github/workflows/__config-input.yml b/.github/workflows/__config-input.yml index 4267e0058..f3f248cda 100644 --- a/.github/workflows/__config-input.yml +++ b/.github/workflows/__config-input.yml @@ -51,6 +51,8 @@ jobs: with: node-version: 20.x cache: npm + - name: Install newer npm + run: npm install -g npm@11.19.1 - name: Install dependencies run: npm ci - name: Prepare test diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index 409e0a1a6..4cb0499d6 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -84,6 +84,8 @@ jobs: with: node-version: 20.x cache: npm + - name: Install newer npm + run: npm install -g npm@11.19.1 - name: Install dependencies run: npm ci - name: Prepare test diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 34d4ae1bc..ed049214e 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -84,6 +84,8 @@ jobs: with: node-version: 20.x cache: npm + - name: Install newer npm + run: npm install -g npm@11.19.1 - name: Install dependencies run: npm ci - name: Prepare test diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index 88426cd68..7cf99882b 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -84,6 +84,8 @@ jobs: with: node-version: 20.x cache: npm + - name: Install newer npm + run: npm install -g npm@11.19.1 - name: Install dependencies run: npm ci - name: Prepare test diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index 2461944db..6b488a7cf 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -84,6 +84,8 @@ jobs: with: node-version: 20.x cache: npm + - name: Install newer npm + run: npm install -g npm@11.19.1 - name: Install dependencies run: npm ci - name: Prepare test diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index c752c5dc7..b2ce0a614 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -47,6 +47,12 @@ jobs: node-version: ${{ matrix.node-version }} cache: "npm" + # Install a new enough version of `npm` to understand `min-release-age` + # that is still compatible with Node 20. + - name: Install newer npm + if: matrix.node-version == 20 + run: npm install -g npm@11.19.1 + - name: Install dependencies run: | # Use the system Bash shell to ensure we can run commands like `npm ci` @@ -95,6 +101,14 @@ jobs: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Check for incorrect addresses in package-lock.json + run: | + if git grep -nE '(pkgs\.visualstudio\.com|pkgs\.dev\.azure\.com|packagefeedproxy\.microsoft\.io)' -- \ + 'package-lock.json'; then + echo "::error::package-lock.json contains internal package feed URLs. Replace them with public registry URLs." + exit 1 + fi + - name: Set up Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: diff --git a/package-lock.json b/package-lock.json index 668bc2fbf..27bf393bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2596,7 +2596,7 @@ }, "node_modules/@types/debug": { "version": "4.1.13", - "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/debug/-/debug-4.1.13.tgz", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", "integrity": "sha1-ItHMnVQtNZPK6nZPl0MGqzYobuc=", "license": "MIT", "dependencies": { @@ -2639,7 +2639,7 @@ }, "node_modules/@types/mdast": { "version": "4.0.4", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/mdast/-/mdast-4.0.4.tgz", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", "integrity": "sha1-fM9y7dLxqn3TQ34YDGQ3NYWATdY=", "license": "MIT", "dependencies": { @@ -2648,7 +2648,7 @@ }, "node_modules/@types/ms": { "version": "2.1.0", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/ms/-/ms-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", "integrity": "sha1-BSqmekjszEMJ1/AZG35BQ0uQu3g=", "license": "MIT" }, @@ -2713,7 +2713,7 @@ }, "node_modules/@types/unist": { "version": "3.0.3", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/unist/-/unist-3.0.3.tgz", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha1-rKqw+RnOaczmKcLU7S60rcG2wgw=", "license": "MIT" }, @@ -4249,7 +4249,7 @@ }, "node_modules/character-entities": { "version": "2.0.2", - "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/character-entities/-/character-entities-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", "integrity": "sha1-LQnC5yzZUjB2zLIRV9/2atQ/zCI=", "license": "MIT", "funding": { @@ -4644,7 +4644,7 @@ }, "node_modules/decode-named-character-reference": { "version": "1.3.0", - "resolved": "https://ms-feed-17.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", "integrity": "sha1-PkBgN2CHTC5YZ2kbWZ1zp9oltT8=", "license": "MIT", "dependencies": { @@ -4700,7 +4700,7 @@ }, "node_modules/dequal": { "version": "2.0.3", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/dequal/-/dequal-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha1-JkQhTxmX057Q7g7OcjNUkKesZ74=", "license": "MIT", "engines": { @@ -4719,7 +4719,7 @@ }, "node_modules/devlop": { "version": "1.1.0", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/devlop/-/devlop-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", "integrity": "sha1-TbfCyk3G4Og0wwvnDJS7yXbccBg=", "license": "MIT", "dependencies": { @@ -7519,7 +7519,7 @@ }, "node_modules/mdast-util-to-string": { "version": "4.0.0", - "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", "integrity": "sha1-elEhR1VWoE5+3etnsmSq550xKBQ=", "license": "MIT", "dependencies": { @@ -7558,7 +7558,7 @@ }, "node_modules/micromark": { "version": "4.0.2", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark/-/micromark-4.0.2.tgz", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", "integrity": "sha1-kTlaPhiEoZjmIRbjPJxWjjmTb9s=", "funding": [ { @@ -7593,7 +7593,7 @@ }, "node_modules/micromark-core-commonmark": { "version": "2.0.3", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", "integrity": "sha1-xpFjDkhQIaaM8o28Kyyifr9njNQ=", "funding": [ { @@ -7627,7 +7627,7 @@ }, "node_modules/micromark-factory-destination": { "version": "2.0.1", - "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", "integrity": "sha1-j++OD3CB8EdPvdkt61DJkKAmRjk=", "funding": [ { @@ -7648,7 +7648,7 @@ }, "node_modules/micromark-factory-label": { "version": "2.0.1", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", "integrity": "sha1-UmfvqX8eUlTvx/ILRZo4yyEFi6E=", "funding": [ { @@ -7670,7 +7670,7 @@ }, "node_modules/micromark-factory-space": { "version": "2.0.1", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", "integrity": "sha1-NtAhLpYrKzEh+FJfx6PHwCnzNPw=", "funding": [ { @@ -7690,7 +7690,7 @@ }, "node_modules/micromark-factory-title": { "version": "2.0.1", - "resolved": "https://ms-feed-17.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", "integrity": "sha1-I35KpdWKlYY/AQMtnumwkPHebpQ=", "funding": [ { @@ -7712,7 +7712,7 @@ }, "node_modules/micromark-factory-whitespace": { "version": "2.0.1", - "resolved": "https://ms-feed-17.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", "integrity": "sha1-BrJrKYPE0nv8xlezPiUTTUhosLE=", "funding": [ { @@ -7734,7 +7734,7 @@ }, "node_modules/micromark-util-character": { "version": "2.1.1", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", "integrity": "sha1-L5h4MaQNTFEKwmHomFLE6XA8zaY=", "funding": [ { @@ -7754,7 +7754,7 @@ }, "node_modules/micromark-util-chunked": { "version": "2.0.1", - "resolved": "https://ms-feed-17.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", "integrity": "sha1-R/vNk0caP8yrhs/wOEf8NVLbEFE=", "funding": [ { @@ -7773,7 +7773,7 @@ }, "node_modules/micromark-util-classify-character": { "version": "2.0.1", - "resolved": "https://ms-feed-17.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", "integrity": "sha1-05n6+cRcoUyLS+mLHqSBvO2Htik=", "funding": [ { @@ -7794,7 +7794,7 @@ }, "node_modules/micromark-util-combine-extensions": { "version": "2.0.1", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", "integrity": "sha1-Kg9JCrCL/1zC/V7sbdDKBPibMKk=", "funding": [ { @@ -7814,7 +7814,7 @@ }, "node_modules/micromark-util-decode-numeric-character-reference": { "version": "2.0.2", - "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", "integrity": "sha1-/PFbZgl5OI5vEYzba/fXnXPSb+U=", "funding": [ { @@ -7833,7 +7833,7 @@ }, "node_modules/micromark-util-decode-string": { "version": "2.0.1", - "resolved": "https://ms-feed-17.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", "integrity": "sha1-bLmVguXScehO/KjmGoB5lNcWHrI=", "funding": [ { @@ -7855,7 +7855,7 @@ }, "node_modules/micromark-util-encode": { "version": "2.0.1", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", "integrity": "sha1-DVHRwJVVHPqsNoMmljz1XxX1QLg=", "funding": [ { @@ -7871,7 +7871,7 @@ }, "node_modules/micromark-util-html-tag-name": { "version": "2.0.1", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", "integrity": "sha1-5AQDCWSBmGtBwQZif5j3LU0QuCU=", "funding": [ { @@ -7887,7 +7887,7 @@ }, "node_modules/micromark-util-normalize-identifier": { "version": "2.0.1", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", "integrity": "sha1-ww13sugyrPZSb4vxqke8nJQ4wW0=", "funding": [ { @@ -7906,7 +7906,7 @@ }, "node_modules/micromark-util-resolve-all": { "version": "2.0.1", - "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", "integrity": "sha1-4aLWLN0jcjCirhGDkCexk4HjHos=", "funding": [ { @@ -7925,7 +7925,7 @@ }, "node_modules/micromark-util-sanitize-uri": { "version": "2.0.1", - "resolved": "https://ms-feed-17.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", "integrity": "sha1-q4l4m4GKWHUrc9a1UjhiG3+qj9c=", "funding": [ { @@ -7946,7 +7946,7 @@ }, "node_modules/micromark-util-subtokenize": { "version": "2.1.0", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", "integrity": "sha1-2K3lug8xl6HPaimZ+7/mNXoaGe4=", "funding": [ { @@ -7968,7 +7968,7 @@ }, "node_modules/micromark-util-symbol": { "version": "2.0.1", - "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", "integrity": "sha1-5dpJTo6ysHGg0I+zT2zv7GwKGbg=", "funding": [ { @@ -7984,7 +7984,7 @@ }, "node_modules/micromark-util-types": { "version": "2.0.2", - "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", "integrity": "sha1-8AIl9fWg68MlT5bDa2YFxLOTkI4=", "funding": [ { @@ -10069,7 +10069,7 @@ }, "node_modules/unist-util-stringify-position": { "version": "4.0.0", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", "integrity": "sha1-RJxuIaiA4IVb9aq63rOnQDFKusI=", "license": "MIT", "dependencies": { diff --git a/pr-checks/sync.ts b/pr-checks/sync.ts index f0942ad2d..23ff6fc23 100755 --- a/pr-checks/sync.ts +++ b/pr-checks/sync.ts @@ -221,6 +221,12 @@ const languageSetups: LanguageSetups = { cache: "npm", }, }, + // Install a new enough version of `npm` to understand `min-release-age` + // that is still compatible with Node 20. + { + name: "Install newer npm", + run: "npm install -g npm@11.19.1", + }, { name: "Install dependencies", run: "npm ci",