forked from npm/arborist
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: node.isDescendantOf follows fs hierarchy
Previously, the `node.isDescendantOf` method would only check for direct parents of that node, this may cause unexpected side effects on build ideal tree and reify when working with linked dependencies. This change modifies it so that `node.isDescendantOf` now looks at `node.resolveParent` (making sure `fsParents` are included in the lookup) to determine wether that node is a descendant of another. This also made it possible to refactor the logic that checks for an `external` dep in build-ideal-tree to use `node.isDescendantOf` instead of a regex check in the realpath of the link. Relates to: npm/cli#2900
- Loading branch information
Showing
5 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters