@npmcli/arborist 9.1.8 → 9.1.10
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.
|
@@ -5,7 +5,7 @@ const { dirname, join, normalize, relative, resolve } = require('node:path')
|
|
|
5
5
|
const PackageJson = require('@npmcli/package-json')
|
|
6
6
|
const { readdirScoped } = require('@npmcli/fs')
|
|
7
7
|
const { walkUp } = require('walk-up-path')
|
|
8
|
-
const
|
|
8
|
+
const { commonAncestorPath } = require('common-ancestor-path')
|
|
9
9
|
const treeCheck = require('../tree-check.js')
|
|
10
10
|
|
|
11
11
|
const Shrinkwrap = require('../shrinkwrap.js')
|
|
@@ -364,7 +364,7 @@ module.exports = cls => class ActualLoader extends cls {
|
|
|
364
364
|
const nmContents = new Map()
|
|
365
365
|
const tree = this.#actualTree
|
|
366
366
|
for (const node of tree.inventory.values()) {
|
|
367
|
-
const ancestor =
|
|
367
|
+
const ancestor = commonAncestorPath(node.realpath, this.path)
|
|
368
368
|
|
|
369
369
|
const depPromises = []
|
|
370
370
|
for (const [name, edge] of node.edgesOut.entries()) {
|
package/lib/arborist/reify.js
CHANGED
|
@@ -510,7 +510,7 @@ module.exports = cls => class Reifier extends cls {
|
|
|
510
510
|
if (er.code === 'ENOENT') {
|
|
511
511
|
return didMkdirp ? null : mkdir(dirname(to), { recursive: true }).then(() =>
|
|
512
512
|
this[_renamePath](from, to, true))
|
|
513
|
-
} else if (er.code === 'EEXIST') {
|
|
513
|
+
} else if (er.code === 'EEXIST' || er.code === 'ENOTEMPTY') {
|
|
514
514
|
return rm(to, { recursive: true, force: true }).then(() => moveFile(from, to))
|
|
515
515
|
} else {
|
|
516
516
|
throw er
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/arborist",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.10",
|
|
4
4
|
"description": "Manage node_modules trees",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@isaacs/string-locale-compare": "^1.1.0",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@npmcli/run-script": "^10.0.0",
|
|
17
17
|
"bin-links": "^6.0.0",
|
|
18
18
|
"cacache": "^20.0.1",
|
|
19
|
-
"common-ancestor-path": "^
|
|
19
|
+
"common-ancestor-path": "^2.0.0",
|
|
20
20
|
"hosted-git-info": "^9.0.0",
|
|
21
21
|
"json-stringify-nice": "^1.1.4",
|
|
22
22
|
"lru-cache": "^11.2.1",
|