diff --git a/node_modules/@npmcli/arborist/lib/node.js b/node_modules/@npmcli/arborist/lib/node.js index 7381211ae37e8..6a274bf92b781 100644 --- a/node_modules/@npmcli/arborist/lib/node.js +++ b/node_modules/@npmcli/arborist/lib/node.js @@ -107,13 +107,15 @@ class Node { this.name = name || nameFromFolder(path || pkg.name || realpath) || - pkg.name - - if (!this.name) - throw new TypeError('could not detect node name from path or package') + pkg.name || + null // should be equal if not a link this.path = path && resolve(path) + + if (!this.name && (!this.path || this.path !== dirname(this.path))) + throw new TypeError('could not detect node name from path or package') + this.realpath = !this.isLink ? this.path : resolve(realpath) this.resolved = resolved || null diff --git a/node_modules/@npmcli/arborist/package.json b/node_modules/@npmcli/arborist/package.json index a83ac1e43f738..80d24c62c7cfa 100644 --- a/node_modules/@npmcli/arborist/package.json +++ b/node_modules/@npmcli/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "1.0.13", + "version": "1.0.14", "description": "Manage node_modules trees", "dependencies": { "@npmcli/installed-package-contents": "^1.0.5", diff --git a/package-lock.json b/package-lock.json index 21951b9865a25..e859b52224e42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,7 +78,7 @@ ], "license": "Artistic-2.0", "dependencies": { - "@npmcli/arborist": "^1.0.13", + "@npmcli/arborist": "^1.0.14", "@npmcli/ci-detect": "^1.2.0", "@npmcli/config": "^1.2.1", "@npmcli/run-script": "^1.8.1", @@ -386,9 +386,9 @@ } }, "node_modules/@npmcli/arborist": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-1.0.13.tgz", - "integrity": "sha512-AtNV/iuDFiwdPf2RqnTbq3cd3dRL6H5Vv3Ve+78SShfXF0dOFJrDsaVOFbmAqDKvemBny0cI8GBu+ncjkAffBw==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-1.0.14.tgz", + "integrity": "sha512-caa8hv5rW9VpQKk6tyNRvSaVDySVjo9GkI7Wj/wcsFyxPm3tYrEsFyTjSnJH8HCIfEGVQNjqqKXaXLFVp7UBag==", "inBundle": true, "dependencies": { "@npmcli/installed-package-contents": "^1.0.5", @@ -9107,9 +9107,9 @@ } }, "@npmcli/arborist": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-1.0.13.tgz", - "integrity": "sha512-AtNV/iuDFiwdPf2RqnTbq3cd3dRL6H5Vv3Ve+78SShfXF0dOFJrDsaVOFbmAqDKvemBny0cI8GBu+ncjkAffBw==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-1.0.14.tgz", + "integrity": "sha512-caa8hv5rW9VpQKk6tyNRvSaVDySVjo9GkI7Wj/wcsFyxPm3tYrEsFyTjSnJH8HCIfEGVQNjqqKXaXLFVp7UBag==", "requires": { "@npmcli/installed-package-contents": "^1.0.5", "@npmcli/map-workspaces": "^1.0.1", diff --git a/package.json b/package.json index 540ca1f1ad14b..219e9a390a147 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@npmcli/arborist": "^1.0.13", + "@npmcli/arborist": "^1.0.14", "@npmcli/ci-detect": "^1.2.0", "@npmcli/config": "^1.2.1", "@npmcli/run-script": "^1.8.1",