diff --git a/apps/api-extractor/package.json b/apps/api-extractor/package.json index b33e876b81a..8f08059530e 100644 --- a/apps/api-extractor/package.json +++ b/apps/api-extractor/package.json @@ -67,16 +67,16 @@ }, "dependencies": { "@microsoft/api-extractor-model": "workspace:*", - "@microsoft/tsdoc-config": "~0.18.2", - "@microsoft/tsdoc": "~0.17.0", + "@microsoft/tsdoc-config": "catalog:", + "@microsoft/tsdoc": "catalog:", "@rushstack/node-core-library": "workspace:*", "@rushstack/rig-package": "workspace:*", "@rushstack/terminal": "workspace:*", "@rushstack/ts-command-line": "workspace:*", - "diff": "~8.0.2", - "minimatch": "10.2.3", - "resolve": "~1.22.1", - "semver": "~7.7.4", + "diff": "catalog:", + "minimatch": "catalog:", + "resolve": "catalog:", + "semver": "catalog:", "source-map": "~0.6.1", "typescript": "6.0.3" }, diff --git a/apps/heft/package.json b/apps/heft/package.json index 433e8ea5d40..f629ac332f0 100644 --- a/apps/heft/package.json +++ b/apps/heft/package.json @@ -66,12 +66,12 @@ "@rushstack/rig-package": "workspace:*", "@rushstack/terminal": "workspace:*", "@rushstack/ts-command-line": "workspace:*", - "@types/tapable": "1.0.6", - "fast-glob": "~3.3.1", - "git-repo-info": "~2.1.0", - "ignore": "~5.1.6", + "@types/tapable": "catalog:", + "fast-glob": "catalog:", + "git-repo-info": "catalog:", + "ignore": "catalog:", "tapable": "1.1.3", - "watchpack": "2.4.0" + "watchpack": "catalog:" }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", diff --git a/common/changes/@microsoft/api-extractor-model/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@microsoft/api-extractor-model/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..73df3ad8c38 --- /dev/null +++ b/common/changes/@microsoft/api-extractor-model/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@microsoft/api-extractor-model" + } + ], + "packageName": "@microsoft/api-extractor-model", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@microsoft/api-extractor/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@microsoft/api-extractor/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..4c3de9ac036 --- /dev/null +++ b/common/changes/@microsoft/api-extractor/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@microsoft/api-extractor" + } + ], + "packageName": "@microsoft/api-extractor", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@microsoft/rush/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-28.json b/common/changes/@microsoft/rush/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-28.json new file mode 100644 index 00000000000..8fcfc4579f7 --- /dev/null +++ b/common/changes/@microsoft/rush/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-28.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Resolve PNPM \"catalog:\" references in the manifests of projects that are injected from other subspaces, using the catalogs of the subspace that contains each project, because PNPM only resolves catalog references for the projects of its own workspace.", + "type": "patch" + } + ], + "packageName": "@microsoft/rush", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/eslint-config/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/eslint-config/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..03fed369eb9 --- /dev/null +++ b/common/changes/@rushstack/eslint-config/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-config" + } + ], + "packageName": "@rushstack/eslint-config", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/eslint-plugin-packlets/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/eslint-plugin-packlets/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..7767dc2b903 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-packlets/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-plugin-packlets" + } + ], + "packageName": "@rushstack/eslint-plugin-packlets", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/eslint-plugin-security/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/eslint-plugin-security/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..3f286ab9a14 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-security/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-plugin-security" + } + ], + "packageName": "@rushstack/eslint-plugin-security", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/eslint-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/eslint-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..fab2ae647d1 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-plugin" + } + ], + "packageName": "@rushstack/eslint-plugin", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/heft-api-extractor-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/heft-api-extractor-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..6dd82f1f27a --- /dev/null +++ b/common/changes/@rushstack/heft-api-extractor-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft-api-extractor-plugin" + } + ], + "packageName": "@rushstack/heft-api-extractor-plugin", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/heft-config-file/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/heft-config-file/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..e9126567187 --- /dev/null +++ b/common/changes/@rushstack/heft-config-file/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft-config-file" + } + ], + "packageName": "@rushstack/heft-config-file", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/heft-jest-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/heft-jest-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..c1394a0a830 --- /dev/null +++ b/common/changes/@rushstack/heft-jest-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft-jest-plugin" + } + ], + "packageName": "@rushstack/heft-jest-plugin", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/heft-lint-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/heft-lint-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..81e781833d4 --- /dev/null +++ b/common/changes/@rushstack/heft-lint-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft-lint-plugin" + } + ], + "packageName": "@rushstack/heft-lint-plugin", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/heft-node-rig/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/heft-node-rig/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..ec1c0a8f773 --- /dev/null +++ b/common/changes/@rushstack/heft-node-rig/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft-node-rig" + } + ], + "packageName": "@rushstack/heft-node-rig", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/heft-typescript-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/heft-typescript-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..541c0827f1c --- /dev/null +++ b/common/changes/@rushstack/heft-typescript-plugin/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft-typescript-plugin" + } + ], + "packageName": "@rushstack/heft-typescript-plugin", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/heft/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/heft/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..7295d41cec8 --- /dev/null +++ b/common/changes/@rushstack/heft/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft" + } + ], + "packageName": "@rushstack/heft", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/node-core-library/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/node-core-library/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..86d55393d19 --- /dev/null +++ b/common/changes/@rushstack/node-core-library/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/node-core-library" + } + ], + "packageName": "@rushstack/node-core-library", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/npm-check-fork/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/npm-check-fork/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..2e0614d34f4 --- /dev/null +++ b/common/changes/@rushstack/npm-check-fork/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/npm-check-fork" + } + ], + "packageName": "@rushstack/npm-check-fork", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/package-extractor/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/package-extractor/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..dfeecacd573 --- /dev/null +++ b/common/changes/@rushstack/package-extractor/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/package-extractor" + } + ], + "packageName": "@rushstack/package-extractor", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/rig-package/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/rig-package/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..e72e927b992 --- /dev/null +++ b/common/changes/@rushstack/rig-package/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/rig-package" + } + ], + "packageName": "@rushstack/rig-package", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/rush-reporter/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/rush-reporter/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..4bbdac8a540 --- /dev/null +++ b/common/changes/@rushstack/rush-reporter/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/rush-reporter" + } + ], + "packageName": "@rushstack/rush-reporter", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/terminal/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/terminal/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..4dc55d88d2f --- /dev/null +++ b/common/changes/@rushstack/terminal/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/terminal" + } + ], + "packageName": "@rushstack/terminal", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/changes/@rushstack/ts-command-line/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json b/common/changes/@rushstack/ts-command-line/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json new file mode 100644 index 00000000000..0299c4ce66e --- /dev/null +++ b/common/changes/@rushstack/ts-command-line/bmiddha-resolve-catalogs-in-injected-deps_2026-10-15-05-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/ts-command-line" + } + ], + "packageName": "@rushstack/ts-command-line", + "email": "223556219+Copilot@users.noreply.github.com" +} diff --git a/common/config/rush/pnpm-config.json b/common/config/rush/pnpm-config.json index 41579fc4e1c..4909cbe98f6 100644 --- a/common/config/rush/pnpm-config.json +++ b/common/config/rush/pnpm-config.json @@ -619,14 +619,14 @@ * differs from the catalog (for example, an "allowedAlternativeVersions" entry in common-versions.json) * keeps a literal version specifier. Peer dependencies and decoupled local dependencies also stay literal. * - * Some other specifiers must also stay literal: - * - "@types/vscode", because "vsce" validates that devDependency as a semver range when packaging - * a VS Code extension. - * - "dependencies" and "optionalDependencies" of projects that a "build-tests-subspace" project - * installs as an injected dependency, directly or transitively (for example "@microsoft/rush-lib", - * "@rushstack/heft", "@rushstack/node-core-library", and "local-node-rig"). PNPM installs those - * projects into the other subspace as "file:" dependencies and cannot resolve "catalog:" specifiers - * in their package.json files. The "devDependencies" of those projects may use "catalog:". + * "@types/vscode" must also stay literal, because "vsce" validates that devDependency as a semver range + * when packaging a VS Code extension. + * + * Projects that a "build-tests-subspace" project installs as an injected dependency, directly or + * transitively (for example "@microsoft/rush-lib", "@rushstack/heft", and "@rushstack/node-core-library"), + * may also use "catalog:". PNPM installs those projects into the other subspace as "file:" dependencies, + * and the Rush subspace pnpmfile shim replaces their catalog references with the versions from these + * catalogs. * * Use "rush add" or "rush upgrade-interactive" to update catalog entries. * @@ -641,13 +641,22 @@ "@babel/core": "~7.20.0", "@fluentui/react": "~8.125.3", "@fluentui/react-components": "~9.72.9", + "@inquirer/checkbox": "~5.1.3", + "@inquirer/confirm": "~6.0.11", + "@inquirer/input": "~5.0.11", + "@inquirer/search": "~4.1.7", + "@inquirer/select": "~5.1.3", + "@jest/core": "~30.3.0", "@jest/reporters": "~30.3.0", + "@jest/transform": "~30.3.0", "@jest/types": "30.3.0", "@jridgewell/sourcemap-codec": "~1.5.5", "@microsoft/teams-js": "1.3.0-beta.4", "@microsoft/tsdoc": "~0.17.0", + "@microsoft/tsdoc-config": "~0.18.2", "@modelcontextprotocol/sdk": "~1.10.2", "@playwright/test": "~1.62.1", + "@pnpm/link-bins": "~5.3.7", "@pnpm/types": "1000.8.0", "@radix-ui/colors": "~3.0.0", "@radix-ui/react-checkbox": "~1.3.3", @@ -672,6 +681,7 @@ "@storybook/theming": "~6.4.18", "@swc/core": "1.7.10", "@testing-library/dom": "~7.21.4", + "@types/argparse": "1.0.38", "@types/aws-lambda": "8.10.93", "@types/compression": "~1.7.2", "@types/cors": "~2.8.12", @@ -715,9 +725,14 @@ "@typescript-eslint/rule-tester": "~8.56.1", "@typescript-eslint/types": "~8.56.1", "@typescript-eslint/typescript-estree": "~8.56.1", + "@typescript-eslint/utils": "~8.56.1", "@vscode/test-electron": "^1.6.2", "@vscode/vsce": "3.2.1", + "@yarnpkg/lockfile": "~1.0.2", "ajv": "~8.20.0", + "ajv-draft-04": "~1.0.0", + "ajv-formats": "~3.0.1", + "argparse": "~1.0.9", "autoprefixer": "~10.4.2", "aws-cdk-lib": "2.189.1", "babel-loader": "~8.2.3", @@ -728,30 +743,46 @@ "cors": "~2.8.5", "css-loader": "~6.6.0", "css-minimizer-webpack-plugin": "~3.4.1", + "dependency-path": "~9.2.8", "diff": "~8.0.2", + "dotenv": "~16.4.7", "eslint": "~9.37.0", "eslint-import-resolver-node": "0.3.9", "eslint-plugin-header": "~3.1.1", "eslint-plugin-headers": "~1.2.1", "eslint-plugin-import": "2.32.0", "eslint-plugin-jsdoc": "50.6.11", + "eslint-plugin-promise": "~7.2.1", + "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "5.2.0", + "eslint-plugin-tsdoc": "~0.5.3", "express": "4.21.1", "fast-glob": "~3.3.1", "fastify": "~3.16.1", "file-loader": "~6.0.0", + "fs-extra": "~11.3.0", + "git-repo-info": "~2.1.0", "glob": "~7.0.5", "html-webpack-plugin": "~5.5.0", "http-proxy": "~1.18.1", "http2-express-bridge": "~1.0.7", "https-proxy-agent": "~5.0.0", + "ignore": "~5.1.6", + "import-lazy": "~4.0.0", "jest": "~29.3.1", + "jest-config": "~30.3.0", "jest-environment-jsdom": "~30.3.0", "jest-environment-node": "~30.3.0", "jest-junit": "12.3.0", + "jest-resolve": "~30.3.0", + "jest-snapshot": "~30.3.0", "jest-watch-select-projects": "2.0.0", + "jju": "~1.4.0", "js-yaml": "~4.3.2", "json-schema-to-typescript": "~15.0.4", + "json-stable-stringify-without-jsonify": "1.0.1", + "jsonpath-plus": "~10.3.0", + "jszip": "~3.8.0", "loader-utils": "1.4.2", "long": "^4.0.0", "memfs": "4.12.0", @@ -759,8 +790,12 @@ "minimatch": "10.2.3", "mocha": "^10.1.0", "node-forge": "~1.4.0", + "npm-package-arg": "~6.1.0", + "npm-packlist": "~5.1.3", + "object-hash": "3.0.0", "playwright": "1.62.1", "playwright-core": "~1.62.1", + "pnpm-sync-lib": "0.3.4", "postcss": "~8.5.10", "postcss-loader": "~6.2.1", "postcss-modules": "~6.0.0", @@ -770,9 +805,11 @@ "react-dom": "~19.2.3", "react-hook-form": "~7.69.0", "react-redux": "~9.2.0", + "read-package-tree": "~5.1.5", "redux": "~5.0.1", "resolve": "~1.22.1", "resolve-pkg-maps": "~1.0.0", + "rxjs": "~6.6.7", "sass": "~1.49.7", "sass-embedded": "~1.85.1", "sass-loader": "~12.4.0", @@ -780,12 +817,17 @@ "serialize-javascript": "7.0.5", "source-map": "~0.7.3", "source-map-loader": "~3.0.1", + "ssri": "~8.0.0", "storybook": "~9.1.6", + "strict-uri-encode": "~2.0.0", "string-argv": "~0.3.1", "style-loader": "~3.3.1", + "supports-color": "~8.1.1", "tapable": "2.3.0", + "tar": "~7.5.6", "terser": "^5.9.0", "terser-webpack-plugin": "~5.3.1", + "true-case-path": "~2.2.1", "ts-loader": "6.0.0", "tslib": "~2.8.1", "tslint": "~5.20.1", diff --git a/common/config/subspaces/build-tests-subspace/repo-state.json b/common/config/subspaces/build-tests-subspace/repo-state.json index 302908769ec..c01a40d492f 100644 --- a/common/config/subspaces/build-tests-subspace/repo-state.json +++ b/common/config/subspaces/build-tests-subspace/repo-state.json @@ -2,6 +2,6 @@ { "pnpmShrinkwrapHash": "f8fb832e9b92a5c0f91084049d31c486a6ecbb76", "preferredVersionsHash": "550b4cee0bef4e97db6c6aad726df5149d20e7d9", - "packageJsonInjectedDependenciesHash": "98bcd62edf9017dd23092dd4a0e6f589b5dfe825", - "pnpmCatalogsHash": "391bcdd3717988bca642d0a18151ad0ab6139d67" + "packageJsonInjectedDependenciesHash": "293debc6ed16567f5567a7748229a73be6647cc6", + "pnpmCatalogsHash": "8fe59ab02858d60e9dcce772036c861bc9527af7" } diff --git a/common/config/subspaces/default/pnpm-lock.yaml b/common/config/subspaces/default/pnpm-lock.yaml index a26857567de..0468a08d5c0 100644 --- a/common/config/subspaces/default/pnpm-lock.yaml +++ b/common/config/subspaces/default/pnpm-lock.yaml @@ -27,9 +27,30 @@ catalogs: '@fluentui/react-components': specifier: ~9.72.9 version: 9.72.11 + '@inquirer/checkbox': + specifier: ~5.1.3 + version: 5.1.3 + '@inquirer/confirm': + specifier: ~6.0.11 + version: 6.0.11 + '@inquirer/input': + specifier: ~5.0.11 + version: 5.0.11 + '@inquirer/search': + specifier: ~4.1.7 + version: 4.1.7 + '@inquirer/select': + specifier: ~5.1.3 + version: 5.1.3 + '@jest/core': + specifier: ~30.3.0 + version: 30.3.0 '@jest/reporters': specifier: ~30.3.0 version: 30.3.0 + '@jest/transform': + specifier: ~30.3.0 + version: 30.3.0 '@jest/types': specifier: 30.3.0 version: 30.3.0 @@ -42,12 +63,18 @@ catalogs: '@microsoft/tsdoc': specifier: ~0.17.0 version: 0.17.0 + '@microsoft/tsdoc-config': + specifier: ~0.18.2 + version: 0.18.2 '@modelcontextprotocol/sdk': specifier: ~1.10.2 version: 1.10.2 '@playwright/test': specifier: ~1.62.1 version: 1.62.1 + '@pnpm/link-bins': + specifier: ~5.3.7 + version: 5.3.25 '@pnpm/types': specifier: 1000.8.0 version: 1000.8.0 @@ -120,6 +147,9 @@ catalogs: '@testing-library/dom': specifier: ~7.21.4 version: 7.21.8 + '@types/argparse': + specifier: 1.0.38 + version: 1.0.38 '@types/aws-lambda': specifier: 8.10.93 version: 8.10.93 @@ -246,15 +276,30 @@ catalogs: '@typescript-eslint/typescript-estree': specifier: ~8.56.1 version: 8.56.1 + '@typescript-eslint/utils': + specifier: ~8.56.1 + version: 8.56.1 '@vscode/test-electron': specifier: ^1.6.2 version: 1.6.2 '@vscode/vsce': specifier: 3.2.1 version: 3.2.1 + '@yarnpkg/lockfile': + specifier: ~1.0.2 + version: 1.0.2 ajv: specifier: ~8.20.0 version: 8.20.0 + ajv-draft-04: + specifier: ~1.0.0 + version: 1.0.0 + ajv-formats: + specifier: ~3.0.1 + version: 3.0.1 + argparse: + specifier: ~1.0.9 + version: 1.0.10 autoprefixer: specifier: ~10.4.2 version: 10.4.27 @@ -285,9 +330,15 @@ catalogs: css-minimizer-webpack-plugin: specifier: ~3.4.1 version: 3.4.1 + dependency-path: + specifier: ~9.2.8 + version: 9.2.8 diff: specifier: ~8.0.2 version: 8.0.4 + dotenv: + specifier: ~16.4.7 + version: 16.4.7 eslint: specifier: ~9.37.0 version: 9.37.0 @@ -306,9 +357,18 @@ catalogs: eslint-plugin-jsdoc: specifier: 50.6.11 version: 50.6.11 + eslint-plugin-promise: + specifier: ~7.2.1 + version: 7.2.1 + eslint-plugin-react: + specifier: ~7.37.5 + version: 7.37.5 eslint-plugin-react-hooks: specifier: 5.2.0 version: 5.2.0 + eslint-plugin-tsdoc: + specifier: ~0.5.3 + version: 0.5.3 express: specifier: 4.21.1 version: 4.21.1 @@ -321,6 +381,12 @@ catalogs: file-loader: specifier: ~6.0.0 version: 6.0.0 + fs-extra: + specifier: ~11.3.0 + version: 11.3.4 + git-repo-info: + specifier: ~2.1.0 + version: 2.1.1 glob: specifier: ~7.0.5 version: 7.0.6 @@ -336,9 +402,18 @@ catalogs: https-proxy-agent: specifier: ~5.0.0 version: 5.0.1 + ignore: + specifier: ~5.1.6 + version: 5.1.9 + import-lazy: + specifier: ~4.0.0 + version: 4.0.0 jest: specifier: ~29.3.1 version: 29.3.1 + jest-config: + specifier: ~30.3.0 + version: 30.3.0 jest-environment-jsdom: specifier: ~30.3.0 version: 30.3.0 @@ -348,15 +423,33 @@ catalogs: jest-junit: specifier: 12.3.0 version: 12.3.0 + jest-resolve: + specifier: ~30.3.0 + version: 30.3.0 + jest-snapshot: + specifier: ~30.3.0 + version: 30.3.0 jest-watch-select-projects: specifier: 2.0.0 version: 2.0.0 + jju: + specifier: ~1.4.0 + version: 1.4.0 js-yaml: specifier: ~4.3.2 version: 4.3.2 json-schema-to-typescript: specifier: ~15.0.4 version: 15.0.4 + json-stable-stringify-without-jsonify: + specifier: 1.0.1 + version: 1.0.1 + jsonpath-plus: + specifier: ~10.3.0 + version: 10.3.0 + jszip: + specifier: ~3.8.0 + version: 3.8.0 loader-utils: specifier: 1.4.2 version: 1.4.2 @@ -378,12 +471,24 @@ catalogs: node-forge: specifier: ~1.4.0 version: 1.4.0 + npm-package-arg: + specifier: ~6.1.0 + version: 6.1.1 + npm-packlist: + specifier: ~5.1.3 + version: 5.1.3 + object-hash: + specifier: 3.0.0 + version: 3.0.0 playwright: specifier: 1.62.1 version: 1.62.1 playwright-core: specifier: ~1.62.1 version: 1.62.1 + pnpm-sync-lib: + specifier: 0.3.4 + version: 0.3.4 postcss: specifier: ~8.5.10 version: 8.5.12 @@ -411,6 +516,9 @@ catalogs: react-redux: specifier: ~9.2.0 version: 9.2.0 + read-package-tree: + specifier: ~5.1.5 + version: 5.1.6 redux: specifier: ~5.0.1 version: 5.0.1 @@ -420,6 +528,9 @@ catalogs: resolve-pkg-maps: specifier: ~1.0.0 version: 1.0.0 + rxjs: + specifier: ~6.6.7 + version: 6.6.7 sass: specifier: ~1.49.7 version: 1.49.11 @@ -441,24 +552,39 @@ catalogs: source-map-loader: specifier: ~3.0.1 version: 3.0.2 + ssri: + specifier: ~8.0.0 + version: 8.0.1 storybook: specifier: ~9.1.6 version: 9.1.20 + strict-uri-encode: + specifier: ~2.0.0 + version: 2.0.0 string-argv: specifier: ~0.3.1 version: 0.3.2 style-loader: specifier: ~3.3.1 version: 3.3.4 + supports-color: + specifier: ~8.1.1 + version: 8.1.1 tapable: specifier: 2.3.0 version: 2.3.0 + tar: + specifier: ~7.5.6 + version: 7.5.13 terser: specifier: ^5.9.0 version: 5.46.1 terser-webpack-plugin: specifier: ~5.3.1 version: 5.3.17 + true-case-path: + specifier: ~2.2.1 + version: 2.2.1 ts-loader: specifier: 6.0.0 version: 6.0.0 @@ -565,10 +691,10 @@ importers: specifier: workspace:* version: link:../../libraries/api-extractor-model '@microsoft/tsdoc': - specifier: ~0.17.0 + specifier: 'catalog:' version: 0.17.0 '@microsoft/tsdoc-config': - specifier: ~0.18.2 + specifier: 'catalog:' version: 0.18.2 '@rushstack/node-core-library': specifier: workspace:* @@ -583,16 +709,16 @@ importers: specifier: workspace:* version: link:../../libraries/ts-command-line diff: - specifier: ~8.0.2 + specifier: 'catalog:' version: 8.0.4 minimatch: - specifier: 10.2.3 + specifier: 'catalog:' version: 10.2.3 resolve: - specifier: ~1.22.1 + specifier: 'catalog:' version: 1.22.11 semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 source-map: specifier: ~0.6.1 @@ -660,22 +786,22 @@ importers: specifier: workspace:* version: link:../../libraries/ts-command-line '@types/tapable': - specifier: 1.0.6 + specifier: 'catalog:' version: 1.0.6 fast-glob: - specifier: ~3.3.1 + specifier: 'catalog:' version: 3.3.3 git-repo-info: - specifier: ~2.1.0 + specifier: 'catalog:' version: 2.1.1 ignore: - specifier: ~5.1.6 + specifier: 'catalog:' version: 5.1.9 tapable: specifier: 1.1.3 version: 1.1.3 watchpack: - specifier: 2.4.0 + specifier: 'catalog:' version: 2.4.0 devDependencies: '@microsoft/api-extractor': @@ -3518,25 +3644,25 @@ importers: specifier: workspace:* version: link:../eslint-plugin-security '@typescript-eslint/eslint-plugin': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(@typescript-eslint/parser@8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2))(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) '@typescript-eslint/parser': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) '@typescript-eslint/typescript-estree': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(supports-color@8.1.1)(typescript@5.8.2) '@typescript-eslint/utils': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) eslint-plugin-promise: - specifier: ~7.2.1 + specifier: 'catalog:' version: 7.2.1(eslint@9.37.0(supports-color@8.1.1)) eslint-plugin-react: - specifier: ~7.37.5 + specifier: 'catalog:' version: 7.37.5(eslint@9.37.0(supports-color@8.1.1)) eslint-plugin-tsdoc: - specifier: ~0.5.3 + specifier: 'catalog:' version: 0.5.3(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) devDependencies: '@rushstack/heft': @@ -3588,7 +3714,7 @@ importers: specifier: workspace:* version: link:../../libraries/tree-pattern '@typescript-eslint/utils': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) devDependencies: '@rushstack/heft': @@ -3619,7 +3745,7 @@ importers: specifier: workspace:* version: link:../../libraries/tree-pattern '@typescript-eslint/utils': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) devDependencies: '@rushstack/heft': @@ -3644,7 +3770,7 @@ importers: specifier: workspace:* version: link:../../libraries/tree-pattern '@typescript-eslint/utils': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) devDependencies: '@rushstack/heft': @@ -3681,28 +3807,28 @@ importers: specifier: workspace:* version: link:../eslint-plugin '@typescript-eslint/eslint-plugin': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(@typescript-eslint/parser@8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2))(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) '@typescript-eslint/parser': - specifier: ~8.56.1 + specifier: 'catalog:' version: 8.56.1(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.8.2) eslint-import-resolver-node: - specifier: 0.3.9 + specifier: 'catalog:' version: 0.3.9 eslint-plugin-header: - specifier: ~3.1.1 + specifier: 'catalog:' version: 3.1.1(eslint@9.37.0(supports-color@8.1.1)) eslint-plugin-headers: - specifier: ~1.2.1 + specifier: 'catalog:' version: 1.2.1(eslint@9.37.0(supports-color@8.1.1)) eslint-plugin-import: - specifier: 2.32.0 + specifier: 'catalog:' version: 2.32.0(eslint@9.37.0(supports-color@8.1.1)) eslint-plugin-jsdoc: - specifier: 50.6.11 + specifier: 'catalog:' version: 50.6.11(eslint@9.37.0(supports-color@8.1.1))(supports-color@8.1.1) eslint-plugin-react-hooks: - specifier: 5.2.0 + specifier: 'catalog:' version: 5.2.0(eslint@9.37.0(supports-color@8.1.1)) devDependencies: '@rushstack/heft': @@ -3724,7 +3850,7 @@ importers: specifier: workspace:* version: link:../../libraries/node-core-library semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 devDependencies: '@microsoft/api-extractor': @@ -3799,13 +3925,13 @@ importers: ../../../heft-plugins/heft-jest-plugin: dependencies: '@jest/core': - specifier: ~30.3.0 + specifier: 'catalog:' version: 30.3.0(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0)(supports-color@8.1.1))(supports-color@8.1.1) '@jest/reporters': - specifier: ~30.3.0 + specifier: 'catalog:' version: 30.3.0(supports-color@8.1.1) '@jest/transform': - specifier: ~30.3.0 + specifier: 'catalog:' version: 30.3.0(supports-color@8.1.1) '@rushstack/heft-config-file': specifier: workspace:* @@ -3817,13 +3943,13 @@ importers: specifier: workspace:* version: link:../../libraries/terminal jest-config: - specifier: ~30.3.0 + specifier: 'catalog:' version: 30.3.0(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0)(supports-color@8.1.1))(supports-color@8.1.1) jest-resolve: - specifier: ~30.3.0 + specifier: 'catalog:' version: 30.3.0 jest-snapshot: - specifier: ~30.3.0 + specifier: 'catalog:' version: 30.3.0(supports-color@8.1.1) devDependencies: '@jest/types': @@ -3882,10 +4008,10 @@ importers: specifier: workspace:* version: link:../../libraries/node-core-library json-stable-stringify-without-jsonify: - specifier: 1.0.1 + specifier: 'catalog:' version: 1.0.1 semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 devDependencies: '@rushstack/heft': @@ -4124,10 +4250,10 @@ importers: specifier: workspace:* version: link:../../libraries/node-core-library '@types/tapable': - specifier: 1.0.6 + specifier: 'catalog:' version: 1.0.6 semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 tapable: specifier: 1.1.3 @@ -4260,10 +4386,10 @@ importers: ../../../libraries/api-extractor-model: dependencies: '@microsoft/tsdoc': - specifier: ~0.17.0 + specifier: 'catalog:' version: 0.17.0 '@microsoft/tsdoc-config': - specifier: ~0.18.2 + specifier: 'catalog:' version: 0.18.2 '@rushstack/node-core-library': specifier: workspace:* @@ -4332,7 +4458,7 @@ importers: specifier: workspace:* version: link:../terminal jsonpath-plus: - specifier: ~10.3.0 + specifier: 'catalog:' version: 10.3.0 devDependencies: '@rushstack/heft': @@ -4434,28 +4560,28 @@ importers: ../../../libraries/node-core-library: dependencies: ajv: - specifier: ~8.20.0 + specifier: 'catalog:' version: 8.20.0 ajv-draft-04: - specifier: ~1.0.0 + specifier: 'catalog:' version: 1.0.0(ajv@8.20.0) ajv-formats: - specifier: ~3.0.1 + specifier: 'catalog:' version: 3.0.1(ajv@8.20.0) fs-extra: - specifier: ~11.3.0 + specifier: 'catalog:' version: 11.3.4 import-lazy: - specifier: ~4.0.0 + specifier: 'catalog:' version: 4.0.0 jju: - specifier: ~1.4.0 + specifier: 'catalog:' version: 1.4.0 resolve: - specifier: ~1.22.1 + specifier: 'catalog:' version: 1.22.11 semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 devDependencies: '@rushstack/heft': @@ -4489,7 +4615,7 @@ importers: specifier: workspace:* version: link:../node-core-library semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 devDependencies: '@rushstack/heft': @@ -4543,7 +4669,7 @@ importers: ../../../libraries/package-extractor: dependencies: '@pnpm/link-bins': - specifier: ~5.3.7 + specifier: 'catalog:' version: 5.3.25 '@rushstack/node-core-library': specifier: workspace:* @@ -4555,19 +4681,19 @@ importers: specifier: workspace:* version: link:../ts-command-line ignore: - specifier: ~5.1.6 + specifier: 'catalog:' version: 5.1.9 jszip: - specifier: ~3.8.0 + specifier: 'catalog:' version: 3.8.0 minimatch: - specifier: 10.2.3 + specifier: 'catalog:' version: 10.2.3 npm-packlist: - specifier: ~5.1.3 + specifier: 'catalog:' version: 5.1.3 semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 devDependencies: '@rushstack/heft': @@ -4613,7 +4739,7 @@ importers: ../../../libraries/reporter: dependencies: semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 devDependencies: '@rushstack/heft': @@ -4635,10 +4761,10 @@ importers: ../../../libraries/rig-package: dependencies: jju: - specifier: ~1.4.0 + specifier: 'catalog:' version: 1.4.0 resolve: - specifier: ~1.22.1 + specifier: 'catalog:' version: 1.22.11 devDependencies: '@rushstack/heft': @@ -4756,22 +4882,22 @@ importers: ../../../libraries/rush-lib: dependencies: '@inquirer/checkbox': - specifier: ~5.1.3 + specifier: 'catalog:' version: 5.1.3(@types/node@22.9.3) '@inquirer/confirm': - specifier: ~6.0.11 + specifier: 'catalog:' version: 6.0.11(@types/node@22.9.3) '@inquirer/input': - specifier: ~5.0.11 + specifier: 'catalog:' version: 5.0.11(@types/node@22.9.3) '@inquirer/search': - specifier: ~4.1.7 + specifier: 'catalog:' version: 4.1.7(@types/node@22.9.3) '@inquirer/select': - specifier: ~5.1.3 + specifier: 'catalog:' version: 5.1.3(@types/node@22.9.3) '@pnpm/link-bins': - specifier: ~5.3.7 + specifier: 'catalog:' version: 5.3.25 '@rushstack/credential-cache': specifier: workspace:* @@ -4819,61 +4945,61 @@ importers: specifier: workspace:* version: link:../ts-command-line '@yarnpkg/lockfile': - specifier: ~1.0.2 + specifier: 'catalog:' version: 1.0.2 dependency-path: - specifier: ~9.2.8 + specifier: 'catalog:' version: 9.2.8 dotenv: - specifier: ~16.4.7 + specifier: 'catalog:' version: 16.4.7 fast-glob: - specifier: ~3.3.1 + specifier: 'catalog:' version: 3.3.3 git-repo-info: - specifier: ~2.1.0 + specifier: 'catalog:' version: 2.1.1 https-proxy-agent: - specifier: ~5.0.0 + specifier: 'catalog:' version: 5.0.1(supports-color@8.1.1) ignore: - specifier: ~5.1.6 + specifier: 'catalog:' version: 5.1.9 js-yaml: - specifier: ~4.3.2 + specifier: 'catalog:' version: 4.3.2 npm-package-arg: - specifier: ~6.1.0 + specifier: 'catalog:' version: 6.1.1 object-hash: - specifier: 3.0.0 + specifier: 'catalog:' version: 3.0.0 pnpm-sync-lib: - specifier: 0.3.4 + specifier: 'catalog:' version: 0.3.4 read-package-tree: - specifier: ~5.1.5 + specifier: 'catalog:' version: 5.1.6 rxjs: - specifier: ~6.6.7 + specifier: 'catalog:' version: 6.6.7 semver: - specifier: ~7.7.4 + specifier: 'catalog:' version: 7.7.4 ssri: - specifier: ~8.0.0 + specifier: 'catalog:' version: 8.0.1 strict-uri-encode: - specifier: ~2.0.0 + specifier: 'catalog:' version: 2.0.0 tapable: specifier: 2.2.1 version: 2.2.1 tar: - specifier: ~7.5.6 + specifier: 'catalog:' version: 7.5.13 true-case-path: - specifier: ~2.2.1 + specifier: 'catalog:' version: 2.2.1 devDependencies: '@pnpm/lockfile.types-900': @@ -5155,7 +5281,7 @@ importers: specifier: workspace:* version: link:../problem-matcher supports-color: - specifier: ~8.1.1 + specifier: 'catalog:' version: 8.1.1 devDependencies: '@rushstack/heft': @@ -5189,13 +5315,13 @@ importers: specifier: workspace:* version: link:../terminal '@types/argparse': - specifier: 1.0.38 + specifier: 'catalog:' version: 1.0.38 argparse: - specifier: ~1.0.9 + specifier: 'catalog:' version: 1.0.10 string-argv: - specifier: ~0.3.1 + specifier: 'catalog:' version: 0.3.2 devDependencies: '@rushstack/heft': @@ -5400,16 +5526,16 @@ importers: specifier: workspace:* version: link:../../heft-plugins/heft-typescript-plugin '@types/jest': - specifier: 30.0.0 + specifier: 'catalog:' version: 30.0.0 eslint: - specifier: ~9.37.0 + specifier: 'catalog:' version: 9.37.0(supports-color@8.1.1) jest-environment-node: - specifier: ~30.3.0 + specifier: 'catalog:' version: 30.3.0 typescript: - specifier: ~5.8.2 + specifier: 'catalog:' version: 5.8.2 devDependencies: '@rushstack/heft': @@ -5559,22 +5685,22 @@ importers: specifier: workspace:* version: link:../heft-node-rig '@types/jest': - specifier: 30.0.0 + specifier: 'catalog:' version: 30.0.0 '@types/node': - specifier: 20.17.19 + specifier: 'catalog:' version: 20.17.19 eslint: - specifier: ~9.37.0 + specifier: 'catalog:' version: 9.37.0(supports-color@8.1.1) jest-junit: - specifier: 12.3.0 + specifier: 'catalog:' version: 12.3.0 local-eslint-config: specifier: workspace:* version: link:../../eslint/local-eslint-config typescript: - specifier: ~5.8.2 + specifier: 'catalog:' version: 5.8.2 ../../../rigs/local-web-rig: diff --git a/common/config/subspaces/default/repo-state.json b/common/config/subspaces/default/repo-state.json index 3a064c44001..da6c7fb7c79 100644 --- a/common/config/subspaces/default/repo-state.json +++ b/common/config/subspaces/default/repo-state.json @@ -1,6 +1,6 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "ad9a79bc2052830dea61321b24abfd0e54330bb3", + "pnpmShrinkwrapHash": "ed8db22675cdd2cace93a7f948287243fd91b7c9", "preferredVersionsHash": "029c99bd6e65c5e1f25e2848340509811ff9753c", - "pnpmCatalogsHash": "391bcdd3717988bca642d0a18151ad0ab6139d67" + "pnpmCatalogsHash": "8fe59ab02858d60e9dcce772036c861bc9527af7" } diff --git a/eslint/eslint-config/package.json b/eslint/eslint-config/package.json index f6d1a73f075..762709078c0 100644 --- a/eslint/eslint-config/package.json +++ b/eslint/eslint-config/package.json @@ -55,13 +55,13 @@ "@rushstack/eslint-plugin": "workspace:*", "@rushstack/eslint-plugin-packlets": "workspace:*", "@rushstack/eslint-plugin-security": "workspace:*", - "@typescript-eslint/eslint-plugin": "~8.56.1", - "@typescript-eslint/utils": "~8.56.1", - "@typescript-eslint/parser": "~8.56.1", - "@typescript-eslint/typescript-estree": "~8.56.1", - "eslint-plugin-promise": "~7.2.1", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-tsdoc": "~0.5.3" + "@typescript-eslint/eslint-plugin": "catalog:", + "@typescript-eslint/utils": "catalog:", + "@typescript-eslint/parser": "catalog:", + "@typescript-eslint/typescript-estree": "catalog:", + "eslint-plugin-promise": "catalog:", + "eslint-plugin-react": "catalog:", + "eslint-plugin-tsdoc": "catalog:" }, "devDependencies": { "@rushstack/heft": "1.3.4", diff --git a/eslint/eslint-plugin-packlets/package.json b/eslint/eslint-plugin-packlets/package.json index 6bddc571c23..e0bbe653772 100644 --- a/eslint/eslint-plugin-packlets/package.json +++ b/eslint/eslint-plugin-packlets/package.json @@ -51,7 +51,7 @@ }, "dependencies": { "@rushstack/tree-pattern": "workspace:*", - "@typescript-eslint/utils": "~8.56.1" + "@typescript-eslint/utils": "catalog:" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" diff --git a/eslint/eslint-plugin-security/package.json b/eslint/eslint-plugin-security/package.json index 6fea9d8bc9e..5d2cd37415f 100644 --- a/eslint/eslint-plugin-security/package.json +++ b/eslint/eslint-plugin-security/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "@rushstack/tree-pattern": "workspace:*", - "@typescript-eslint/utils": "~8.56.1" + "@typescript-eslint/utils": "catalog:" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" diff --git a/eslint/eslint-plugin/package.json b/eslint/eslint-plugin/package.json index a41ef8ce1b1..7f0bd4e5454 100644 --- a/eslint/eslint-plugin/package.json +++ b/eslint/eslint-plugin/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@rushstack/tree-pattern": "workspace:*", - "@typescript-eslint/utils": "~8.56.1" + "@typescript-eslint/utils": "catalog:" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" diff --git a/eslint/local-eslint-config/package.json b/eslint/local-eslint-config/package.json index b56a17a794f..5de458d3102 100644 --- a/eslint/local-eslint-config/package.json +++ b/eslint/local-eslint-config/package.json @@ -21,13 +21,13 @@ "@rushstack/eslint-config": "workspace:*", "@rushstack/eslint-patch": "workspace:*", "@rushstack/eslint-plugin": "workspace:*", - "@typescript-eslint/eslint-plugin": "~8.56.1", - "@typescript-eslint/parser": "~8.56.1", - "eslint-import-resolver-node": "0.3.9", - "eslint-plugin-header": "~3.1.1", - "eslint-plugin-headers": "~1.2.1", - "eslint-plugin-import": "2.32.0", - "eslint-plugin-jsdoc": "50.6.11", - "eslint-plugin-react-hooks": "5.2.0" + "@typescript-eslint/eslint-plugin": "catalog:", + "@typescript-eslint/parser": "catalog:", + "eslint-import-resolver-node": "catalog:", + "eslint-plugin-header": "catalog:", + "eslint-plugin-headers": "catalog:", + "eslint-plugin-import": "catalog:", + "eslint-plugin-jsdoc": "catalog:", + "eslint-plugin-react-hooks": "catalog:" } } diff --git a/heft-plugins/heft-api-extractor-plugin/package.json b/heft-plugins/heft-api-extractor-plugin/package.json index a9091484b3d..b2986895055 100644 --- a/heft-plugins/heft-api-extractor-plugin/package.json +++ b/heft-plugins/heft-api-extractor-plugin/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@rushstack/node-core-library": "workspace:*", - "semver": "~7.7.4" + "semver": "catalog:" }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", diff --git a/heft-plugins/heft-jest-plugin/package.json b/heft-plugins/heft-jest-plugin/package.json index 566468dd598..ed1c7ef2eac 100644 --- a/heft-plugins/heft-jest-plugin/package.json +++ b/heft-plugins/heft-jest-plugin/package.json @@ -37,15 +37,15 @@ } }, "dependencies": { - "@jest/core": "~30.3.0", - "@jest/reporters": "~30.3.0", - "@jest/transform": "~30.3.0", + "@jest/core": "catalog:", + "@jest/reporters": "catalog:", + "@jest/transform": "catalog:", "@rushstack/heft-config-file": "workspace:*", "@rushstack/node-core-library": "workspace:*", "@rushstack/terminal": "workspace:*", - "jest-config": "~30.3.0", - "jest-resolve": "~30.3.0", - "jest-snapshot": "~30.3.0" + "jest-config": "catalog:", + "jest-resolve": "catalog:", + "jest-snapshot": "catalog:" }, "devDependencies": { "@jest/types": "catalog:", diff --git a/heft-plugins/heft-lint-plugin/package.json b/heft-plugins/heft-lint-plugin/package.json index a72ded17d1d..4d5a375ba6a 100644 --- a/heft-plugins/heft-lint-plugin/package.json +++ b/heft-plugins/heft-lint-plugin/package.json @@ -24,8 +24,8 @@ }, "dependencies": { "@rushstack/node-core-library": "workspace:*", - "json-stable-stringify-without-jsonify": "1.0.1", - "semver": "~7.7.4" + "json-stable-stringify-without-jsonify": "catalog:", + "semver": "catalog:" }, "devDependencies": { "@rushstack/heft-typescript-plugin": "workspace:*", diff --git a/heft-plugins/heft-typescript-plugin/package.json b/heft-plugins/heft-typescript-plugin/package.json index ddcd3d6d8aa..8b470b72132 100644 --- a/heft-plugins/heft-typescript-plugin/package.json +++ b/heft-plugins/heft-typescript-plugin/package.json @@ -52,8 +52,8 @@ "dependencies": { "@rushstack/node-core-library": "workspace:*", "@rushstack/heft-config-file": "workspace:*", - "@types/tapable": "1.0.6", - "semver": "~7.7.4", + "@types/tapable": "catalog:", + "semver": "catalog:", "tapable": "1.1.3" }, "devDependencies": { diff --git a/libraries/api-extractor-model/package.json b/libraries/api-extractor-model/package.json index 4ed4642e022..314dfa1a1d8 100644 --- a/libraries/api-extractor-model/package.json +++ b/libraries/api-extractor-model/package.json @@ -44,8 +44,8 @@ "_phase:test": "heft run --only test -- --clean" }, "dependencies": { - "@microsoft/tsdoc": "~0.17.0", - "@microsoft/tsdoc-config": "~0.18.2", + "@microsoft/tsdoc": "catalog:", + "@microsoft/tsdoc-config": "catalog:", "@rushstack/node-core-library": "workspace:*" }, "devDependencies": { diff --git a/libraries/heft-config-file/package.json b/libraries/heft-config-file/package.json index f456d4611ec..8af24d0f6da 100644 --- a/libraries/heft-config-file/package.json +++ b/libraries/heft-config-file/package.json @@ -48,7 +48,7 @@ "@rushstack/node-core-library": "workspace:*", "@rushstack/rig-package": "workspace:*", "@rushstack/terminal": "workspace:*", - "jsonpath-plus": "~10.3.0" + "jsonpath-plus": "catalog:" }, "devDependencies": { "@rushstack/heft": "1.3.4", diff --git a/libraries/node-core-library/package.json b/libraries/node-core-library/package.json index f695f401e52..1e5ea7c416a 100644 --- a/libraries/node-core-library/package.json +++ b/libraries/node-core-library/package.json @@ -43,14 +43,14 @@ "_phase:test": "heft run --only test -- --clean" }, "dependencies": { - "fs-extra": "~11.3.0", - "import-lazy": "~4.0.0", - "jju": "~1.4.0", - "resolve": "~1.22.1", - "semver": "~7.7.4", - "ajv": "~8.20.0", - "ajv-draft-04": "~1.0.0", - "ajv-formats": "~3.0.1" + "fs-extra": "catalog:", + "import-lazy": "catalog:", + "jju": "catalog:", + "resolve": "catalog:", + "semver": "catalog:", + "ajv": "catalog:", + "ajv-draft-04": "catalog:", + "ajv-formats": "catalog:" }, "devDependencies": { "@rushstack/heft": "1.3.4", diff --git a/libraries/npm-check-fork/package.json b/libraries/npm-check-fork/package.json index 165db5314e9..0ae6044a694 100644 --- a/libraries/npm-check-fork/package.json +++ b/libraries/npm-check-fork/package.json @@ -45,7 +45,7 @@ "_phase:test": "heft run --only test -- --clean" }, "dependencies": { - "semver": "~7.7.4", + "semver": "catalog:", "@rushstack/node-core-library": "workspace:*" }, "devDependencies": { diff --git a/libraries/package-extractor/package.json b/libraries/package-extractor/package.json index c23a9ef5aa1..cac2485aec0 100644 --- a/libraries/package-extractor/package.json +++ b/libraries/package-extractor/package.json @@ -44,15 +44,15 @@ }, "license": "MIT", "dependencies": { - "@pnpm/link-bins": "~5.3.7", + "@pnpm/link-bins": "catalog:", "@rushstack/node-core-library": "workspace:*", "@rushstack/terminal": "workspace:*", "@rushstack/ts-command-line": "workspace:*", - "ignore": "~5.1.6", - "jszip": "~3.8.0", - "minimatch": "10.2.3", - "npm-packlist": "~5.1.3", - "semver": "~7.7.4" + "ignore": "catalog:", + "jszip": "catalog:", + "minimatch": "catalog:", + "npm-packlist": "catalog:", + "semver": "catalog:" }, "devDependencies": { "local-node-rig": "workspace:*", diff --git a/libraries/reporter/package.json b/libraries/reporter/package.json index 293078e958f..aebb543d962 100644 --- a/libraries/reporter/package.json +++ b/libraries/reporter/package.json @@ -66,6 +66,6 @@ }, "sideEffects": false, "dependencies": { - "semver": "~7.7.4" + "semver": "catalog:" } } diff --git a/libraries/rig-package/package.json b/libraries/rig-package/package.json index c7403aa57d0..c71d4583b42 100644 --- a/libraries/rig-package/package.json +++ b/libraries/rig-package/package.json @@ -44,8 +44,8 @@ "_phase:test": "heft run --only test -- --clean" }, "dependencies": { - "jju": "~1.4.0", - "resolve": "~1.22.1" + "jju": "catalog:", + "resolve": "catalog:" }, "devDependencies": { "@rushstack/heft": "1.3.4", diff --git a/libraries/rush-lib/package.json b/libraries/rush-lib/package.json index 6e9ca8d07a7..db7562f7fb3 100644 --- a/libraries/rush-lib/package.json +++ b/libraries/rush-lib/package.json @@ -42,7 +42,7 @@ }, "license": "MIT", "dependencies": { - "@pnpm/link-bins": "~5.3.7", + "@pnpm/link-bins": "catalog:", "@rushstack/credential-cache": "workspace:*", "@rushstack/heft-config-file": "workspace:*", "@rushstack/lookup-by-path": "workspace:*", @@ -58,30 +58,30 @@ "@rushstack/stream-collator": "workspace:*", "@rushstack/terminal": "workspace:*", "@rushstack/ts-command-line": "workspace:*", - "@yarnpkg/lockfile": "~1.0.2", - "dependency-path": "~9.2.8", - "dotenv": "~16.4.7", - "fast-glob": "~3.3.1", - "git-repo-info": "~2.1.0", - "https-proxy-agent": "~5.0.0", - "ignore": "~5.1.6", - "@inquirer/checkbox": "~5.1.3", - "@inquirer/confirm": "~6.0.11", - "@inquirer/input": "~5.0.11", - "@inquirer/search": "~4.1.7", - "@inquirer/select": "~5.1.3", - "js-yaml": "~4.3.2", - "npm-package-arg": "~6.1.0", - "object-hash": "3.0.0", - "pnpm-sync-lib": "0.3.4", - "read-package-tree": "~5.1.5", - "rxjs": "~6.6.7", - "semver": "~7.7.4", - "ssri": "~8.0.0", - "strict-uri-encode": "~2.0.0", + "@yarnpkg/lockfile": "catalog:", + "dependency-path": "catalog:", + "dotenv": "catalog:", + "fast-glob": "catalog:", + "git-repo-info": "catalog:", + "https-proxy-agent": "catalog:", + "ignore": "catalog:", + "@inquirer/checkbox": "catalog:", + "@inquirer/confirm": "catalog:", + "@inquirer/input": "catalog:", + "@inquirer/search": "catalog:", + "@inquirer/select": "catalog:", + "js-yaml": "catalog:", + "npm-package-arg": "catalog:", + "object-hash": "catalog:", + "pnpm-sync-lib": "catalog:", + "read-package-tree": "catalog:", + "rxjs": "catalog:", + "semver": "catalog:", + "ssri": "catalog:", + "strict-uri-encode": "catalog:", "tapable": "2.2.1", - "tar": "~7.5.6", - "true-case-path": "~2.2.1" + "tar": "catalog:", + "true-case-path": "catalog:" }, "devDependencies": { "@pnpm/lockfile.types-900": "npm:@pnpm/lockfile.types@~900.0.0", diff --git a/libraries/rush-lib/src/api/Subspace.ts b/libraries/rush-lib/src/api/Subspace.ts index 1017d7ac042..5353f6b8498 100644 --- a/libraries/rush-lib/src/api/Subspace.ts +++ b/libraries/rush-lib/src/api/Subspace.ts @@ -15,7 +15,8 @@ import { CommonVersionsConfiguration } from './CommonVersionsConfiguration'; import { RepoStateFile } from '../logic/RepoStateFile'; import type { PnpmPackageManager } from './packageManager/PnpmPackageManager'; import { PnpmOptionsConfiguration } from '../logic/pnpm/PnpmOptionsConfiguration'; -import { getEffectivePnpmCatalogs } from '../logic/pnpm/EffectivePnpmOptions'; +import { getEffectivePnpmCatalogs, type PnpmCatalogs } from '../logic/pnpm/EffectivePnpmOptions'; +import { tryGetPnpmCatalogVersion, tryParsePnpmCatalogName } from '../logic/pnpm/PnpmCatalogReference'; import { SubspacePnpmfileConfiguration } from '../logic/pnpm/SubspacePnpmfileConfiguration'; import type { ISubspacePnpmfileShimSettings } from '../logic/pnpm/IPnpmfile'; @@ -469,6 +470,27 @@ export class Subspace { this.#rushConfiguration.projects.map((rushProject) => rushProject.packageName) ); + const catalogsBySubspaceName: Map = new Map(); + const getOtherSubspaceCatalogs: (rushProject: RushConfigurationProject) => PnpmCatalogs | undefined = ( + rushProject: RushConfigurationProject + ) => { + // PNPM resolves the catalog references of this subspace's own projects, and the subspace pnpmfile + // shim resolves the references of projects from other subspaces using that subspace's catalogs. + if (this.contains(rushProject)) { + return undefined; + } + + const { subspace } = rushProject; + if (!catalogsBySubspaceName.has(subspace.subspaceName)) { + catalogsBySubspaceName.set( + subspace.subspaceName, + getEffectivePnpmCatalogs(subspace, this.#rushConfiguration) + ); + } + + return catalogsBySubspaceName.get(subspace.subspaceName); + }; + // get all related package.json while (relatedProjects.length > 0) { const rushProject: RushConfigurationProject = relatedProjects.pop()!; @@ -494,12 +516,15 @@ export class Subspace { } } + // A catalog reference in a project from another subspace is installed as the version from that + // subspace's catalog, so hash the resolved version to detect changes to the catalog entry. + const catalogs: PnpmCatalogs | undefined = getOtherSubspaceCatalogs(rushProject); allPackageJson.push({ name, bin, - dependencies, - peerDependencies, - optionalDependencies, + dependencies: _resolveCatalogReferences(dependencies, catalogs), + peerDependencies: _resolveCatalogReferences(peerDependencies, catalogs), + optionalDependencies: _resolveCatalogReferences(optionalDependencies, catalogs), dependenciesMeta, peerDependenciesMeta, resolutions @@ -520,3 +545,33 @@ export class Subspace { return packageJsonInjectedDependenciesHash; } } + +/** + * Returns a copy of the dependencies with the PNPM catalog references replaced by the versions from the + * catalogs, or the original object if it has no references that can be resolved. + */ +function _resolveCatalogReferences( + dependencies: Record | undefined, + catalogs: PnpmCatalogs | undefined +): Record | undefined { + if (!dependencies || !catalogs) { + return dependencies; + } + + let result: Record | undefined; + for (const [dependencyName, versionSpecifier] of Object.entries(dependencies)) { + const catalogName: string | undefined = tryParsePnpmCatalogName(versionSpecifier); + if (catalogName !== undefined) { + const catalogVersion: string | undefined = tryGetPnpmCatalogVersion( + catalogs, + catalogName, + dependencyName + ); + if (catalogVersion !== undefined) { + (result ??= { ...dependencies })[dependencyName] = catalogVersion; + } + } + } + + return result ?? dependencies; +} diff --git a/libraries/rush-lib/src/api/test/Subspace.test.ts b/libraries/rush-lib/src/api/test/Subspace.test.ts index b0da41b9888..691951531fd 100644 --- a/libraries/rush-lib/src/api/test/Subspace.test.ts +++ b/libraries/rush-lib/src/api/test/Subspace.test.ts @@ -4,6 +4,8 @@ import * as crypto from 'node:crypto'; import * as path from 'node:path'; +import type { IPackageJson } from '@rushstack/node-core-library'; + import { RushConfiguration } from '../RushConfiguration'; import { Subspace } from '../Subspace'; @@ -169,5 +171,76 @@ describe(Subspace.name, () => { expect(hashAfter).toBeDefined(); expect(hashBefore).not.toBe(hashAfter); }); + + describe('with catalog references in injected projects from other subspaces', () => { + // The "catalog-consumer" project in "consumer-subspace" injects the "catalog-provider" project from the + // default subspace, which depends on "transitive-provider". Both providers reference the default + // subspace's catalogs. + const injectedSubspaceCatalogsRushJson: string = path.resolve( + __dirname, + '../../logic/pnpm/test/repoWithInjectedSubspaceCatalogs/rush.json' + ); + + it('hashes the catalog versions instead of the catalog references', () => { + const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( + injectedSubspaceCatalogsRushJson + ); + const consumerSubspace: Subspace = rushConfiguration.getSubspace('consumer-subspace'); + + const hashBefore: string | undefined = consumerSubspace.getPackageJsonInjectedDependenciesHash(); + + // Replace the catalog references with the versions from the default subspace's catalogs + const providerPackageJson: IPackageJson = + rushConfiguration.getProjectByName('catalog-provider')!.packageJson; + providerPackageJson.dependencies = { + ...providerPackageJson.dependencies, + lodash: '^4.17.21', + semver: '~7.5.4' + }; + providerPackageJson.optionalDependencies = { fsevents: '~2.3.2' }; + providerPackageJson.peerDependencies = { typescript: '~5.3.0' }; + rushConfiguration.getProjectByName('transitive-provider')!.packageJson.dependencies = { + lodash: '^4.17.21' + }; + + const hashAfter: string | undefined = consumerSubspace.getPackageJsonInjectedDependenciesHash(); + + expect(hashBefore).toBeDefined(); + expect(hashAfter).toBe(hashBefore); + }); + + it("changes when an entry in the injected project's subspace catalog changes", () => { + const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( + injectedSubspaceCatalogsRushJson + ); + const consumerSubspace: Subspace = rushConfiguration.getSubspace('consumer-subspace'); + + const hashBefore: string | undefined = consumerSubspace.getPackageJsonInjectedDependenciesHash(); + + rushConfiguration.pnpmOptions.globalCatalogs!.default.semver = '~7.6.0'; + + const hashAfter: string | undefined = consumerSubspace.getPackageJsonInjectedDependenciesHash(); + + expect(hashBefore).toBeDefined(); + expect(hashAfter).toBeDefined(); + expect(hashAfter).not.toBe(hashBefore); + }); + + it("does not change when the consuming subspace's own catalog changes", () => { + const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( + injectedSubspaceCatalogsRushJson + ); + const consumerSubspace: Subspace = rushConfiguration.getSubspace('consumer-subspace'); + + const hashBefore: string | undefined = consumerSubspace.getPackageJsonInjectedDependenciesHash(); + + consumerSubspace.getPnpmOptions()!.globalCatalogs!.default.semver = '^6.1.0'; + + const hashAfter: string | undefined = consumerSubspace.getPackageJsonInjectedDependenciesHash(); + + expect(hashBefore).toBeDefined(); + expect(hashAfter).toBe(hashBefore); + }); + }); }); }); diff --git a/libraries/rush-lib/src/logic/pnpm/IPnpmfile.ts b/libraries/rush-lib/src/logic/pnpm/IPnpmfile.ts index 50e9ddadd25..ad2346c2237 100644 --- a/libraries/rush-lib/src/logic/pnpm/IPnpmfile.ts +++ b/libraries/rush-lib/src/logic/pnpm/IPnpmfile.ts @@ -6,6 +6,7 @@ import type { IPackageJson } from '@rushstack/node-core-library'; import type { IPnpmShrinkwrapYaml } from './PnpmShrinkwrapFile'; import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; +import type { PnpmCatalogs } from './EffectivePnpmOptions'; /** * The `settings` parameter passed to {@link IPnpmfileShim.hooks.readPackage} and @@ -26,6 +27,10 @@ export interface IWorkspaceProjectInfo extends Pick { packageVersion: RushConfigurationProject['packageJson']['version']; injectedDependencies: Array; + /** + * The name of the subspace that contains the project. + */ + subspaceName?: string; } /** @@ -37,6 +42,16 @@ export interface ISubspacePnpmfileShimSettings { workspaceProjects: Record; subspaceProjects: Record; userPnpmfilePath?: string; + /** + * The PNPM catalogs that are in effect for each other subspace whose projects are injected into this + * subspace, keyed by subspace name. Subspaces without catalogs are omitted. + * + * @remarks + * PNPM only resolves `catalog:` references in the manifests of its own workspace projects. Projects from + * other subspaces are installed as external packages, so the shim replaces their catalog references + * with the entries from their own subspace's catalogs. + */ + catalogsBySubspaceName?: Record; } /** diff --git a/libraries/rush-lib/src/logic/pnpm/SubspaceGlobalPnpmfileShim.ts b/libraries/rush-lib/src/logic/pnpm/SubspaceGlobalPnpmfileShim.ts index 02c143fcb31..42db3da1eb2 100644 --- a/libraries/rush-lib/src/logic/pnpm/SubspaceGlobalPnpmfileShim.ts +++ b/libraries/rush-lib/src/logic/pnpm/SubspaceGlobalPnpmfileShim.ts @@ -8,8 +8,8 @@ import path from 'node:path'; -// This file can use "import type" but otherwise should not reference any other modules, since it will -// be run from the "common/temp" directory +// This file can use "import type", but otherwise it should only import local modules that have no runtime +// dependencies (webpack bundles those into the shim), since it will be run from the "common/temp" directory import type * as TSemver from 'semver'; import type { IPackageJson } from '@rushstack/node-core-library'; @@ -22,11 +22,25 @@ import type { IWorkspaceProjectInfo } from './IPnpmfile'; import type { IPnpmShrinkwrapYaml } from './PnpmShrinkwrapFile'; +import type { PnpmCatalogs } from './EffectivePnpmOptions'; +import { tryGetPnpmCatalogVersion, tryParsePnpmCatalogName } from './PnpmCatalogReference'; -let settings: ISubspacePnpmfileShimSettings; +let settings: ISubspacePnpmfileShimSettings | undefined; let userPnpmfile: IPnpmfile | undefined; let semver: typeof TSemver | undefined; +// The manifest fields that PNPM resolves for an installed (non-workspace) package. +const INSTALLED_PACKAGE_DEPENDENCY_FIELDS: ReadonlyArray< + 'dependencies' | 'optionalDependencies' | 'peerDependencies' +> = ['dependencies', 'optionalDependencies', 'peerDependencies']; + +// Resets the internal state of the pnpmfile +export function reset(): void { + settings = undefined; + userPnpmfile = undefined; + semver = undefined; +} + // Initialize all external aspects of the pnpmfile shim. When using the shim, settings // are always expected to be available. Init must be called before running any hook that // depends on a resource obtained from or related to the settings, and will require modules @@ -52,18 +66,93 @@ function init(context: IPnpmfileContext | any): IPnpmfileContext { // Reuse the already initialized settings context.splitWorkspacePnpmfileShimSettings = settings; } + const definedSettings: ISubspacePnpmfileShimSettings = settings!; // If a userPnpmfilePath is provided, we expect it to exist - if (!userPnpmfile && settings.userPnpmfilePath) { - userPnpmfile = require(settings.userPnpmfilePath); + if (!userPnpmfile && definedSettings.userPnpmfilePath) { + userPnpmfile = require(definedSettings.userPnpmfilePath); } // If a semverPath is provided, we expect it to exist - if (!semver && settings.semverPath) { - semver = require(settings.semverPath); + if (!semver && definedSettings.semverPath) { + semver = require(definedSettings.semverPath); } // Return the normalized context return context as IPnpmfileContext; } +// PNPM only resolves "catalog:" references for its own workspace projects. A Rush project from another subspace +// is installed as an external package (for example, as an injected "file:" dependency), so replace its catalog +// references with the entries from the catalogs of the subspace that contains it. +// For example: "semver": "catalog:" --> "semver": "~7.5.4" +function resolveOtherSubspaceCatalogReferences(pkg: IPackageJson): void { + if (!settings) { + throw new Error(`splitWorkspaceGlobalPnpmfileShimSettings not initialized`); + } + + // Never rewrite this subspace's own projects: PNPM resolves their catalog references itself, and the lockfile + // importers record the original specifiers + if (!Object.prototype.hasOwnProperty.call(settings.workspaceProjects, pkg.name)) { + return; + } + + const workspaceProject: IWorkspaceProjectInfo = settings.workspaceProjects[pkg.name]; + for (const dependencyField of INSTALLED_PACKAGE_DEPENDENCY_FIELDS) { + const dependencies: Record | undefined = pkg[dependencyField]; + if (!dependencies) { + continue; + } + + for (const [dependencyName, versionSpecifier] of Object.entries(dependencies)) { + const catalogName: string | undefined = tryParsePnpmCatalogName(versionSpecifier); + if (catalogName !== undefined) { + dependencies[dependencyName] = getCatalogVersion( + workspaceProject, + dependencyName, + versionSpecifier, + catalogName + ); + } + } + } +} + +function getCatalogVersion( + workspaceProject: IWorkspaceProjectInfo, + dependencyName: string, + versionSpecifier: string, + catalogName: string +): string { + const { packageName, subspaceName } = workspaceProject; + const subspaceCatalogs: PnpmCatalogs | undefined = + subspaceName !== undefined && + settings?.catalogsBySubspaceName && + Object.prototype.hasOwnProperty.call(settings.catalogsBySubspaceName, subspaceName) + ? settings.catalogsBySubspaceName[subspaceName] + : undefined; + + const catalogVersion: string | undefined = tryGetPnpmCatalogVersion( + subspaceCatalogs, + catalogName, + dependencyName + ); + if (catalogVersion !== undefined) { + return catalogVersion; + } + + const reference: string = + `The "${packageName}" project from the "${subspaceName}" subspace is installed as an external ` + + `package, and it depends on "${dependencyName}@${versionSpecifier}". Rush resolves that reference ` + + `using the "globalCatalogs" from the pnpm-config.json of the "${subspaceName}" subspace, but`; + if (!subspaceCatalogs) { + throw new Error(`${reference} no PNPM catalogs were found for that subspace.`); + } else if (!Object.prototype.hasOwnProperty.call(subspaceCatalogs, catalogName)) { + throw new Error(`${reference} that subspace does not define a catalog named "${catalogName}".`); + } else { + throw new Error( + `${reference} the "${catalogName}" catalog of that subspace does not have an entry for "${dependencyName}".` + ); + } +} + // Rewrite rush project referenced in split workspace. // For example: "project-a": "workspace:*" --> "project-a": "link:../../project-a" function rewriteRushProjectVersions( @@ -160,6 +249,7 @@ export const hooks: IPnpmfileHooks = { // Rewrite workspace protocol to link protocol for non split workspace projects readPackage: (pkg: IPackageJson, context: IPnpmfileContext) => { context = init(context); + resolveOtherSubspaceCatalogReferences(pkg); rewriteRushProjectVersions(pkg.name, pkg.dependencies); rewriteRushProjectVersions(pkg.name, pkg.devDependencies); return userPnpmfile?.hooks?.readPackage ? userPnpmfile.hooks.readPackage(pkg, context) : pkg; diff --git a/libraries/rush-lib/src/logic/pnpm/SubspacePnpmfileConfiguration.ts b/libraries/rush-lib/src/logic/pnpm/SubspacePnpmfileConfiguration.ts index 17bf18a5a57..e563addaf03 100644 --- a/libraries/rush-lib/src/logic/pnpm/SubspacePnpmfileConfiguration.ts +++ b/libraries/rush-lib/src/logic/pnpm/SubspacePnpmfileConfiguration.ts @@ -13,7 +13,7 @@ import type { PnpmPackageManager } from '../../api/packageManager/PnpmPackageMan import { RushConstants } from '../RushConstants'; import type { Subspace } from '../../api/Subspace'; import type { PnpmOptionsConfiguration } from './PnpmOptionsConfiguration'; -import { getEffectivePnpmOptions } from './EffectivePnpmOptions'; +import { getEffectivePnpmCatalogs, getEffectivePnpmOptions, type PnpmCatalogs } from './EffectivePnpmOptions'; /** * Loads PNPM's pnpmfile.js configuration, and invokes it to preprocess package.json files, @@ -76,7 +76,8 @@ export class SubspacePnpmfileConfiguration { packageName, projectRelativeFolder, packageVersion: packageJson.version, - injectedDependencies: Array.from(projectNameToInjectedDependenciesMap.get(packageName) || []) + injectedDependencies: Array.from(projectNameToInjectedDependenciesMap.get(packageName) || []), + subspaceName: project.subspace.subspaceName }; (subspace.contains(project) ? subspaceProjects : workspaceProjects)[packageName] = workspaceProjectInfo; } @@ -87,6 +88,15 @@ export class SubspacePnpmfileConfiguration { semverPath: Import.resolveModule({ modulePath: 'semver', baseFolderPath: __dirname }) }; + const catalogsBySubspaceName: Record | undefined = _getInjectedProjectCatalogs( + rushConfiguration, + subspace, + projectNameToInjectedDependenciesMap + ); + if (catalogsBySubspaceName) { + settings.catalogsBySubspaceName = catalogsBySubspaceName; + } + // common/config/subspaces//.pnpmfile.cjs const userPnpmfilePath: string = path.join( subspace.getVariantDependentSubspaceConfigFolderPath(variant), @@ -100,6 +110,39 @@ export class SubspacePnpmfileConfiguration { } } +/** + * Returns the effective PNPM catalogs of each other subspace that has a project which is injected into + * the specified subspace, keyed by subspace name, or `undefined` if there are none. + */ +function _getInjectedProjectCatalogs( + rushConfiguration: RushConfiguration, + subspace: Subspace, + projectNameToInjectedDependenciesMap: Map> +): Record | undefined { + let result: Record | undefined; + const visitedSubspaceNames: Set = new Set([subspace.subspaceName]); + for (const injectedDependencies of projectNameToInjectedDependenciesMap.values()) { + for (const injectedDependencyName of injectedDependencies) { + const injectedProject: RushConfigurationProject | undefined = + rushConfiguration.getProjectByName(injectedDependencyName); + if (!injectedProject || visitedSubspaceNames.has(injectedProject.subspace.subspaceName)) { + continue; + } + + visitedSubspaceNames.add(injectedProject.subspace.subspaceName); + const catalogs: PnpmCatalogs | undefined = getEffectivePnpmCatalogs( + injectedProject.subspace, + rushConfiguration + ); + if (catalogs) { + (result ??= {})[injectedProject.subspace.subspaceName] = catalogs; + } + } + } + + return result; +} + function _getProjectNameToInjectedDependenciesMap( rushConfiguration: RushConfiguration, subspace: Subspace diff --git a/libraries/rush-lib/src/logic/pnpm/test/SubspaceGlobalPnpmfileShim.test.ts b/libraries/rush-lib/src/logic/pnpm/test/SubspaceGlobalPnpmfileShim.test.ts new file mode 100644 index 00000000000..053f97fa346 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/SubspaceGlobalPnpmfileShim.test.ts @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import type { IPackageJson } from '@rushstack/node-core-library'; + +import { RushConfiguration } from '../../../api/RushConfiguration'; +import type { IPnpmfileContext, ISubspacePnpmfileShimSettings } from '../IPnpmfile'; +import { hooks, reset } from '../SubspaceGlobalPnpmfileShim'; +import { SubspacePnpmfileConfiguration } from '../SubspacePnpmfileConfiguration'; + +// The "catalog-consumer" project in "consumer-subspace" injects the "catalog-provider" project from the +// default subspace, which depends on "transitive-provider" from the default subspace. The default subspace +// uses the catalogs from common/config/rush/pnpm-config.json, and "consumer-subspace" and +// "unrelated-subspace" have their own catalogs. +const INJECTED_SUBSPACE_CATALOGS_RUSH_JSON: string = `${__dirname}/repoWithInjectedSubspaceCatalogs/rush.json`; + +describe('SubspaceGlobalPnpmfileShim', () => { + let rushConfiguration: RushConfiguration; + let settings: ISubspacePnpmfileShimSettings; + + function readPackage(pkg: IPackageJson): IPackageJson { + const context: IPnpmfileContext = { + log: () => {}, + splitWorkspacePnpmfileShimSettings: settings + } as IPnpmfileContext; + return hooks.readPackage!(pkg, context); + } + + function getPackageJson(packageName: string): IPackageJson { + return JSON.parse(JSON.stringify(rushConfiguration.getProjectByName(packageName)!.packageJson)); + } + + beforeEach(() => { + reset(); + rushConfiguration = RushConfiguration.loadFromConfigurationFile(INJECTED_SUBSPACE_CATALOGS_RUSH_JSON); + settings = SubspacePnpmfileConfiguration.getSubspacePnpmfileShimSettings( + rushConfiguration, + rushConfiguration.getSubspace('consumer-subspace'), + undefined + ); + }); + + afterEach(() => { + reset(); + }); + + describe('readPackage', () => { + it("resolves catalog references of an injected project with its own subspace's catalogs", () => { + const pkg: IPackageJson = readPackage(getPackageJson('catalog-provider')); + + // The versions come from the default subspace's catalogs, not from the catalogs of "consumer-subspace" + expect(pkg.dependencies).toEqual({ + 'left-pad': '^1.3.0', + lodash: '^4.17.21', + semver: '~7.5.4', + 'transitive-provider': 'file:../transitive-provider' + }); + expect(pkg.optionalDependencies).toEqual({ fsevents: '~2.3.2' }); + expect(pkg.peerDependencies).toEqual({ typescript: '~5.3.0' }); + // PNPM does not install the devDependencies of an injected package + expect(pkg.devDependencies).toEqual({ jest: 'catalog:' }); + }); + + it('resolves catalog references of a transitively injected project', () => { + const pkg: IPackageJson = readPackage(getPackageJson('transitive-provider')); + expect(pkg.dependencies).toEqual({ lodash: '^4.17.21' }); + }); + + it("does not change the catalog references of the subspace's own projects", () => { + const pkg: IPackageJson = readPackage(getPackageJson('catalog-consumer')); + expect(pkg.dependencies).toEqual({ + lodash: 'catalog:', + 'catalog-provider': 'file:../catalog-provider' + }); + }); + + it('does not change packages that are not Rush projects', () => { + const pkg: IPackageJson = readPackage({ + name: 'external', + version: '1.0.0', + dependencies: { lodash: 'catalog:' } + }); + expect(pkg.dependencies).toEqual({ lodash: 'catalog:' }); + }); + + it('reports an error when the catalog does not have an entry for the dependency', () => { + const pkg: IPackageJson = getPackageJson('catalog-provider'); + pkg.dependencies!['missing-package'] = 'catalog:'; + expect(() => readPackage(pkg)).toThrow( + 'The "catalog-provider" project from the "default" subspace is installed as an external package, and it depends on "missing-package@catalog:". Rush resolves that reference using the "globalCatalogs" from the pnpm-config.json of the "default" subspace, but the "default" catalog of that subspace does not have an entry for "missing-package".' + ); + }); + + it('reports an error when the catalog does not exist', () => { + const pkg: IPackageJson = getPackageJson('catalog-provider'); + pkg.optionalDependencies!.fsevents = 'catalog:missing-catalog'; + expect(() => readPackage(pkg)).toThrow( + 'The "catalog-provider" project from the "default" subspace is installed as an external package, and it depends on "fsevents@catalog:missing-catalog". Rush resolves that reference using the "globalCatalogs" from the pnpm-config.json of the "default" subspace, but that subspace does not define a catalog named "missing-catalog".' + ); + }); + + it('reports an error when no catalogs are available for the subspace of the project', () => { + expect(() => readPackage(getPackageJson('unrelated'))).toThrow( + 'The "unrelated" project from the "unrelated-subspace" subspace is installed as an external package, and it depends on "lodash@catalog:". Rush resolves that reference using the "globalCatalogs" from the pnpm-config.json of the "unrelated-subspace" subspace, but no PNPM catalogs were found for that subspace.' + ); + }); + }); +}); diff --git a/libraries/rush-lib/src/logic/pnpm/test/SubspacePnpmfileConfiguration.test.ts b/libraries/rush-lib/src/logic/pnpm/test/SubspacePnpmfileConfiguration.test.ts new file mode 100644 index 00000000000..b70ee801fab --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/SubspacePnpmfileConfiguration.test.ts @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { RushConfiguration } from '../../../api/RushConfiguration'; +import type { ISubspacePnpmfileShimSettings } from '../IPnpmfile'; +import { SubspacePnpmfileConfiguration } from '../SubspacePnpmfileConfiguration'; + +// The "catalog-consumer" project in "consumer-subspace" injects the "catalog-provider" project from the +// default subspace, which depends on "transitive-provider" from the default subspace. The default subspace +// uses the catalogs from common/config/rush/pnpm-config.json, and "consumer-subspace" and +// "unrelated-subspace" have their own catalogs. +const INJECTED_SUBSPACE_CATALOGS_RUSH_JSON: string = `${__dirname}/repoWithInjectedSubspaceCatalogs/rush.json`; + +describe(SubspacePnpmfileConfiguration.name, () => { + describe(SubspacePnpmfileConfiguration.getSubspacePnpmfileShimSettings.name, () => { + it('includes the catalogs of the subspaces of injected projects from other subspaces', () => { + const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( + INJECTED_SUBSPACE_CATALOGS_RUSH_JSON + ); + + const settings: ISubspacePnpmfileShimSettings = + SubspacePnpmfileConfiguration.getSubspacePnpmfileShimSettings( + rushConfiguration, + rushConfiguration.getSubspace('consumer-subspace'), + undefined + ); + + // Only the default subspace's catalogs: not the consumer's own catalogs, which PNPM resolves itself, + // and not the catalogs of "unrelated-subspace", which has no injected projects + expect(settings.catalogsBySubspaceName).toEqual({ + default: rushConfiguration.pnpmOptions.globalCatalogs + }); + + expect(settings.subspaceProjects['catalog-consumer'].subspaceName).toEqual('consumer-subspace'); + expect(settings.subspaceProjects['catalog-consumer'].injectedDependencies).toEqual([ + 'catalog-provider' + ]); + expect(settings.workspaceProjects['catalog-provider'].subspaceName).toEqual('default'); + expect(settings.workspaceProjects['catalog-provider'].injectedDependencies).toEqual([ + 'transitive-provider' + ]); + expect(settings.workspaceProjects['transitive-provider'].subspaceName).toEqual('default'); + expect(settings.workspaceProjects.unrelated.subspaceName).toEqual('unrelated-subspace'); + }); + + it('does not include catalogs when no projects from other subspaces are injected', () => { + const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( + INJECTED_SUBSPACE_CATALOGS_RUSH_JSON + ); + + for (const subspaceName of ['default', 'unrelated-subspace']) { + const settings: ISubspacePnpmfileShimSettings = + SubspacePnpmfileConfiguration.getSubspacePnpmfileShimSettings( + rushConfiguration, + rushConfiguration.getSubspace(subspaceName), + undefined + ); + expect(settings).not.toHaveProperty('catalogsBySubspaceName'); + } + }); + + it('does not include catalogs for injected projects from the same subspace', () => { + const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( + `${__dirname}/../../../api/test/repoInjectedDeps/rush.json` + ); + + const settings: ISubspacePnpmfileShimSettings = + SubspacePnpmfileConfiguration.getSubspacePnpmfileShimSettings( + rushConfiguration, + rushConfiguration.defaultSubspace, + undefined + ); + expect(settings.subspaceProjects.consumer.injectedDependencies).toEqual(['provider']); + expect(settings).not.toHaveProperty('catalogsBySubspaceName'); + }); + }); +}); diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/catalog-consumer/package.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/catalog-consumer/package.json new file mode 100644 index 00000000000..b89876da931 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/catalog-consumer/package.json @@ -0,0 +1,13 @@ +{ + "name": "catalog-consumer", + "version": "1.0.0", + "dependencies": { + "lodash": "catalog:", + "catalog-provider": "workspace:*" + }, + "dependenciesMeta": { + "catalog-provider": { + "injected": true + } + } +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/catalog-provider/package.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/catalog-provider/package.json new file mode 100644 index 00000000000..6e167affc61 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/catalog-provider/package.json @@ -0,0 +1,19 @@ +{ + "name": "catalog-provider", + "version": "1.0.0", + "dependencies": { + "left-pad": "^1.3.0", + "lodash": "catalog:default", + "semver": "catalog:", + "transitive-provider": "workspace:*" + }, + "optionalDependencies": { + "fsevents": "catalog:" + }, + "peerDependencies": { + "typescript": "catalog:tools" + }, + "devDependencies": { + "jest": "catalog:" + } +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/experiments.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/experiments.json new file mode 100644 index 00000000000..a20c6d24388 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/experiments.json @@ -0,0 +1,3 @@ +{ + "exemptDecoupledDependenciesBetweenSubspaces": true +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/pnpm-config.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/pnpm-config.json new file mode 100644 index 00000000000..adc750f925e --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/pnpm-config.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json", + "useWorkspaces": true, + "globalCatalogs": { + "default": { + "fsevents": "~2.3.2", + "jest": "^29.0.0", + "lodash": "^4.17.21", + "semver": "~7.5.4" + }, + "tools": { + "typescript": "~5.3.0" + } + } +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/subspaces.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/subspaces.json new file mode 100644 index 00000000000..e95203d5d1b --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/subspaces.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/subspaces.schema.json", + "subspacesEnabled": true, + "subspaceNames": ["consumer-subspace", "unrelated-subspace"] +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/version-policies.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/version-policies.json new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/rush/version-policies.json @@ -0,0 +1 @@ +[] diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/consumer-subspace/common-versions.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/consumer-subspace/common-versions.json new file mode 100644 index 00000000000..9280fe7b96d --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/consumer-subspace/common-versions.json @@ -0,0 +1,8 @@ +/** + * This configuration file specifies NPM dependency version selections that affect all projects + * in a Rush repo. More documentation is available on the Rush website: https://rushjs.io + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/common-versions.schema.json", + "ensureConsistentVersions": true +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/consumer-subspace/pnpm-config.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/consumer-subspace/pnpm-config.json new file mode 100644 index 00000000000..b6d29fc30af --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/consumer-subspace/pnpm-config.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json", + "useWorkspaces": true, + "globalCatalogs": { + "default": { + "lodash": "^3.10.1", + "semver": "^6.0.0" + } + } +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/default/common-versions.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/default/common-versions.json new file mode 100644 index 00000000000..9280fe7b96d --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/default/common-versions.json @@ -0,0 +1,8 @@ +/** + * This configuration file specifies NPM dependency version selections that affect all projects + * in a Rush repo. More documentation is available on the Rush website: https://rushjs.io + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/common-versions.schema.json", + "ensureConsistentVersions": true +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/unrelated-subspace/common-versions.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/unrelated-subspace/common-versions.json new file mode 100644 index 00000000000..9280fe7b96d --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/unrelated-subspace/common-versions.json @@ -0,0 +1,8 @@ +/** + * This configuration file specifies NPM dependency version selections that affect all projects + * in a Rush repo. More documentation is available on the Rush website: https://rushjs.io + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/common-versions.schema.json", + "ensureConsistentVersions": true +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/unrelated-subspace/pnpm-config.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/unrelated-subspace/pnpm-config.json new file mode 100644 index 00000000000..07cec4c4da0 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/common/config/subspaces/unrelated-subspace/pnpm-config.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json", + "useWorkspaces": true, + "globalCatalogs": { + "default": { + "lodash": "^2.4.2" + } + } +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/rush.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/rush.json new file mode 100644 index 00000000000..a29b8cc2a9c --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/rush.json @@ -0,0 +1,25 @@ +{ + "rushVersion": "1.0.5", + "pnpmVersion": "9.15.0", + + "projects": [ + { + "packageName": "catalog-provider", + "projectFolder": "catalog-provider" + }, + { + "packageName": "transitive-provider", + "projectFolder": "transitive-provider" + }, + { + "packageName": "catalog-consumer", + "projectFolder": "catalog-consumer", + "subspaceName": "consumer-subspace" + }, + { + "packageName": "unrelated", + "projectFolder": "unrelated", + "subspaceName": "unrelated-subspace" + } + ] +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/transitive-provider/package.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/transitive-provider/package.json new file mode 100644 index 00000000000..241ac6813bd --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/transitive-provider/package.json @@ -0,0 +1,7 @@ +{ + "name": "transitive-provider", + "version": "1.0.0", + "dependencies": { + "lodash": "catalog:" + } +} diff --git a/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/unrelated/package.json b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/unrelated/package.json new file mode 100644 index 00000000000..2e8ae5e1a41 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/repoWithInjectedSubspaceCatalogs/unrelated/package.json @@ -0,0 +1,7 @@ +{ + "name": "unrelated", + "version": "1.0.0", + "dependencies": { + "lodash": "catalog:" + } +} diff --git a/libraries/terminal/package.json b/libraries/terminal/package.json index 2a45ba4877c..e8db56371e2 100644 --- a/libraries/terminal/package.json +++ b/libraries/terminal/package.json @@ -45,7 +45,7 @@ "dependencies": { "@rushstack/node-core-library": "workspace:*", "@rushstack/problem-matcher": "workspace:*", - "supports-color": "~8.1.1" + "supports-color": "catalog:" }, "devDependencies": { "@rushstack/heft": "1.3.4", diff --git a/libraries/ts-command-line/package.json b/libraries/ts-command-line/package.json index caa0a6e7042..c8b966f8647 100644 --- a/libraries/ts-command-line/package.json +++ b/libraries/ts-command-line/package.json @@ -44,9 +44,9 @@ "license": "MIT", "dependencies": { "@rushstack/terminal": "workspace:*", - "@types/argparse": "1.0.38", - "argparse": "~1.0.9", - "string-argv": "~0.3.1" + "@types/argparse": "catalog:", + "argparse": "catalog:", + "string-argv": "catalog:" }, "devDependencies": { "@rushstack/heft": "1.3.4", diff --git a/rigs/heft-node-rig/package.json b/rigs/heft-node-rig/package.json index 31f1f4f8afb..e3d13ad3798 100644 --- a/rigs/heft-node-rig/package.json +++ b/rigs/heft-node-rig/package.json @@ -23,10 +23,10 @@ "@rushstack/heft-jest-plugin": "workspace:*", "@rushstack/heft-lint-plugin": "workspace:*", "@rushstack/heft-typescript-plugin": "workspace:*", - "@types/jest": "30.0.0", - "eslint": "~9.37.0", - "jest-environment-node": "~30.3.0", - "typescript": "~5.8.2" + "@types/jest": "catalog:", + "eslint": "catalog:", + "jest-environment-node": "catalog:", + "typescript": "catalog:" }, "devDependencies": { "@rushstack/heft": "workspace:*" diff --git a/rigs/local-node-rig/package.json b/rigs/local-node-rig/package.json index 656880daa90..1845595cc86 100644 --- a/rigs/local-node-rig/package.json +++ b/rigs/local-node-rig/package.json @@ -13,11 +13,11 @@ "@rushstack/eslint-patch": "workspace:*", "@rushstack/heft-node-rig": "workspace:*", "@rushstack/heft": "workspace:*", - "@types/jest": "30.0.0", - "@types/node": "20.17.19", + "@types/jest": "catalog:", + "@types/node": "catalog:", "local-eslint-config": "workspace:*", - "eslint": "~9.37.0", - "jest-junit": "12.3.0", - "typescript": "~5.8.2" + "eslint": "catalog:", + "jest-junit": "catalog:", + "typescript": "catalog:" } }