diff options
author | Gar <gar+gh@danger.computer> | 2021-09-01 20:39:33 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-09-01 20:39:33 +0300 |
commit | 6125db545315da0217fe7b05062fd0a504c9a45b (patch) | |
tree | 5c9005ea8d873c63acbb9270914f2ed84761fcc8 /node_modules/are-we-there-yet | |
parent | e91578d10b1d5d930fec32e7070d975af4892140 (diff) |
deps: are-we-there-yet@1.1.6
Diffstat (limited to 'node_modules/are-we-there-yet')
-rw-r--r-- | node_modules/are-we-there-yet/CHANGES.md | 37 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/LICENSE | 5 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/LICENSE.md | 18 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/lib/index.js (renamed from node_modules/are-we-there-yet/index.js) | 0 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/lib/tracker-base.js (renamed from node_modules/are-we-there-yet/tracker-base.js) | 0 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/lib/tracker-group.js (renamed from node_modules/are-we-there-yet/tracker-group.js) | 19 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/lib/tracker-stream.js (renamed from node_modules/are-we-there-yet/tracker-stream.js) | 0 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/lib/tracker.js (renamed from node_modules/are-we-there-yet/tracker.js) | 4 | ||||
-rw-r--r-- | node_modules/are-we-there-yet/package.json | 52 |
9 files changed, 70 insertions, 65 deletions
diff --git a/node_modules/are-we-there-yet/CHANGES.md b/node_modules/are-we-there-yet/CHANGES.md deleted file mode 100644 index 21f3b1c12..000000000 --- a/node_modules/are-we-there-yet/CHANGES.md +++ /dev/null @@ -1,37 +0,0 @@ -Hi, figured we could actually use a changelog now: - -## 1.1.5 2018-05-24 - -* [#92](https://github.com/iarna/are-we-there-yet/pull/92) Fix bug where - `finish` would throw errors when including `TrackerStream` objects in - `TrackerGroup` collections. (@brianloveswords) - -## 1.1.4 2017-04-21 - -* Fix typo in package.json - -## 1.1.3 2017-04-21 - -* Improve documentation and limit files included in the distribution. - -## 1.1.2 2016-03-15 - -* Add tracker group cycle detection and tests for it - -## 1.1.1 2016-01-29 - -* Fix a typo in stream completion tracker - -## 1.1.0 2016-01-29 - -* Rewrote completion percent computation to be low impact– no more walking a - tree of completion groups every time we need this info. Previously, with - medium sized tree of completion groups, even a relatively modest number of - calls to the top level `completed()` method would result in absurd numbers - of calls overall as it walked down the tree. We now, instead, keep track as - we bubble up changes, so the computation is limited to when data changes and - to the depth of that one branch, instead of _every_ node. (Plus, we were already - incurring _this_ cost, since we already bubbled out changes.) -* Moved different tracker types out to their own files. -* Made tests test for TOO MANY events too. -* Standarized the source code formatting diff --git a/node_modules/are-we-there-yet/LICENSE b/node_modules/are-we-there-yet/LICENSE deleted file mode 100644 index af4588069..000000000 --- a/node_modules/are-we-there-yet/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/are-we-there-yet/LICENSE.md b/node_modules/are-we-there-yet/LICENSE.md new file mode 100644 index 000000000..845be76f6 --- /dev/null +++ b/node_modules/are-we-there-yet/LICENSE.md @@ -0,0 +1,18 @@ +ISC License + +Copyright npm, Inc. + +Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby +granted, provided that the above copyright notice and this +permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/are-we-there-yet/index.js b/node_modules/are-we-there-yet/lib/index.js index 57d8743fd..57d8743fd 100644 --- a/node_modules/are-we-there-yet/index.js +++ b/node_modules/are-we-there-yet/lib/index.js diff --git a/node_modules/are-we-there-yet/tracker-base.js b/node_modules/are-we-there-yet/lib/tracker-base.js index 6f4368755..6f4368755 100644 --- a/node_modules/are-we-there-yet/tracker-base.js +++ b/node_modules/are-we-there-yet/lib/tracker-base.js diff --git a/node_modules/are-we-there-yet/tracker-group.js b/node_modules/are-we-there-yet/lib/tracker-group.js index 9759e1226..9da13f8a7 100644 --- a/node_modules/are-we-there-yet/tracker-group.js +++ b/node_modules/are-we-there-yet/lib/tracker-group.js @@ -19,7 +19,9 @@ util.inherits(TrackerGroup, TrackerBase) function bubbleChange (trackerGroup) { return function (name, completed, tracker) { trackerGroup.completion[tracker.id] = completed - if (trackerGroup.finished) return + if (trackerGroup.finished) { + return + } trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup) } } @@ -53,17 +55,22 @@ TrackerGroup.prototype.addUnit = function (unit, weight) { this.trackers.push(unit) this.completion[unit.id] = unit.completed() unit.on('change', this.bubbleChange) - if (!this.finished) this.emit('change', unit.name, this.completion[unit.id], unit) + if (!this.finished) { + this.emit('change', unit.name, this.completion[unit.id], unit) + } return unit } TrackerGroup.prototype.completed = function () { - if (this.trackers.length === 0) return 0 + if (this.trackers.length === 0) { + return 0 + } var valPerWeight = 1 / this.totalWeight var completed = 0 for (var ii = 0; ii < this.trackers.length; ii++) { var trackerId = this.trackers[ii].id - completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId] + completed += + valPerWeight * this.weight[trackerId] * this.completion[trackerId] } return completed } @@ -82,7 +89,9 @@ TrackerGroup.prototype.newStream = function (name, todo, weight) { TrackerGroup.prototype.finish = function () { this.finished = true - if (!this.trackers.length) this.addUnit(new Tracker(), 1, true) + if (!this.trackers.length) { + this.addUnit(new Tracker(), 1, true) + } for (var ii = 0; ii < this.trackers.length; ii++) { var tracker = this.trackers[ii] tracker.finish() diff --git a/node_modules/are-we-there-yet/tracker-stream.js b/node_modules/are-we-there-yet/lib/tracker-stream.js index e1cf85055..e1cf85055 100644 --- a/node_modules/are-we-there-yet/tracker-stream.js +++ b/node_modules/are-we-there-yet/lib/tracker-stream.js diff --git a/node_modules/are-we-there-yet/tracker.js b/node_modules/are-we-there-yet/lib/tracker.js index 68c2339b4..a8f8b3ba0 100644 --- a/node_modules/are-we-there-yet/tracker.js +++ b/node_modules/are-we-there-yet/lib/tracker.js @@ -20,7 +20,9 @@ Tracker.prototype.addWork = function (work) { Tracker.prototype.completeWork = function (work) { this.workDone += work - if (this.workDone > this.workTodo) this.workDone = this.workTodo + if (this.workDone > this.workTodo) { + this.workDone = this.workTodo + } this.emit('change', this.name, this.completed(), this) } diff --git a/node_modules/are-we-there-yet/package.json b/node_modules/are-we-there-yet/package.json index c5990c9bd..d3901a86d 100644 --- a/node_modules/are-we-there-yet/package.json +++ b/node_modules/are-we-there-yet/package.json @@ -1,35 +1,53 @@ { "name": "are-we-there-yet", - "version": "1.1.5", + "version": "1.1.6", "description": "Keep track of the overall completion of many disparate processes", - "main": "index.js", + "main": "lib/index.js", "scripts": { - "test": "standard && tap test/*.js" + "test": "tap", + "npmclilint": "npmcli-lint", + "lint": "eslint '**/*.js'", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint", + "postsnap": "npm run lintfix --", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "snap": "tap" }, "repository": { "type": "git", - "url": "https://github.com/iarna/are-we-there-yet.git" + "url": "https://github.com/npm/are-we-there-yet.git" }, - "author": "Rebecca Turner (http://re-becca.org)", + "author": "GitHub Inc.", "license": "ISC", "bugs": { - "url": "https://github.com/iarna/are-we-there-yet/issues" + "url": "https://github.com/npm/are-we-there-yet/issues" }, - "homepage": "https://github.com/iarna/are-we-there-yet", + "homepage": "https://github.com/npm/are-we-there-yet", "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" + "@npmcli/eslint-config": "^1.0.0", + "@npmcli/template-oss": "^1.0.2", + "eslint": "^7.32.0", + "eslint-plugin-node": "^11.1.0", + "tap": "^15.0.9" }, "dependencies": { "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "readable-stream": "^3.6.0" }, "files": [ - "index.js", - "tracker-base.js", - "tracker-group.js", - "tracker-stream.js", - "tracker.js", - "CHANGES.md" - ] + "bin", + "lib" + ], + "engines": { + "node": ">=10" + }, + "tap": { + "branches": 68, + "statements": 92, + "functions": 86, + "lines": 92 + }, + "templateVersion": "1.0.2" } |