@npmcli/arborist 2.6.3 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,536 @@
1
+ // Given a dep, a node that depends on it, and the edge representing that
2
+ // dependency, place the dep somewhere in the node's tree, and all of its
3
+ // peer dependencies.
4
+ //
5
+ // Handles all of the tree updating needed to place the dep, including
6
+ // removing replaced nodes, pruning now-extraneous or invalidated nodes,
7
+ // and saves a set of what was placed and what needs re-evaluation as
8
+ // a result.
9
+
10
+ const log = require('proc-log')
11
+ const deepestNestingTarget = require('./deepest-nesting-target.js')
12
+ const CanPlaceDep = require('./can-place-dep.js')
13
+ const {
14
+ KEEP,
15
+ CONFLICT,
16
+ } = CanPlaceDep
17
+ const debug = require('./debug.js')
18
+
19
+ const gatherDepSet = require('./gather-dep-set.js')
20
+ const peerEntrySets = require('./peer-entry-sets.js')
21
+
22
+ class PlaceDep {
23
+ constructor (options) {
24
+ const {
25
+ dep,
26
+ edge,
27
+ parent = null,
28
+ } = options
29
+ this.name = edge.name
30
+ this.dep = dep
31
+ this.edge = edge
32
+ this.canPlace = null
33
+
34
+ this.target = null
35
+ this.placed = null
36
+
37
+ // inherit all these fields from the parent to ensure consistency.
38
+ const {
39
+ preferDedupe,
40
+ force,
41
+ explicitRequest,
42
+ updateNames,
43
+ auditReport,
44
+ legacyBundling,
45
+ strictPeerDeps,
46
+ legacyPeerDeps,
47
+ globalStyle,
48
+ } = parent || options
49
+ Object.assign(this, {
50
+ preferDedupe,
51
+ force,
52
+ explicitRequest,
53
+ updateNames,
54
+ auditReport,
55
+ legacyBundling,
56
+ strictPeerDeps,
57
+ legacyPeerDeps,
58
+ globalStyle,
59
+ })
60
+
61
+ this.children = []
62
+ this.parent = parent
63
+ this.peerConflict = null
64
+
65
+ this.checks = new Map()
66
+
67
+ this.place()
68
+ }
69
+
70
+ place () {
71
+ const {
72
+ edge,
73
+ dep,
74
+ preferDedupe,
75
+ globalStyle,
76
+ legacyBundling,
77
+ explicitRequest,
78
+ updateNames,
79
+ checks,
80
+ } = this
81
+
82
+ // nothing to do if the edge is fine as it is
83
+ if (edge.to &&
84
+ !edge.error &&
85
+ !explicitRequest &&
86
+ !updateNames.includes(edge.name) &&
87
+ !this.isVulnerable(edge.to))
88
+ return
89
+
90
+ // walk up the tree until we hit either a top/root node, or a place
91
+ // where the dep is not a peer dep.
92
+ const start = this.getStartNode()
93
+
94
+ let canPlace = null
95
+ let canPlaceSelf = null
96
+ for (const target of start.ancestry()) {
97
+ // if the current location has a peerDep on it, then we can't place here
98
+ // this is pretty rare to hit, since we always prefer deduping peers,
99
+ // and the getStartNode will start us out above any peers from the
100
+ // thing that depends on it. but we could hit it with something like:
101
+ //
102
+ // a -> (b@1, c@1)
103
+ // +-- c@1
104
+ // +-- b -> PEEROPTIONAL(v) (c@2)
105
+ // +-- c@2 -> (v)
106
+ //
107
+ // So we check if we can place v under c@2, that's fine.
108
+ // Then we check under b, and can't, because of the optional peer dep.
109
+ // but we CAN place it under a, so the correct thing to do is keep
110
+ // walking up the tree.
111
+ const targetEdge = target.edgesOut.get(edge.name)
112
+ if (!target.isTop && targetEdge && targetEdge.peer)
113
+ continue
114
+
115
+ const cpd = new CanPlaceDep({
116
+ dep,
117
+ edge,
118
+ // note: this sets the parent's canPlace as the parent of this
119
+ // canPlace, but it does NOT add this canPlace to the parent's
120
+ // children. This way, we can know that it's a peer dep, and
121
+ // get the top edge easily, while still maintaining the
122
+ // tree of checks that factored into the original decision.
123
+ parent: this.parent && this.parent.canPlace,
124
+ target,
125
+ preferDedupe,
126
+ explicitRequest: this.explicitRequest,
127
+ })
128
+ checks.set(target, cpd)
129
+
130
+ // It's possible that a "conflict" is a conflict among the *peers* of
131
+ // a given node we're trying to place, but there actually is no current
132
+ // node. Eg,
133
+ // root -> (a, b)
134
+ // a -> PEER(c)
135
+ // b -> PEER(d)
136
+ // d -> PEER(c@2)
137
+ // We place (a), and get a peer of (c) along with it.
138
+ // then we try to place (b), and get CONFLICT in the check, because
139
+ // of the conflicting peer from (b)->(d)->(c@2). In that case, we
140
+ // should treat (b) and (d) as OK, and place them in the last place
141
+ // where they did not themselves conflict, and skip c@2 if conflict
142
+ // is ok by virtue of being forced or not ours and not strict.
143
+ if (cpd.canPlaceSelf !== CONFLICT)
144
+ canPlaceSelf = cpd
145
+
146
+ // we found a place this can go, along with all its peer friends.
147
+ // we break when we get the first conflict
148
+ if (cpd.canPlace !== CONFLICT)
149
+ canPlace = cpd
150
+ else
151
+ break
152
+
153
+ // if it's a load failure, just plop it in the first place attempted,
154
+ // since we're going to crash the build or prune it out anyway.
155
+ // but, this will frequently NOT be a successful canPlace, because
156
+ // it'll have no version or other information.
157
+ if (dep.errors.length)
158
+ break
159
+
160
+ // nest packages like npm v1 and v2
161
+ // very disk-inefficient
162
+ if (legacyBundling)
163
+ break
164
+
165
+ // when installing globally, or just in global style, we never place
166
+ // deps above the first level.
167
+ if (globalStyle) {
168
+ const rp = target.resolveParent
169
+ if (rp && rp.isProjectRoot)
170
+ break
171
+ }
172
+ }
173
+
174
+ Object.assign(this, {
175
+ canPlace,
176
+ canPlaceSelf,
177
+ })
178
+ this.current = edge.to
179
+
180
+ // if we can't find a target, that means that the last place checked,
181
+ // and all the places before it, had a conflict.
182
+ if (!canPlace) {
183
+ // if not forced, or it's our dep, or strictPeerDeps is set, then
184
+ // this is an ERESOLVE error.
185
+ if (!this.conflictOk)
186
+ return this.failPeerConflict()
187
+
188
+ // ok! we're gonna allow the conflict, but we should still warn
189
+ // if we have a current, then we treat CONFLICT as a KEEP.
190
+ // otherwise, we just skip it. Only warn on the one that actually
191
+ // could not be placed somewhere.
192
+ if (!canPlaceSelf) {
193
+ this.warnPeerConflict()
194
+ return
195
+ }
196
+
197
+ this.canPlace = canPlaceSelf
198
+ }
199
+
200
+ // now we have a target, a tree of CanPlaceDep results for the peer group,
201
+ // and we are ready to go
202
+ this.placeInTree()
203
+ }
204
+
205
+ placeInTree () {
206
+ const {
207
+ dep,
208
+ canPlace,
209
+ edge,
210
+ } = this
211
+
212
+ /* istanbul ignore next */
213
+ if (!canPlace) {
214
+ debug(() => {
215
+ throw new Error('canPlace not set, but trying to place in tree')
216
+ })
217
+ return
218
+ }
219
+
220
+ const { target } = canPlace
221
+
222
+ log.silly(
223
+ 'placeDep',
224
+ target.location || 'ROOT',
225
+ `${dep.name}@${dep.version}`,
226
+ canPlace.description,
227
+ `for: ${this.edge.from.package._id || this.edge.from.location}`,
228
+ `want: ${edge.spec || '*'}`
229
+ )
230
+
231
+ const placementType = canPlace.canPlace === CONFLICT
232
+ ? canPlace.canPlaceSelf
233
+ : canPlace.canPlace
234
+
235
+ // if we're placing in the tree with --force, we can get here even though
236
+ // it's a conflict. Treat it as a KEEP, but warn and move on.
237
+ if (placementType === KEEP) {
238
+ // this was an overridden peer dep
239
+ if (edge.peer && !edge.valid)
240
+ this.warnPeerConflict()
241
+
242
+ // if we get a KEEP in a update scenario, then we MAY have something
243
+ // already duplicating this unnecessarily! For example:
244
+ // ```
245
+ // root (dep: y@1)
246
+ // +-- x (dep: y@1.1)
247
+ // | +-- y@1.1.0 (replacing with 1.1.2, got KEEP at the root)
248
+ // +-- y@1.1.2 (updated already from 1.0.0)
249
+ // ```
250
+ // Now say we do `reify({update:['y']})`, and the latest version is
251
+ // 1.1.2, which we now have in the root. We'll try to place y@1.1.2
252
+ // first in x, then in the root, ending with KEEP, because we already
253
+ // have it. In that case, we ought to REMOVE the nm/x/nm/y node, because
254
+ // it is an unnecessary duplicate.
255
+ this.pruneDedupable(target)
256
+ return
257
+ }
258
+
259
+ // XXX if we are replacing SOME of a peer entry group, we will need to
260
+ // remove any that are not being replaced and will now be invalid, and
261
+ // re-evaluate them deeper into the tree.
262
+
263
+ const virtualRoot = dep.parent
264
+ this.placed = new dep.constructor({
265
+ name: dep.name,
266
+ pkg: dep.package,
267
+ resolved: dep.resolved,
268
+ integrity: dep.integrity,
269
+ legacyPeerDeps: this.legacyPeerDeps,
270
+ error: dep.errors[0],
271
+ ...(dep.isLink ? { target: dep.target, realpath: dep.target.path } : {}),
272
+ })
273
+
274
+ this.oldDep = target.children.get(this.name)
275
+ if (this.oldDep)
276
+ this.replaceOldDep()
277
+ else
278
+ this.placed.parent = target
279
+
280
+ // if it's an overridden peer dep, warn about it
281
+ if (edge.peer && !this.placed.satisfies(edge))
282
+ this.warnPeerConflict()
283
+
284
+ // If the edge is not an error, then we're updating something, and
285
+ // MAY end up putting a better/identical node further up the tree in
286
+ // a way that causes an unnecessary duplication. If so, remove the
287
+ // now-unnecessary node.
288
+ if (edge.valid && edge.to && edge.to !== this.placed)
289
+ this.pruneDedupable(edge.to, false)
290
+
291
+ // in case we just made some duplicates that can be removed,
292
+ // prune anything deeper in the tree that can be replaced by this
293
+ for (const node of target.root.inventory.query('name', this.name)) {
294
+ if (node.isDescendantOf(target) && !node.isTop) {
295
+ this.pruneDedupable(node, false)
296
+ // only walk the direct children of the ones we kept
297
+ if (node.root === target.root) {
298
+ for (const kid of node.children.values())
299
+ this.pruneDedupable(kid, false)
300
+ }
301
+ }
302
+ }
303
+
304
+ // also place its unmet or invalid peer deps at this location
305
+ // loop through any peer deps from the thing we just placed, and place
306
+ // those ones as well. it's safe to do this with the virtual nodes,
307
+ // because we're copying rather than moving them out of the virtual root,
308
+ // otherwise they'd be gone and the peer set would change throughout
309
+ // this loop.
310
+ for (const peerEdge of this.placed.edgesOut.values()) {
311
+ if (peerEdge.valid || !peerEdge.peer || peerEdge.overridden)
312
+ continue
313
+
314
+ const peer = virtualRoot.children.get(peerEdge.name)
315
+
316
+ // Note: if the virtualRoot *doesn't* have the peer, then that means
317
+ // it's an optional peer dep. If it's not being properly met (ie,
318
+ // peerEdge.valid is false), then this is likely heading for an
319
+ // ERESOLVE error, unless it can walk further up the tree.
320
+ if (!peer)
321
+ continue
322
+
323
+ // overridden peerEdge, just accept what's there already
324
+ if (!peer.satisfies(peerEdge))
325
+ continue
326
+
327
+ this.children.push(new PlaceDep({
328
+ parent: this,
329
+ dep: peer,
330
+ node: this.placed,
331
+ edge: peerEdge,
332
+ }))
333
+ }
334
+ }
335
+
336
+ replaceOldDep () {
337
+ // XXX handle replacing an entire peer group?
338
+ // what about cases where we need to push some other peer groups deeper
339
+ // into the tree? all the tree updating should be done here, and track
340
+ // all the things that we add and remove, so that we can know what
341
+ // to re-evaluate.
342
+
343
+ // if we're replacing, we should also remove any nodes for edges that
344
+ // are now invalid, and where this (or its deps) is the only dependent,
345
+ // and also recurse on that pruning. Otherwise leaving that dep node
346
+ // around can result in spurious conflicts pushing nodes deeper into
347
+ // the tree than needed in the case of cycles that will be removed
348
+ // later anyway.
349
+ const oldDeps = []
350
+ for (const [name, edge] of this.oldDep.edgesOut.entries()) {
351
+ if (!this.placed.edgesOut.has(name) && edge.to)
352
+ oldDeps.push(...gatherDepSet([edge.to], e => e.to !== edge.to))
353
+ }
354
+ this.placed.replace(this.oldDep)
355
+ this.pruneForReplacement(this.placed, oldDeps)
356
+ }
357
+
358
+ pruneForReplacement (node, oldDeps) {
359
+ // gather up all the now-invalid/extraneous edgesOut, as long as they are
360
+ // only depended upon by the old node/deps
361
+ const invalidDeps = new Set([...node.edgesOut.values()]
362
+ .filter(e => e.to && !e.valid).map(e => e.to))
363
+ for (const dep of oldDeps) {
364
+ const set = gatherDepSet([dep], e => e.to !== dep && e.valid)
365
+ for (const dep of set)
366
+ invalidDeps.add(dep)
367
+ }
368
+
369
+ // ignore dependency edges from the node being replaced, but
370
+ // otherwise filter the set down to just the set with no
371
+ // dependencies from outside the set, except the node in question.
372
+ const deps = gatherDepSet(invalidDeps, edge =>
373
+ edge.from !== node && edge.to !== node && edge.valid)
374
+
375
+ // now just delete whatever's left, because it's junk
376
+ for (const dep of deps)
377
+ dep.root = null
378
+ }
379
+
380
+ // prune all the nodes in a branch of the tree that can be safely removed
381
+ // This is only the most basic duplication detection; it finds if there
382
+ // is another satisfying node further up the tree, and if so, dedupes.
383
+ // Even in legacyBundling mode, we do this amount of deduplication.
384
+ pruneDedupable (node, descend = true) {
385
+ if (node.canDedupe(this.preferDedupe)) {
386
+ // gather up all deps that have no valid edges in from outside
387
+ // the dep set, except for this node we're deduping, so that we
388
+ // also prune deps that would be made extraneous.
389
+ const deps = gatherDepSet([node], e => e.to !== node && e.valid)
390
+ for (const node of deps)
391
+ node.root = null
392
+ return
393
+ }
394
+ if (descend) {
395
+ // sort these so that they're deterministically ordered
396
+ // otherwise, resulting tree shape is dependent on the order
397
+ // in which they happened to be resolved.
398
+ const nodeSort = (a, b) => a.location.localeCompare(b.location, 'en')
399
+
400
+ const children = [...node.children.values()].sort(nodeSort)
401
+ for (const child of children)
402
+ this.pruneDedupable(child)
403
+ const fsChildren = [...node.fsChildren].sort(nodeSort)
404
+ for (const topNode of fsChildren) {
405
+ const children = [...topNode.children.values()].sort(nodeSort)
406
+ for (const child of children)
407
+ this.pruneDedupable(child)
408
+ }
409
+ }
410
+ }
411
+
412
+ get conflictOk () {
413
+ return this.force || (!this.isMine && !this.strictPeerDeps)
414
+ }
415
+
416
+ get isMine () {
417
+ const { edge } = this.top
418
+ const { from: node } = edge
419
+
420
+ if (node.isWorkspace || node.isProjectRoot)
421
+ return true
422
+
423
+ if (!edge.peer)
424
+ return false
425
+
426
+ // re-entry case. check if any non-peer edges come from the project,
427
+ // or any entryEdges on peer groups are from the root.
428
+ let hasPeerEdges = false
429
+ for (const edge of node.edgesIn) {
430
+ if (edge.peer) {
431
+ hasPeerEdges = true
432
+ continue
433
+ }
434
+ if (edge.from.isWorkspace || edge.from.isProjectRoot)
435
+ return true
436
+ }
437
+ if (hasPeerEdges) {
438
+ for (const edge of peerEntrySets(node).keys()) {
439
+ if (edge.from.isWorkspace || edge.from.isProjectRoot)
440
+ return true
441
+ }
442
+ }
443
+
444
+ return false
445
+ }
446
+
447
+ warnPeerConflict () {
448
+ this.edge.overridden = true
449
+ const expl = this.explainPeerConflict()
450
+ log.warn('ERESOLVE', 'overriding peer dependency', expl)
451
+ }
452
+
453
+ failPeerConflict () {
454
+ const expl = this.explainPeerConflict()
455
+ throw Object.assign(new Error('could not resolve'), expl)
456
+ }
457
+
458
+ explainPeerConflict () {
459
+ const { edge, dep } = this.top
460
+ const { from: node } = edge
461
+ const curNode = node.resolve(edge.name)
462
+
463
+ const expl = {
464
+ code: 'ERESOLVE',
465
+ edge: edge.explain(),
466
+ dep: dep.explain(edge),
467
+ }
468
+
469
+ if (this.parent) {
470
+ // this is the conflicted peer
471
+ expl.current = curNode && curNode.explain(edge)
472
+ expl.peerConflict = this.current && this.current.explain(this.edge)
473
+ } else {
474
+ expl.current = curNode && curNode.explain()
475
+ if (this.canPlaceSelf && this.canPlaceSelf.canPlaceSelf !== CONFLICT) {
476
+ // failed while checking for a child dep
477
+ const cps = this.canPlaceSelf
478
+ for (const peer of cps.conflictChildren) {
479
+ if (peer.current) {
480
+ expl.peerConflict = {
481
+ current: peer.current.explain(),
482
+ peer: peer.dep.explain(peer.edge),
483
+ }
484
+ break
485
+ }
486
+ }
487
+ } else {
488
+ expl.peerConflict = {
489
+ current: this.current && this.current.explain(),
490
+ peer: this.dep.explain(this.edge),
491
+ }
492
+ }
493
+ }
494
+
495
+ const {
496
+ strictPeerDeps,
497
+ force,
498
+ isMine,
499
+ } = this
500
+ Object.assign(expl, {
501
+ strictPeerDeps,
502
+ force,
503
+ isMine,
504
+ })
505
+
506
+ // XXX decorate more with this.canPlace and this.canPlaceSelf,
507
+ // this.checks, this.children, walk over conflicted peers, etc.
508
+ return expl
509
+ }
510
+
511
+ getStartNode () {
512
+ // if we are a peer, then we MUST be at least as shallow as the
513
+ // peer dependent
514
+ const from = this.parent ? this.parent.getStartNode() : this.edge.from
515
+ return deepestNestingTarget(from, this.name)
516
+ }
517
+
518
+ get top () {
519
+ return this.parent ? this.parent.top : this
520
+ }
521
+
522
+ isVulnerable (node) {
523
+ return this.auditReport && this.auditReport.isVulnerable(node)
524
+ }
525
+
526
+ get allChildren () {
527
+ const set = new Set(this.children)
528
+ for (const child of set) {
529
+ for (const grandchild of child.children)
530
+ set.add(grandchild)
531
+ }
532
+ return [...set]
533
+ }
534
+ }
535
+
536
+ module.exports = PlaceDep
package/lib/printable.js CHANGED
@@ -31,6 +31,10 @@ class ArboristNode {
31
31
  this.bundled = true
32
32
  if (tree.inDepBundle)
33
33
  this.bundler = tree.getBundler().location
34
+ if (tree.isProjectRoot)
35
+ this.isProjectRoot = true
36
+ if (tree.isWorkspace)
37
+ this.isWorkspace = true
34
38
  const bd = tree.package && tree.package.bundleDependencies
35
39
  if (bd && bd.length)
36
40
  this.bundleDependencies = bd
@@ -107,6 +111,8 @@ class Edge {
107
111
  this.spec = edge.spec || '*'
108
112
  if (edge.error)
109
113
  this.error = edge.error
114
+ if (edge.overridden)
115
+ this.overridden = edge.overridden
110
116
  }
111
117
  }
112
118
 
@@ -122,6 +128,8 @@ class EdgeOut extends Edge {
122
128
  this.to ? ' -> ' + this.to : ''
123
129
  }${
124
130
  this.error ? ' ' + this.error : ''
131
+ }${
132
+ this.overridden ? ' overridden' : ''
125
133
  } }`
126
134
  }
127
135
  }
@@ -136,6 +144,8 @@ class EdgeIn extends Edge {
136
144
  [util.inspect.custom] () {
137
145
  return `{ ${this.from || '""'} ${this.type} ${this.name}@${this.spec}${
138
146
  this.error ? ' ' + this.error : ''
147
+ }${
148
+ this.overridden ? ' overridden' : ''
139
149
  } }`
140
150
  }
141
151
  }
package/lib/shrinkwrap.js CHANGED
@@ -183,8 +183,10 @@ const assertNoNewer = async (path, data, lockTime, dir = path, seen = null) => {
183
183
  await assertNoNewer(path, data, lockTime, child, seen)
184
184
  else if (ent.isSymbolicLink()) {
185
185
  const target = resolve(parent, await readlink(child))
186
- const tstat = await stat(target).catch(() => null)
186
+ const tstat = await stat(target).catch(
187
+ /* istanbul ignore next - windows */ () => null)
187
188
  seen.add(relpath(path, child))
189
+ /* istanbul ignore next - windows cannot do this */
188
190
  if (tstat && tstat.isDirectory() && !seen.has(relpath(path, target)))
189
191
  await assertNoNewer(path, data, lockTime, target, seen)
190
192
  }
@@ -349,6 +351,7 @@ class Shrinkwrap {
349
351
  reset () {
350
352
  this.tree = null
351
353
  this[_awaitingUpdate] = new Map()
354
+ this.originalLockfileVersion = lockfileVersion
352
355
  this.data = {
353
356
  lockfileVersion,
354
357
  requires: true,
@@ -801,7 +804,7 @@ class Shrinkwrap {
801
804
  if (this.tree) {
802
805
  if (this.yarnLock)
803
806
  this.yarnLock.fromTree(this.tree)
804
- const root = Shrinkwrap.metaFromNode(this.tree.target || this.tree, this.path)
807
+ const root = Shrinkwrap.metaFromNode(this.tree.target, this.path)
805
808
  this.data.packages = {}
806
809
  if (Object.keys(root).length)
807
810
  this.data.packages[''] = root
@@ -863,7 +866,7 @@ class Shrinkwrap {
863
866
  const spec = !edge ? rSpec
864
867
  : npa.resolve(node.name, edge.spec, edge.from.realpath)
865
868
 
866
- if (node.target)
869
+ if (node.isLink)
867
870
  lock.version = `file:${relpath(this.path, node.realpath)}`
868
871
  else if (spec && (spec.type === 'file' || spec.type === 'remote'))
869
872
  lock.version = spec.saveSpec
@@ -887,7 +890,7 @@ class Shrinkwrap {
887
890
  // when we didn't resolve to git, file, or dir, and didn't request
888
891
  // git, file, dir, or remote, then the resolved value is necessary.
889
892
  if (node.resolved &&
890
- !node.target &&
893
+ !node.isLink &&
891
894
  rSpec.type !== 'git' &&
892
895
  rSpec.type !== 'file' &&
893
896
  rSpec.type !== 'directory' &&
@@ -916,7 +919,7 @@ class Shrinkwrap {
916
919
  lock.optional = true
917
920
  }
918
921
 
919
- const depender = node.target || node
922
+ const depender = node.target
920
923
  if (depender.edgesOut.size > 0) {
921
924
  if (node !== this.tree) {
922
925
  lock.requires = [...depender.edgesOut.entries()].reduce((set, [k, v]) => {
@@ -941,7 +944,7 @@ class Shrinkwrap {
941
944
  }
942
945
 
943
946
  // now we walk the children, putting them in the 'dependencies' object
944
- const {children} = node.target || node
947
+ const {children} = node.target
945
948
  if (!children.size)
946
949
  delete lock.dependencies
947
950
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/arborist",
3
- "version": "2.6.3",
3
+ "version": "2.8.0",
4
4
  "description": "Manage node_modules trees",
5
5
  "dependencies": {
6
6
  "@npmcli/installed-package-contents": "^1.0.7",
@@ -9,25 +9,29 @@
9
9
  "@npmcli/move-file": "^1.1.0",
10
10
  "@npmcli/name-from-folder": "^1.0.1",
11
11
  "@npmcli/node-gyp": "^1.0.1",
12
+ "@npmcli/package-json": "^1.0.1",
12
13
  "@npmcli/run-script": "^1.8.2",
13
14
  "bin-links": "^2.2.1",
14
15
  "cacache": "^15.0.3",
15
16
  "common-ancestor-path": "^1.0.1",
16
17
  "json-parse-even-better-errors": "^2.3.1",
17
18
  "json-stringify-nice": "^1.1.4",
19
+ "mkdirp": "^1.0.4",
18
20
  "mkdirp-infer-owner": "^2.0.0",
19
21
  "npm-install-checks": "^4.0.0",
20
- "npm-package-arg": "^8.1.0",
22
+ "npm-package-arg": "^8.1.5",
21
23
  "npm-pick-manifest": "^6.1.0",
22
24
  "npm-registry-fetch": "^11.0.0",
23
- "pacote": "^11.2.6",
25
+ "pacote": "^11.3.5",
24
26
  "parse-conflict-json": "^1.1.1",
25
27
  "proc-log": "^1.0.0",
26
28
  "promise-all-reject-late": "^1.0.0",
27
29
  "promise-call-limit": "^1.0.1",
28
30
  "read-package-json-fast": "^2.0.2",
29
31
  "readdir-scoped-modules": "^1.1.0",
32
+ "rimraf": "^3.0.2",
30
33
  "semver": "^7.3.5",
34
+ "ssri": "^8.0.1",
31
35
  "tar": "^6.1.0",
32
36
  "treeverse": "^1.0.4",
33
37
  "walk-up-path": "^1.0.0"
@@ -49,7 +53,7 @@
49
53
  "test-only": "tap",
50
54
  "posttest": "npm run lint",
51
55
  "snap": "tap",
52
- "postsnap": "npm run lint",
56
+ "postsnap": "npm run lintfix",
53
57
  "test-proxy": "ARBORIST_TEST_PROXY=1 tap --snapshot",
54
58
  "preversion": "npm test",
55
59
  "postversion": "npm publish",