Skip to content

Commit 029178d

Browse files
committed
fix: override pnpm 10.0-10.1.0 to 9.15.5 to fix vue-macros ci issue
The bug is fixed in the pnpm repo but not yet released. pnpm/pnpm#9000
1 parent 123e80d commit 029178d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

utils.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -579,17 +579,18 @@ export async function applyPackageOverrides(
579579

580580
if (pm === 'pnpm') {
581581
const version = await $$`pnpm --version`
582-
// avoid bug with absolute overrides in pnpm 7.18.0
583-
if (version === '7.18.0') {
582+
// avoid bug with peer dependency overrides in pnpm 10.0-10.1.0
583+
// TODO: change the override to 10.1.1 after it is released
584+
if (version === '10.0.0' || version === '10.1.0') {
584585
console.warn(
585-
'detected pnpm@7.18.0, changing pkg.packageManager and pkg.engines.pnpm to enforce use of pnpm@7.18.1',
586+
`detected pnpm@${version}, changing pkg.packageManager and pkg.engines.pnpm to enforce use of pnpm@9.15.5`,
586587
)
587-
// corepack reads this and uses pnpm 7.18.1 then
588-
pkg.packageManager = 'pnpm@7.18.1'
588+
// corepack reads this and uses pnpm 9.15.5 then
589+
pkg.packageManager = 'pnpm@9.15.5'
589590
if (!pkg.engines) {
590591
pkg.engines = {}
591592
}
592-
pkg.engines.pnpm = '7.18.1'
593+
pkg.engines.pnpm = '9.15.5'
593594
}
594595
// if (!pkg.devDependencies) {
595596
// pkg.devDependencies = {}

0 commit comments

Comments
 (0)