From 5bb15c3c4f0d7d77c73fd6dafa38ac36549b6e00 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 1 Jun 2017 18:17:37 -0700 Subject: read-package-tree@5.1.6 Credit: @iarna --- node_modules/read-package-tree/README.md | 2 +- node_modules/read-package-tree/package.json | 35 ++++++++++++++--------------- node_modules/read-package-tree/rpt.js | 30 +++++++++++++------------ 3 files changed, 34 insertions(+), 33 deletions(-) (limited to 'node_modules') diff --git a/node_modules/read-package-tree/README.md b/node_modules/read-package-tree/README.md index b3cda81f7..d2248f82b 100644 --- a/node_modules/read-package-tree/README.md +++ b/node_modules/read-package-tree/README.md @@ -35,7 +35,7 @@ mutate package.json data objects (beyond what doesn't limit its search to include/exclude `devDependencies`, or anything else. -Just follows the links in the `node_modules` heirarchy and reads the +Just follows the links in the `node_modules` hierarchy and reads the package.json files it finds therein. ## Symbolic Links diff --git a/node_modules/read-package-tree/package.json b/node_modules/read-package-tree/package.json index f9fa36224..55513a939 100644 --- a/node_modules/read-package-tree/package.json +++ b/node_modules/read-package-tree/package.json @@ -1,33 +1,33 @@ { - "_from": "read-package-tree@~5.1.5", - "_id": "read-package-tree@5.1.5", - "_integrity": "sha1-rOfmOBx2hPlwqqmPx8XStmat2rY=", + "_from": "read-package-tree@5.1.6", + "_id": "read-package-tree@5.1.6", + "_inBundle": false, + "_integrity": "sha512-FCX1aT3GWyY658wzDICef4p+n0dB+ENRct8E/Qyvppj6xVpOYerBHfUu7OP5Rt1/393Tdglguf5ju5DEX4wZNg==", "_location": "/read-package-tree", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "read-package-tree@~5.1.5", + "raw": "read-package-tree@5.1.6", "name": "read-package-tree", "escapedName": "read-package-tree", - "rawSpec": "~5.1.5", + "rawSpec": "5.1.6", "saveSpec": null, - "fetchSpec": "~5.1.5" + "fetchSpec": "5.1.6" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.5.tgz", - "_shasum": "ace7e6381c7684f970aaa98fc7c5d2b666addab6", - "_shrinkwrap": null, - "_spec": "read-package-tree@~5.1.5", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.6.tgz", + "_shasum": "4f03e83d0486856fb60d97c94882841c2a7b1b7a", + "_spec": "read-package-tree@5.1.6", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/npm/read-package-tree/issues" }, @@ -42,9 +42,10 @@ "deprecated": false, "description": "Read the contents of node_modules.", "devDependencies": { - "archy": "0", + "archy": "^1.0.0", + "mkdirp": "^0.5.1", "tacks": "^1.2.1", - "tap": "^1.2.0" + "tap": "^6.3.0" }, "directories": { "test": "test" @@ -56,8 +57,6 @@ "license": "ISC", "main": "rpt.js", "name": "read-package-tree", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/read-package-tree.git" @@ -65,5 +64,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "5.1.5" + "version": "5.1.6" } diff --git a/node_modules/read-package-tree/rpt.js b/node_modules/read-package-tree/rpt.js index 8a6a89b08..96f152012 100644 --- a/node_modules/read-package-tree/rpt.js +++ b/node_modules/read-package-tree/rpt.js @@ -37,25 +37,27 @@ rpt.Node = Node rpt.Link = Link var ID = 0 -function Node (pkg, logical, physical, er, cache) { - if (cache[physical]) return cache[physical] - +function Node (pkg, logical, physical, er, cache, fromLink) { if (!(this instanceof Node)) { return new Node(pkg, logical, physical, er, cache) } - cache[physical] = this + var node = cache[physical] || this + if (fromLink && cache[physical]) return cache[physical] - debug(this.constructor.name, dpath(physical), pkg && pkg._id) + debug(node.constructor.name, dpath(physical), pkg && pkg._id) - this.id = ID++ - this.package = pkg || {} - this.path = logical - this.realpath = physical - this.parent = null - this.isLink = false - this.children = [] - this.error = er + node.path = logical + node.realpath = physical + node.error = er + if (!cache[physical]) { + node.id = ID++ + node.package = pkg || {} + node.parent = null + node.isLink = false + node.children = [] + } + return cache[physical] = node } Node.prototype.package = null @@ -80,7 +82,7 @@ function Link (pkg, logical, physical, realpath, er, cache) { this.realpath = realpath this.package = pkg || {} this.parent = null - this.target = new Node(this.package, logical, realpath, er, cache) + this.target = new Node(this.package, logical, realpath, er, cache, true) this.isLink = true this.children = this.target.children this.error = er -- cgit v1.2.3