mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-24 07:38:12 -05:00
fix: don't ignore pnpm.patchedDependencies from package.json (#9228)
close #9226
This commit is contained in:
6
.changeset/legal-taxis-heal.md
Normal file
6
.changeset/legal-taxis-heal.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/config": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't ignore pnpm.patchedDependencies from `package.json` [#9226](https://github.com/pnpm/pnpm/issues/9226).
|
||||
@@ -39,6 +39,7 @@ export function getOptionsFromRootManifest (manifestDir: string, manifest: Proje
|
||||
'onlyBuiltDependenciesFile',
|
||||
'overrides',
|
||||
'packageExtensions',
|
||||
'patchedDependencies',
|
||||
'peerDependencyRules',
|
||||
'supportedArchitectures',
|
||||
], manifest.pnpm ?? {}),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import path from 'path'
|
||||
import { getOptionsFromRootManifest } from '../lib/getOptionsFromRootManifest'
|
||||
|
||||
test('getOptionsFromRootManifest() should read "resolutions" field for compatibility with Yarn', () => {
|
||||
@@ -91,3 +92,14 @@ test('getOptionsFromRootManifest() should return the list from onlyBuiltDependen
|
||||
})
|
||||
expect(options.onlyBuiltDependencies).toStrictEqual(['electron'])
|
||||
})
|
||||
|
||||
test('getOptionsFromRootManifest() should return patchedDependencies', () => {
|
||||
const options = getOptionsFromRootManifest(process.cwd(), {
|
||||
pnpm: {
|
||||
patchedDependencies: {
|
||||
foo: 'foo.patch',
|
||||
},
|
||||
},
|
||||
})
|
||||
expect(options.patchedDependencies).toStrictEqual({ foo: path.resolve('foo.patch') })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user