Skip to content

Commit 263ce37

Browse files
committed
fix: remove redundant settings from workspace yaml (CLI flags handle them)
1 parent 66d083e commit 263ce37

1 file changed

Lines changed: 2 additions & 17 deletions

File tree

scripts/npm/install-npm-packages.mjs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -753,28 +753,13 @@ async function installPackage(packageInfo) {
753753

754754
// pnpm v11 ignores overrides in package.json pnpm.overrides for subdependencies
755755
// (regression from v10). Overrides in pnpm-workspace.yaml still work.
756-
// Also set pnpm v11 settings in workspace yaml since CLI --config flags
757-
// may not override workspace-level settings.
758-
if (packageManager === 'pnpm') {
756+
if (packageManager === 'pnpm' && Object.keys(pnpmOverrides).length > 0) {
759757
const overrideLines = Object.entries(pnpmOverrides)
760758
.map(([pkg, spec]) => ` ${pkg}: '${spec}'`)
761759
.join('\n')
762-
const overridesSection =
763-
Object.keys(pnpmOverrides).length > 0
764-
? `\noverrides:\n${overrideLines}\n`
765-
: ''
766760
await fs.writeFile(
767761
path.join(packageTempDir, 'pnpm-workspace.yaml'),
768-
[
769-
'packages:',
770-
' - .',
771-
'',
772-
'# pnpm v11 settings for third-party test installs.',
773-
'blockExoticSubdeps: false',
774-
'strictDepBuilds: false',
775-
'resolutionMode: highest',
776-
overridesSection,
777-
].join('\n'),
762+
`packages:\n - .\n\noverrides:\n${overrideLines}\n`,
778763
'utf8',
779764
)
780765
} else if (packageManager === 'npm') {

0 commit comments

Comments
 (0)