From 83c549628edf6088b861436d3746e091549f0916 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Mon, 18 May 2026 10:09:14 +0000 Subject: [PATCH] build: upgrade pnpm to v11.1.2 and migrate configuration from .npmrc to pnpm-workspace.yaml This change updated pnpm to the latest stable version. --- .github/ng-renovate/package.json | 7 +------ .github/ng-renovate/pnpm-workspace.yaml | 6 ++++++ .npmrc | 12 ------------ MODULE.bazel | 5 ++--- .../integration/tests/angular-cli/package.json | 2 +- .../tests/angular-cli/pnpm-workspace.yaml | 6 ++++++ .../nested_bazel_workspaces/basic/package.json | 2 +- .../tests/package_mappings/package.json | 2 +- .../tests/playwright_chromium/package.json | 2 +- bazel/rules/rules_angular/.npmrc | 11 ----------- bazel/rules/rules_angular/MODULE.bazel | 10 +++++----- bazel/rules/rules_angular/package.json | 14 ++------------ bazel/rules/rules_angular/pnpm-workspace.yaml | 8 ++++++++ bazel/rules/rules_browsers/.npmrc | 6 ------ bazel/rules/rules_browsers/MODULE.bazel | 6 +++--- bazel/rules/rules_browsers/package.json | 18 ++---------------- bazel/rules/rules_browsers/pnpm-workspace.yaml | 10 ++++++++++ package.json | 17 ++--------------- pnpm-workspace.yaml | 16 ++++++++++++++++ renovate-presets/default.json5 | 1 - 20 files changed, 67 insertions(+), 94 deletions(-) delete mode 100644 .npmrc delete mode 100644 bazel/rules/rules_angular/.npmrc delete mode 100644 bazel/rules/rules_browsers/.npmrc diff --git a/.github/ng-renovate/package.json b/.github/ng-renovate/package.json index a1a77744d6..e084e9127c 100644 --- a/.github/ng-renovate/package.json +++ b/.github/ng-renovate/package.json @@ -1,13 +1,8 @@ { "name": "ng-renovate", "type": "commonjs", - "packageManager": "pnpm@10.33.4", + "packageManager": "pnpm@11.1.2", "dependencies": { "renovate": "43.150.0" - }, - "pnpm": { - "onlyBuiltDependencies": [ - "re2" - ] } } diff --git a/.github/ng-renovate/pnpm-workspace.yaml b/.github/ng-renovate/pnpm-workspace.yaml index 74b78874f3..84072206fa 100644 --- a/.github/ng-renovate/pnpm-workspace.yaml +++ b/.github/ng-renovate/pnpm-workspace.yaml @@ -1,3 +1,9 @@ # The minimum age of a release to be considered for dependency installation. # The value is in minutes (1440 minutes = 1 day). minimumReleaseAge: 1440 +allowBuilds: + better-sqlite3: false + core-js-pure: false + dtrace-provider: false + protobufjs: false + re2: true diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 7c7738880a..0000000000 --- a/.npmrc +++ /dev/null @@ -1,12 +0,0 @@ -# Yarn Berry doesn't check engines at all, so pnpm shouldn't either. -engine-strict = false - -# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on -# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what -# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) -hoist=false - -# Avoid pnpm auto-installing peer dependencies. We want to be explicit about our versions used -# for peer dependencies, avoiding potential mismatches. In addition, it ensures we can continue -# to rely on peer dependency placeholders substituted via Bazel. -auto-install-peers=false diff --git a/MODULE.bazel b/MODULE.bazel index d31138555f..77c2965c2a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -76,8 +76,8 @@ use_repo(rules_angular, rules_angular_configurable_deps = "dev_infra_rules_angul pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") pnpm.pnpm( name = "pnpm", - pnpm_version = "10.33.4", - pnpm_version_integrity = "sha512-HGezs1my1AgRm6HtKJ80uPw8aHNBK+xv0mT73IJInlEPy+y5zp0i2ufzt2Jp2EQQRgFL3KU7mXnNelYa1jG4AA==", + pnpm_version = "11.1.2", + pnpm_version_integrity = "sha512-QVocwll0cx51RVwUaDcb50xapft2IbUNQFbSIkUWCfEUEvI/1gLmFp8eBgRmZB95hZfhvpYaEGiINqZ7FlaUmQ==", ) use_repo(pnpm, "pnpm") @@ -110,7 +110,6 @@ npm.npm_translate_lock( "@devinfra//github-actions/unified-status-check:package.json", "@devinfra//ng-dev:package.json", ], - npmrc = "@devinfra//:.npmrc", pnpm_lock = "@devinfra//:pnpm-lock.yaml", ) use_repo(npm, "devinfra_npm") diff --git a/bazel/integration/tests/angular-cli/package.json b/bazel/integration/tests/angular-cli/package.json index 24234fe9b8..209cc32b50 100644 --- a/bazel/integration/tests/angular-cli/package.json +++ b/bazel/integration/tests/angular-cli/package.json @@ -9,7 +9,7 @@ "test": "ng test" }, "private": true, - "packageManager": "pnpm@10.33.4", + "packageManager": "pnpm@11.1.2", "dependencies": { "@angular/animations": "22.0.0-next.12", "@angular/common": "22.0.0-next.12", diff --git a/bazel/integration/tests/angular-cli/pnpm-workspace.yaml b/bazel/integration/tests/angular-cli/pnpm-workspace.yaml index f33725e9d3..d2fb6ac240 100644 --- a/bazel/integration/tests/angular-cli/pnpm-workspace.yaml +++ b/bazel/integration/tests/angular-cli/pnpm-workspace.yaml @@ -1,3 +1,9 @@ +allowBuilds: + '@parcel/watcher': false + chromedriver: false + esbuild: false + lmdb: false + msgpackr-extract: false # The minimum age of a release to be considered for dependency installation. # The value is in minutes (1440 minutes = 1 day). minimumReleaseAge: 1440 diff --git a/bazel/integration/tests/nested_bazel_workspaces/basic/package.json b/bazel/integration/tests/nested_bazel_workspaces/basic/package.json index e20306f441..79a05c2159 100644 --- a/bazel/integration/tests/nested_bazel_workspaces/basic/package.json +++ b/bazel/integration/tests/nested_bazel_workspaces/basic/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "bazelisk test ..." }, - "packageManager": "pnpm@10.33.4", + "packageManager": "pnpm@11.1.2", "devDependencies": { "@bazel/bazelisk": "^1.11.0" } diff --git a/bazel/integration/tests/package_mappings/package.json b/bazel/integration/tests/package_mappings/package.json index 55adb5a22e..267fd6cf73 100644 --- a/bazel/integration/tests/package_mappings/package.json +++ b/bazel/integration/tests/package_mappings/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "main": "index.js", "license": "MIT", - "packageManager": "pnpm@10.33.4", + "packageManager": "pnpm@11.1.2", "dependencies": { "fake_pkg": "link:./in-existing-linked-by-bazel" }, diff --git a/bazel/integration/tests/playwright_chromium/package.json b/bazel/integration/tests/playwright_chromium/package.json index 588a4c6215..e3b3e26f63 100644 --- a/bazel/integration/tests/playwright_chromium/package.json +++ b/bazel/integration/tests/playwright_chromium/package.json @@ -9,5 +9,5 @@ "@playwright/test": "^1.16.3", "typescript": "^6.0.2" }, - "packageManager": "pnpm@10.33.4" + "packageManager": "pnpm@11.1.2" } diff --git a/bazel/rules/rules_angular/.npmrc b/bazel/rules/rules_angular/.npmrc deleted file mode 100644 index 9227ff789b..0000000000 --- a/bazel/rules/rules_angular/.npmrc +++ /dev/null @@ -1,11 +0,0 @@ -engine-strict = true - -# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on -# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what -# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) -hoist=false - -# Avoid pnpm auto-installing peer dependencies. We want to be explicit about our versions used -# for peer dependencies, avoiding potential mismatches. In addition, it ensures we can continue -# to rely on peer dependency placeholders substituted via Bazel. -auto-install-peers=false diff --git a/bazel/rules/rules_angular/MODULE.bazel b/bazel/rules/rules_angular/MODULE.bazel index e163d1dbf5..d6bfdc20a2 100644 --- a/bazel/rules/rules_angular/MODULE.bazel +++ b/bazel/rules/rules_angular/MODULE.bazel @@ -50,8 +50,8 @@ node.toolchain( pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") pnpm.pnpm( name = "pnpm", - pnpm_version = "10.33.4", - pnpm_version_integrity = "sha512-HGezs1my1AgRm6HtKJ80uPw8aHNBK+xv0mT73IJInlEPy+y5zp0i2ufzt2Jp2EQQRgFL3KU7mXnNelYa1jG4AA==", + pnpm_version = "11.1.2", + pnpm_version_integrity = "sha512-QVocwll0cx51RVwUaDcb50xapft2IbUNQFbSIkUWCfEUEvI/1gLmFp8eBgRmZB95hZfhvpYaEGiINqZ7FlaUmQ==", ) use_repo(pnpm, "pnpm") @@ -59,10 +59,10 @@ npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock( name = "rules_angular_npm", data = [ - "@rules_angular//:package.json", + "//:package.json", + "//:pnpm-workspace.yaml", ], - npmrc = "//:.npmrc", - pnpm_lock = "@rules_angular//:pnpm-lock.yaml", + pnpm_lock = "//:pnpm-lock.yaml", ) use_repo(npm, "rules_angular_npm") diff --git a/bazel/rules/rules_angular/package.json b/bazel/rules/rules_angular/package.json index a142d20d9c..fc638cb38b 100644 --- a/bazel/rules/rules_angular/package.json +++ b/bazel/rules/rules_angular/package.json @@ -8,21 +8,11 @@ "keywords": [], "author": "", "license": "ISC", - "pnpm": { - "onlyBuiltDependencies": [], - "packageExtensions": { - "grpc-gcp": { - "peerDependencies": { - "protobufjs": "*" - } - } - } - }, - "packageManager": "pnpm@10.33.4", + "packageManager": "pnpm@11.1.2", "engines": { "npm": "Please use pnpm instead of NPM to install dependencies", "yarn": "Please use pnpm instead of Yarn to install dependencies", - "pnpm": "10.33.4" + "pnpm": "11.1.2" }, "dependencies": { "@angular/compiler-cli": "22.0.0-next.12", diff --git a/bazel/rules/rules_angular/pnpm-workspace.yaml b/bazel/rules/rules_angular/pnpm-workspace.yaml index d16a3dbf2f..82fc339e89 100644 --- a/bazel/rules/rules_angular/pnpm-workspace.yaml +++ b/bazel/rules/rules_angular/pnpm-workspace.yaml @@ -6,3 +6,11 @@ minimumReleaseAgeExclude: - '@angular-devkit/*' - '@angular/*' - '@schematics/*' +packageExtensions: + grpc-gcp: + peerDependencies: + protobufjs: '*' +engineStrict: true +hoist: false +autoInstallPeers: false +allowBuilds: {'@parcel/watcher': false, esbuild: false, lmdb: false, msgpackr-extract: false} diff --git a/bazel/rules/rules_browsers/.npmrc b/bazel/rules/rules_browsers/.npmrc deleted file mode 100644 index ae9b869787..0000000000 --- a/bazel/rules/rules_browsers/.npmrc +++ /dev/null @@ -1,6 +0,0 @@ -engine-strict = true - -# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on -# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what -# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) -hoist=false diff --git a/bazel/rules/rules_browsers/MODULE.bazel b/bazel/rules/rules_browsers/MODULE.bazel index 012f786bfc..11f2890ca3 100644 --- a/bazel/rules/rules_browsers/MODULE.bazel +++ b/bazel/rules/rules_browsers/MODULE.bazel @@ -63,8 +63,8 @@ bazel_dep(name = "aspect_rules_js", version = "3.1.1") pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") pnpm.pnpm( name = "pnpm", - pnpm_version = "10.33.4", - pnpm_version_integrity = "sha512-HGezs1my1AgRm6HtKJ80uPw8aHNBK+xv0mT73IJInlEPy+y5zp0i2ufzt2Jp2EQQRgFL3KU7mXnNelYa1jG4AA==", + pnpm_version = "11.1.2", + pnpm_version_integrity = "sha512-QVocwll0cx51RVwUaDcb50xapft2IbUNQFbSIkUWCfEUEvI/1gLmFp8eBgRmZB95hZfhvpYaEGiINqZ7FlaUmQ==", ) use_repo(pnpm, "pnpm") @@ -73,8 +73,8 @@ npm.npm_translate_lock( name = "npm_rules_browsers", data = [ "//:package.json", + "//:pnpm-workspace.yaml", ], - npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", ) use_repo(npm, "npm_rules_browsers") diff --git a/bazel/rules/rules_browsers/package.json b/bazel/rules/rules_browsers/package.json index 34b84eec14..3451532110 100644 --- a/bazel/rules/rules_browsers/package.json +++ b/bazel/rules/rules_browsers/package.json @@ -6,11 +6,11 @@ "scripts": { "ng-dev": "bash ../../../tools/local-dev.sh" }, - "packageManager": "pnpm@10.33.4", + "packageManager": "pnpm@11.1.2", "engines": { "npm": "Please use pnpm instead of NPM to install dependencies", "yarn": "Please use pnpm instead of Yarn to install dependencies", - "pnpm": "10.33.4" + "pnpm": "11.1.2" }, "keywords": [], "author": "", @@ -30,19 +30,5 @@ "tinyglobby": "^0.2.12", "typescript": "6.0.3", "web-test-runner-jasmine": "0.2.0" - }, - "pnpm": { - "onlyBuiltDependencies": [], - "overrides": { - "puppeteer": "24.43.1", - "puppeteer-core": "24.43.1" - }, - "packageExtensions": { - "grpc-gcp": { - "peerDependencies": { - "protobufjs": "*" - } - } - } } } diff --git a/bazel/rules/rules_browsers/pnpm-workspace.yaml b/bazel/rules/rules_browsers/pnpm-workspace.yaml index d16a3dbf2f..1ad153f5b9 100644 --- a/bazel/rules/rules_browsers/pnpm-workspace.yaml +++ b/bazel/rules/rules_browsers/pnpm-workspace.yaml @@ -6,3 +6,13 @@ minimumReleaseAgeExclude: - '@angular-devkit/*' - '@angular/*' - '@schematics/*' +overrides: + puppeteer: 24.43.1 + puppeteer-core: 24.43.1 +packageExtensions: + grpc-gcp: + peerDependencies: + protobufjs: '*' +engineStrict: true +hoist: false +allowBuilds: {puppeteer: false} diff --git a/package.json b/package.json index 8cc5741ec1..a48680eee6 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "@angular/build-tooling", "version": "0.0.0-{SCM_HEAD_SHA}", "private": true, - "packageManager": "pnpm@10.33.4", + "packageManager": "pnpm@11.1.2", "engines": { "npm": "Please use pnpm instead of NPM to install dependencies", "yarn": "Please use pnpm instead of Yarn to install dependencies", - "pnpm": "10.33.4" + "pnpm": "11.1.2" }, "scripts": { "prepare": "husky", @@ -36,18 +36,5 @@ "tslib": "^2.5.2", "tslint": "6.1.3", "tsx": "^4.15.7" - }, - "pnpm": { - "packageExtensions": { - "grpc-gcp": { - "peerDependencies": { - "protobufjs": "*" - } - } - }, - "onlyBuiltDependencies": [ - "firebase-functions", - "tsx" - ] } } diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6c9b8e8b09..0e0e8be1b7 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -32,3 +32,19 @@ minimumReleaseAgeExclude: - '@ngtools/webpack' - '@schematics/*' - 'ng-packagr' +packageExtensions: + grpc-gcp: + peerDependencies: + protobufjs: '*' +engineStrict: false +hoist: false +autoInstallPeers: false +allowBuilds: + '@apollo/protobufjs': false + '@firebase/util': false + '@google/genai': false + bufferutil: false + esbuild: false + protobufjs: false + re2: false + utf-8-validate: false diff --git a/renovate-presets/default.json5 b/renovate-presets/default.json5 index c17a2b65d5..be8f9e4e07 100644 --- a/renovate-presets/default.json5 +++ b/renovate-presets/default.json5 @@ -49,7 +49,6 @@ matchDepNames: ['pnpm', 'typescript', 'node'], postUpgradeTasks: { commands: [ - 'bash -c "git restore .npmrc || true"', // If `.npmrc` doesn't exist, avoid a hard error. 'pnpm install --frozen-lockfile', 'bash -c "pnpm ng-dev misc sync-module-bazel || true"', // If `ng-dev` doesn't exist, avoid a hard error. ],