Skip to content

Commit

Permalink
Fix build script
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed May 28, 2024
1 parent ce4f75a commit 079e638
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ async function calculatePackageDependencies(packageDirs) {

if (pkg.dependencies) {
for (const dep of Object.keys(pkg.dependencies)) {
if (dep.startsWith("@eslint")) {
dependencies.add(dep);
}
dependencies.add(dep);
}
}

Expand All @@ -84,9 +82,13 @@ function createBuildOrder(dependencies) {
function visit(name) {
if (!seen.has(name)) {
seen.add(name);
const { dependencies: deps, dir } = dependencies.get(name);
deps.forEach(visit);
buildOrder.push(dir);

// we only need to deal with dependencies in this monorepo
if (dependencies.has(name)) {
const { dependencies: deps, dir } = dependencies.get(name);
deps.forEach(visit);
buildOrder.push(dir);
}
}
}

Expand Down

0 comments on commit 079e638

Please sign in to comment.