Expand description
Node.js node_modules directory traversal.
Discovers every npm package directory reachable from the project root by following Node’s
module resolution algorithm: walk up the directory tree collecting node_modules/ entries,
descend into each package directory (including scoped @scope/pkg packages), and avoid
revisiting the same canonical URL twice.
Functions§
- build_
node_ module_ import_ paths - Build all ancestor directory URLs from the main module URL, to be used as
starting points for node_modules scanning.
Mirrors
ModuleStateBuilder.buildNodeModuleImportPaths. - build_
node_ module_ paths - Discover all node module paths starting from the given import URLs.
Mirrors
ModuleStateBuilder.buildNodeModulePaths.