Skip to content

Commit 49c782c

Browse files
authored
fix: Change dependency collection to parse from root (electron-userland#9260)
1 parent 3735881 commit 49c782c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/pr-9260.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix(app-builder-lib): Change dependency collection to parse from root to better handle monorepos

packages/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export abstract class NodeModulesCollector<T extends Dependency<T, OptionalsType
2222

2323
public async getNodeModules(): Promise<NodeModuleInfo[]> {
2424
const tree: T = await this.getDependenciesTree()
25+
this.collectAllDependencies(tree) // Parse from the root, as npm list can host and deduplicate across projects in the workspace
2526
const realTree: T = this.getTreeFromWorkspaces(tree)
26-
this.collectAllDependencies(realTree)
2727
this.extractProductionDependencyGraph(realTree, "." /*root project name*/)
2828

2929
const hoisterResult: HoisterResult = hoist(this.transToHoisterTree(this.productionGraph), { check: true })

0 commit comments

Comments
 (0)