mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix: ignore non-array bundle[d]Dependencies fields
This commit is contained in:
6
.changeset/chatty-plums-juggle.md
Normal file
6
.changeset/chatty-plums-juggle.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
"supi": patch
|
||||
---
|
||||
|
||||
Ignore non-array bundle[d]Dependencies fields. Fixes a regression caused by https://github.com/pnpm/pnpm/commit/5322cf9b39f637536aa4775aa64dd4e9a4156d8a
|
||||
@@ -8,7 +8,8 @@ export interface WantedDependency {
|
||||
}
|
||||
|
||||
export default function getNonDevWantedDependencies (pkg: DependencyManifest) {
|
||||
const bundledDeps = new Set(pkg.bundleDependencies ?? pkg.bundledDependencies ?? [])
|
||||
const bd = pkg.bundleDependencies ?? pkg.bundleDependencies
|
||||
const bundledDeps = new Set(Array.isArray(bd) ? bd : [])
|
||||
bundledDeps.add(pkg.name)
|
||||
const filterDeps = getNotBundledDeps.bind(null, bundledDeps)
|
||||
return getWantedDependenciesFromGivenSet(
|
||||
|
||||
@@ -153,7 +153,7 @@ function toLockfileDependency (
|
||||
if (pkg.os) {
|
||||
result['os'] = pkg.os
|
||||
}
|
||||
if (pkg.bundledDependencies != null || pkg.bundleDependencies != null) {
|
||||
if (Array.isArray(pkg.bundledDependencies) || Array.isArray(pkg.bundleDependencies)) {
|
||||
result['bundledDependencies'] = pkg.bundledDependencies ?? pkg.bundleDependencies
|
||||
}
|
||||
if (pkg.deprecated) {
|
||||
|
||||
Reference in New Issue
Block a user