@npmcli/arborist
Advanced tools
Comparing version 0.0.0-pre.11 to 0.0.0-pre.12
@@ -113,2 +113,6 @@ // mixin implementing the buildIdealTree method | ||
get explicitRequests () { | ||
return new Set(this[_explicitRequests]) | ||
} | ||
// public method | ||
@@ -115,0 +119,0 @@ buildIdealTree (options = {}) { |
@@ -38,3 +38,2 @@ // mixin implementing the reify method | ||
const _diff = Symbol('diff') | ||
const _retiredPaths = Symbol('retiredPaths') | ||
@@ -113,3 +112,3 @@ const _retiredUnchanged = Symbol('retiredUnchanged') | ||
this[_diff] = null | ||
this.diff = null | ||
this[_retiredPaths] = {} | ||
@@ -174,7 +173,7 @@ this[_retiredUnchanged] = {} | ||
// and ideal trees. | ||
this[_diff] = Diff.calculate({ | ||
this.diff = Diff.calculate({ | ||
actual: this.actualTree, | ||
ideal: this.idealTree, | ||
}) | ||
for (const node of this[_diff].removed) { | ||
for (const node of this.diff.removed) { | ||
this[_addNodeToTrashList](node) | ||
@@ -205,3 +204,3 @@ } | ||
const moves = this[_retiredPaths] = {} | ||
for (const diff of this[_diff].children) { | ||
for (const diff of this.diff.children) { | ||
if (diff.action === 'CHANGE' || diff.action === 'REMOVE') { | ||
@@ -266,3 +265,3 @@ // we'll have to clean these up at the end, so add them to the list | ||
// so that we can avoid making the same directory multiple times | ||
const dirs = this[_diff].leaves | ||
const dirs = this.diff.leaves | ||
.filter(diff => { | ||
@@ -297,3 +296,3 @@ return (diff.action === 'ADD' || diff.action === 'CHANGE') && | ||
[_loadShrinkwrapsAndUpdateTrees] (seen = new Set()) { | ||
const shrinkwraps = this[_diff].leaves | ||
const shrinkwraps = this.diff.leaves | ||
.filter(d => (d.action === 'CHANGE' || d.action === 'ADD') && | ||
@@ -507,3 +506,3 @@ d.ideal.hasShrinkwrap && !seen.has(d.ideal) && | ||
dfwalk({ | ||
tree: this[_diff], | ||
tree: this.diff, | ||
visit: diff => { | ||
@@ -534,3 +533,3 @@ const node = diff.ideal | ||
dfwalk({ | ||
tree: this[_diff], | ||
tree: this.diff, | ||
filter: diff => diff.ideal, | ||
@@ -566,3 +565,3 @@ visit: diff => { | ||
this[_retiredUnchanged] = {} | ||
return promiseAllRejectLate(this[_diff].children.map(diff => { | ||
return promiseAllRejectLate(this.diff.children.map(diff => { | ||
const realFolder = (diff.actual || diff.ideal).path | ||
@@ -632,3 +631,3 @@ const retireFolder = moves[realFolder] | ||
dfwalk({ | ||
tree: this[_diff], | ||
tree: this.diff, | ||
leave: diff => installedNodes.push(diff.ideal), | ||
@@ -635,0 +634,0 @@ // process adds before changes, ignore removals |
{ | ||
"name": "@npmcli/arborist", | ||
"version": "0.0.0-pre.11", | ||
"version": "0.0.0-pre.12", | ||
"description": "Manage node_modules trees", | ||
@@ -35,3 +35,3 @@ "dependencies": { | ||
"postversion": "npm publish", | ||
"postpublish": "git push origin --follow-tags" | ||
"prepublishOnly": "git push origin --follow-tags" | ||
}, | ||
@@ -38,0 +38,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
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
194086
4585