mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-11 09:28:24 -04:00
fix(hoist): ignore the case when deciding which dependency to hoist
This commit is contained in:
5
.changeset/strange-students-enjoy.md
Normal file
5
.changeset/strange-students-enjoy.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/hoist": patch
|
||||
---
|
||||
|
||||
Ignore the case of the package name when deciding which dependency to hoist.
|
||||
@@ -163,11 +163,12 @@ async function hoistGraph (
|
||||
for (const [childAlias, childPath] of Object.entries(depNode.children)) {
|
||||
const hoist = opts.getAliasHoistType(childAlias)
|
||||
if (!hoist) continue
|
||||
const childAliasNormalized = childAlias.toLowerCase()
|
||||
// if this alias has already been taken, skip it
|
||||
if (hoistedAliases.has(childAlias)) {
|
||||
if (hoistedAliases.has(childAliasNormalized)) {
|
||||
continue
|
||||
}
|
||||
hoistedAliases.add(childAlias)
|
||||
hoistedAliases.add(childAliasNormalized)
|
||||
if (!hoistedDependencies[childPath]) {
|
||||
hoistedDependencies[childPath] = {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user