diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2020-12-04 22:28:31 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-12-04 22:28:31 +0300 |
commit | def85c72640ffe2d27977c56b7aa06c6f6346ca9 (patch) | |
tree | f8c801b16b368b5ebb8dd1d75c27de8391209ecb /node_modules/@npmcli | |
parent | 3a68855daefb930aa08bb863bbfdb831e2442a49 (diff) |
@npmcli/arborist@1.0.14
Diffstat (limited to 'node_modules/@npmcli')
-rw-r--r-- | node_modules/@npmcli/arborist/lib/node.js | 10 | ||||
-rw-r--r-- | node_modules/@npmcli/arborist/package.json | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/node_modules/@npmcli/arborist/lib/node.js b/node_modules/@npmcli/arborist/lib/node.js index 7381211ae..6a274bf92 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 a83ac1e43..80d24c62c 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", |