feat: merge manifest resolutions and pnpm.overrides (#7174)
* feat: merge manifest `resolutions` and `pnpm.overrides` As someone currently migrating from Yarn, I would find it extremely helpful to be able to give Yarn and pnpm different override instructions. By merging these two, migration from Yarn is even easier, because you can fix pnpm-specific overrides inside `pnpm.overrides` without affecting the existing Yarn setup. * style: make changeset just one line * Update .changeset/twenty-walls-sit.md --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
1 parent
3ad2ec63eb
commit
b1dd0ee58f
2 files changed
+10
-1
No files matched your search
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/config": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Instead of `pnpm.overrides` replacing `resolutions`, the two are now merged. This is intended to make it easier to migrate from Yarn by allowing one to keep using `resolutions` for Yarn, but adding additional changes just for pnpm using `pnpm.overrides`.
|
||||
@@ -26,7 +26,10 @@ export function getOptionsFromRootManifest (manifestDir: string, manifest: Proje
|
||||
// so we cannot call it resolutions
|
||||
const overrides = mapValues(
|
||||
createVersionReferencesReplacer(manifest),
|
||||
manifest.pnpm?.overrides ?? manifest.resolutions ?? {}
|
||||
{
|
||||
...manifest.resolutions,
|
||||
...manifest.pnpm?.overrides,
|
||||
}
|
||||
)
|
||||
const neverBuiltDependencies = manifest.pnpm?.neverBuiltDependencies
|
||||
const onlyBuiltDependencies = manifest.pnpm?.onlyBuiltDependencies
|
||||
|
||||
Reference in new issue
Block a user