@npmcli/arborist
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -8,3 +8,2 @@ // mixin implementing the buildIdealTree method | ||
const pickManifest = require('npm-pick-manifest') | ||
const mapWorkspaces = require('@npmcli/map-workspaces') | ||
const promiseCallLimit = require('promise-call-limit') | ||
@@ -55,3 +54,2 @@ | ||
const _manifests = Symbol('manifests') | ||
const _mapWorkspaces = Symbol('mapWorkspaces') | ||
const _linkFromSpec = Symbol('linkFromSpec') | ||
@@ -240,3 +238,2 @@ const _loadPeerSet = Symbol('loadPeerSet') | ||
.then(tree => this[_mapWorkspaces](tree)) | ||
.then(tree => { | ||
@@ -276,11 +273,2 @@ // null the virtual tree, because we're about to hack away at it | ||
[_mapWorkspaces] (node) { | ||
return mapWorkspaces({ cwd: node.path, pkg: node.package }) | ||
.then(workspaces => { | ||
if (workspaces.size) | ||
node.workspaces = workspaces | ||
return node | ||
}) | ||
} | ||
// process the add/rm requests by modifying the root node, and the | ||
@@ -287,0 +275,0 @@ // update.names request by queueing nodes dependent on those named. |
@@ -10,2 +10,3 @@ // mix-in implementing the loadActual method | ||
const ancestorPath = require('common-ancestor-path') | ||
const mapWorkspaces = require('@npmcli/map-workspaces') | ||
@@ -34,2 +35,3 @@ const Shrinkwrap = require('../shrinkwrap.js') | ||
const _loadActualActually = Symbol('loadActualActually') | ||
const _mapWorkspaces = Symbol('mapWorkspaces') | ||
const _actualTreePromise = Symbol('actualTreePromise') | ||
@@ -89,2 +91,3 @@ const _actualTree = Symbol('actualTree') | ||
: this[_actualTreePromise] = this[_loadActual](options) | ||
.then(tree => this[_mapWorkspaces](tree)) | ||
.then(tree => this.actualTree = tree) | ||
@@ -310,2 +313,14 @@ } | ||
async [_mapWorkspaces] (node) { | ||
const workspaces = await mapWorkspaces({ | ||
cwd: node.path, | ||
pkg: node.package | ||
}) | ||
if (workspaces.size) | ||
node.workspaces = workspaces | ||
return node | ||
} | ||
async [_findMissingEdges] () { | ||
@@ -312,0 +327,0 @@ // try to resolve any missing edges by walking up the directory tree, |
{ | ||
"name": "@npmcli/arborist", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Manage node_modules trees", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6418
263833
3