Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .yarn/versions/5bb25db6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
releases:
"@yarnpkg/cli": patch
"@yarnpkg/nm": patch
"@yarnpkg/plugin-nm": patch
"@yarnpkg/pnpify": patch

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-dlx"
- "@yarnpkg/plugin-essentials"
- "@yarnpkg/plugin-init"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-pack"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-pnp"
- "@yarnpkg/plugin-pnpm"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-version"
- "@yarnpkg/plugin-workspace-tools"
- "@yarnpkg/builder"
- "@yarnpkg/core"
- "@yarnpkg/doctor"
9 changes: 5 additions & 4 deletions packages/yarnpkg-nm/sources/hoist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ const getHoistIdentMap = (rootNode: HoisterWorkTree, preferenceMap: PreferenceMa
*/
const getSortedRegularDependencies = (node: HoisterWorkTree): Set<HoisterWorkTree> => {
const dependencies: Set<HoisterWorkTree> = new Set();
const seenDeps: Set<HoisterWorkTree> = new Set();

const addDep = (dep: HoisterWorkTree, seenDeps = new Set()) => {
const addDep = (dep: HoisterWorkTree) => {
if (seenDeps.has(dep))
return;
seenDeps.add(dep);
Expand All @@ -342,15 +343,15 @@ const getSortedRegularDependencies = (node: HoisterWorkTree): Set<HoisterWorkTre
if (!node.peerNames.has(peerName)) {
const peerDep = node.dependencies.get(peerName);
if (peerDep && !dependencies.has(peerDep)) {
addDep(peerDep, seenDeps);
addDep(peerDep);
}
}
}
dependencies.add(dep);
};

for (const dep of node.dependencies.values()) {
if (!node.peerNames.has(dep.name)) {
for (const [name, dep] of node.dependencies) {
if (!node.peerNames.has(name)) {
addDep(dep);
}
}
Expand Down
Loading