Skip to content

Commit e3052f1

Browse files
committed
fix: honor packed-consumer postcss pin under pnpm 11
pnpm 11 ignores package.json pnpm.overrides, so write the pin to pnpm-workspace.yaml like the other packed consumers.
1 parent c97e755 commit e3052f1

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎scripts/check-package-packs.mjs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -478,19 +478,19 @@ async function validatePackedConsumer(tempRoot, archives) {
478478
typescript: typescriptVersion,
479479
vite: viteVersion,
480480
},
481-
// postcss 8.5.28 makes DeclarationProps extend NodeProps, but
482-
// tsrx-tsc cannot resolve that named export from node.d.ts
483-
// (TS2304). Pin the last types that typecheck here.
484-
pnpm: {
485-
overrides: {
486-
postcss: '8.5.26',
487-
},
488-
},
489481
},
490482
null,
491483
2,
492484
) + '\n',
493485
);
486+
// postcss 8.5.28 makes DeclarationProps extend NodeProps, but
487+
// tsrx-tsc cannot resolve that named export from node.d.ts
488+
// (TS2304). Pin the last types that typecheck here. pnpm 11 reads
489+
// overrides from pnpm-workspace.yaml, not package.json pnpm.overrides.
490+
writeFileSync(
491+
path.join(consumerDirectory, 'pnpm-workspace.yaml'),
492+
renderPackedExampleWorkspace({ postcss: '8.5.26' }),
493+
);
494494
writeFileSync(
495495
path.join(sourceDirectory, 'App.tsrx'),
496496
`import { ApolloClient, InMemoryCache } from '@octanejs/apollo-client';

0 commit comments

Comments
 (0)