From d3591aae021438d810cd831b787d8026b59ca7bc Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Wed, 26 Feb 2025 13:16:43 +0100 Subject: [PATCH] chore: move overrides to pnpm-workspace.yaml --- .meta-updater/src/index.ts | 3 +-- package.json | 31 ------------------------------- pnpm-workspace.yaml | 28 ++++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 33 deletions(-) diff --git a/.meta-updater/src/index.ts b/.meta-updater/src/index.ts index 3dcfc5dff8..292dbb4d93 100644 --- a/.meta-updater/src/index.ts +++ b/.meta-updater/src/index.ts @@ -14,7 +14,6 @@ const CLI_PKG_NAME = 'pnpm' export default async (workspaceDir: string) => { // eslint-disable-line const workspaceManifest = await readWorkspaceManifest(workspaceDir)! - const rootManifest = loadJsonFile.sync(path.join(workspaceDir, 'package.json')) const pnpmManifest = loadJsonFile.sync(path.join(workspaceDir, 'pnpm/package.json')) const pnpmVersion = pnpmManifest!.version! const pnpmMajorNumber = pnpmVersion.split('.')[0] @@ -63,7 +62,7 @@ export default async (workspaceDir: string) => { // eslint-disable-line } } else { manifest.pnpm = manifest.pnpm ?? {} - manifest.pnpm.overrides = { ...rootManifest.pnpm!.overrides } + manifest.pnpm.overrides = { ...workspaceManifest!.overrides } for (const selector in manifest.pnpm.overrides) { if (manifest.pnpm.overrides[selector] === 'catalog:') { const { targetPkg } = parsePkgAndParentSelector(selector) diff --git a/package.json b/package.json index 1dff27de90..7fad231fcd 100644 --- a/package.json +++ b/package.json @@ -61,36 +61,5 @@ }, "engines": { "pnpm": ">=9.6.0" - }, - "pnpm": { - "overrides": { - "@yarnpkg/fslib@2": "3", - "body-parser@<1.20.3": "^1.20.3", - "clipanion": "3.2.0-rc.6", - "cookie@<0.7.0": ">=0.7.0", - "cross-spawn@<7.0.5": ">=7.0.5", - "debug@<3.1.0": ">=3.1.0", - "express@<4.20.0": "^4.20.0", - "follow-redirects@<=1.15.5": ">=1.15.6", - "glob-parent@<5.1.2": ">=5.1.2", - "hosted-git-info@1": "catalog:", - "http-proxy-middleware@<2.0.7": "^2.0.7", - "istanbul-reports": "npm:@zkochan/istanbul-reports", - "js-yaml@^4.0.0": "catalog:", - "json5@<2.2.2": "catalog:", - "jsonwebtoken@<=8.5.1": ">=9.0.0", - "nopt@5": "npm:@pnpm/nopt@^0.2.1", - "path-to-regexp@<0.1.12": "^0.1.12", - "path-to-regexp@>=4.0.0 <6.3.0": ">=6.3.0", - "path-to-regexp@>=7.0.0 <8.0.0": ">=8.0.0", - "request": "npm:postman-request@2.88.1-postman.40", - "semver@<7.5.2": "catalog:", - "send@<0.19.0": "^0.19.0", - "serve-static@<1.16.0": "^1.16.0", - "socks@2": "^2.8.1", - "tough-cookie@<4.1.3": ">=4.1.3", - "verdaccio": "5.20.1", - "yaml@<2.2.2": ">=2.2.2" - } } } diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d02077b593..25473556d6 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -255,6 +255,34 @@ catalog: write-pkg: 4.0.0 write-yaml-file: ^5.0.0 yaml-tag: 1.1.0 +overrides: + "@yarnpkg/fslib@2": "3" + "body-parser@<1.20.3": "^1.20.3" + "clipanion": "3.2.0-rc.6" + "cookie@<0.7.0": ">=0.7.0" + "cross-spawn@<7.0.5": ">=7.0.5" + "debug@<3.1.0": ">=3.1.0" + "express@<4.20.0": "^4.20.0" + "follow-redirects@<=1.15.5": ">=1.15.6" + "glob-parent@<5.1.2": ">=5.1.2" + "hosted-git-info@1": "catalog:" + "http-proxy-middleware@<2.0.7": "^2.0.7" + "istanbul-reports": "npm:@zkochan/istanbul-reports" + "js-yaml@^4.0.0": "catalog:" + "json5@<2.2.2": "catalog:" + "jsonwebtoken@<=8.5.1": ">=9.0.0" + "nopt@5": "npm:@pnpm/nopt@^0.2.1" + "path-to-regexp@<0.1.12": "^0.1.12" + "path-to-regexp@>=4.0.0 <6.3.0": ">=6.3.0" + "path-to-regexp@>=7.0.0 <8.0.0": ">=8.0.0" + "request": "npm:postman-request@2.88.1-postman.40" + "semver@<7.5.2": "catalog:" + "send@<0.19.0": "^0.19.0" + "serve-static@<1.16.0": "^1.16.0" + "socks@2": "^2.8.1" + "tough-cookie@<4.1.3": ">=4.1.3" + "verdaccio": "5.20.1" + "yaml@<2.2.2": ">=2.2.2" packageExtensions: "@babel/parser": peerDependencies: