mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-09 23:48:28 -05:00
fix(build-modules): fix incorrect return in getSubgraphToBuild (#3369)
* fix(build-modules): fix incorrect return in getSubgraphToBuild * docs: changeset for the last commit
This commit is contained in:
5
.changeset/soft-dancers-happen.md
Normal file
5
.changeset/soft-dancers-happen.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/build-modules": patch
|
||||
---
|
||||
|
||||
Fix incorrect return in getSubgraphToBuild
|
||||
@@ -145,13 +145,13 @@ function getSubgraphToBuild (
|
||||
) {
|
||||
let currentShouldBeBuilt = false
|
||||
for (const depPath of entryNodes) {
|
||||
if (!graph[depPath]) return // packages that are already in node_modules are skipped
|
||||
if (!graph[depPath]) continue // packages that are already in node_modules are skipped
|
||||
if (nodesToBuild.has(depPath)) {
|
||||
currentShouldBeBuilt = true
|
||||
}
|
||||
if (walked.has(depPath)) continue
|
||||
walked.add(depPath)
|
||||
const childShouldBeBuilt = getSubgraphToBuild(graph, R.values(graph[depPath].children), nodesToBuild, walked) === true ||
|
||||
const childShouldBeBuilt = getSubgraphToBuild(graph, R.values(graph[depPath].children), nodesToBuild, walked) ||
|
||||
graph[depPath].requiresBuild
|
||||
if (childShouldBeBuilt) {
|
||||
nodesToBuild.add(depPath)
|
||||
|
||||
Reference in New Issue
Block a user