Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2018-04-13 00:12:45 +0300
committerRebecca Turner <me@re-becca.org>2018-04-13 00:12:46 +0300
commit5f2bf4222004117eb38c44ace961bd15a779fd66 (patch)
tree6129a616a6a6a0639742dc5056c29a9d2bff9e5e /node_modules/read-package-tree
parent7bdbaeea61853280f00c8443a3b2d6e6b893ada9 (diff)
read-package-tree@5.2.1
Credit: @zkat
Diffstat (limited to 'node_modules/read-package-tree')
-rw-r--r--node_modules/read-package-tree/package.json20
-rw-r--r--node_modules/read-package-tree/rpt.js13
2 files changed, 23 insertions, 10 deletions
diff --git a/node_modules/read-package-tree/package.json b/node_modules/read-package-tree/package.json
index 55513a939..68c991ca9 100644
--- a/node_modules/read-package-tree/package.json
+++ b/node_modules/read-package-tree/package.json
@@ -1,27 +1,27 @@
{
- "_from": "read-package-tree@5.1.6",
- "_id": "read-package-tree@5.1.6",
+ "_from": "read-package-tree@5.2.1",
+ "_id": "read-package-tree@5.2.1",
"_inBundle": false,
- "_integrity": "sha512-FCX1aT3GWyY658wzDICef4p+n0dB+ENRct8E/Qyvppj6xVpOYerBHfUu7OP5Rt1/393Tdglguf5ju5DEX4wZNg==",
+ "_integrity": "sha512-2CNoRoh95LxY47LvqrehIAfUVda2JbuFE/HaGYs42bNrGG+ojbw1h3zOcPcQ+1GQ3+rkzNndZn85u1XyZ3UsIA==",
"_location": "/read-package-tree",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "read-package-tree@5.1.6",
+ "raw": "read-package-tree@5.2.1",
"name": "read-package-tree",
"escapedName": "read-package-tree",
- "rawSpec": "5.1.6",
+ "rawSpec": "5.2.1",
"saveSpec": null,
- "fetchSpec": "5.1.6"
+ "fetchSpec": "5.2.1"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.6.tgz",
- "_shasum": "4f03e83d0486856fb60d97c94882841c2a7b1b7a",
- "_spec": "read-package-tree@5.1.6",
+ "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.2.1.tgz",
+ "_shasum": "6218b187d6fac82289ce4387bbbaf8eef536ad63",
+ "_spec": "read-package-tree@5.2.1",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
@@ -64,5 +64,5 @@
"scripts": {
"test": "tap test/*.js"
},
- "version": "5.1.6"
+ "version": "5.2.1"
}
diff --git a/node_modules/read-package-tree/rpt.js b/node_modules/read-package-tree/rpt.js
index 96f152012..c577ea180 100644
--- a/node_modules/read-package-tree/rpt.js
+++ b/node_modules/read-package-tree/rpt.js
@@ -47,6 +47,12 @@ function Node (pkg, logical, physical, er, cache, fromLink) {
debug(node.constructor.name, dpath(physical), pkg && pkg._id)
+ const parent = path.dirname(logical)
+ if (parent[0] === '@') {
+ node.name = path.basename(parent) + '/' + path.basename(logical)
+ } else {
+ node.name = path.basename(logical)
+ }
node.path = logical
node.realpath = physical
node.error = er
@@ -77,6 +83,13 @@ function Link (pkg, logical, physical, realpath, er, cache) {
debug(this.constructor.name, dpath(physical), pkg && pkg._id)
+ const dir = path.dirname(logical)
+ const parent = path.dirname(dir)
+ if (parent[0] === '@') {
+ this.name = path.basename(parent) + '/' + path.basename(dir)
+ } else {
+ this.name = path.basename(dir)
+ }
this.id = ID++
this.path = logical
this.realpath = realpath