We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 797ee1f commit cc563ffCopy full SHA for cc563ff
packages/dev/scripts/util.mjs
@@ -531,5 +531,10 @@ export function topoSort (dirs) {
531
const circularSorted = Object.keys(circular)
532
.sort((a, b) => circular[a].vertices.length < circular[b].vertices.length ? -1 : 1);
533
534
- return sorted.concat(circularSorted);
+ const flattenedEdges = edges.flat();
535
+ // Packages that have no edges
536
+ /** @type {string[]} */
537
+ const standAlones = dirs.filter((d) => !flattenedEdges.includes(d));
538
+
539
+ return sorted.concat(circularSorted).concat(standAlones);
540
}
0 commit comments