mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix: peerDependencyRules when other rules are also present (#4255)
This commit is contained in:
6
.changeset/yellow-rules-learn.md
Normal file
6
.changeset/yellow-rules-learn.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`peerDependencyRules` should work when both `overrides` and `packageExtensions` are present as well.
|
||||
@@ -515,7 +515,9 @@ export function createReadPackageHook (
|
||||
if (hooks.length === 0) {
|
||||
return readPackageHook
|
||||
}
|
||||
const readPackageAndExtend = hooks.length === 1 ? hooks[0] : pipeWith(async (f, res) => f(await res), [hooks[0], hooks[1]]) as ReadPackageHook
|
||||
const readPackageAndExtend = hooks.length === 1
|
||||
? hooks[0]
|
||||
: pipeWith(async (f, res) => f(await res), hooks as any) as ReadPackageHook // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
if (readPackageHook != null) {
|
||||
return (async (manifest: ProjectManifest, dir?: string) => readPackageAndExtend(await readPackageHook(manifest, dir), dir)) as ReadPackageHook
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user