Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created August 23, 2021 18:52
Show Gist options
  • Save isaacs/cda2737260327d41ef5437a7e85ac94b to your computer and use it in GitHub Desktop.
Save isaacs/cda2737260327d41ef5437a7e85ac94b to your computer and use it in GitHub Desktop.
diff --git a/lib/arborist/reify.js b/lib/arborist/reify.js
index 965435f8..275563b3 100644
--- a/lib/arborist/reify.js
+++ b/lib/arborist/reify.js
@@ -326,6 +326,16 @@ module.exports = cls => class Reifier extends cls {
if (actual)
filterNodes.push(actual)
}
+ if (this[_includeWorkspaceRoot]) {
+ for (const tree of [this.idealTree, this.actualTree]) {
+ for (const {name, type, to} of tree.edgesOut.values()) {
+ if (type === 'workspace')
+ continue
+ if (to)
+ filterNodes.push(to)
+ }
+ }
+ }
}
// find all the nodes that need to change between the actual
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment