File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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' ) {
You can’t perform that action at this time.
0 commit comments