are-we-there-yet
Advanced tools
Comparing version 4.0.1 to 4.0.2
'use strict' | ||
const stream = require('readable-stream') | ||
const delegate = require('delegates') | ||
const stream = require('stream') | ||
const Tracker = require('./tracker.js') | ||
@@ -12,5 +11,9 @@ | ||
this.id = this.tracker.id | ||
this.tracker.on('change', delegateChange(this)) | ||
this.tracker.on('change', this.trackerChange.bind(this)) | ||
} | ||
trackerChange (name, completion) { | ||
this.emit('change', name, completion, this) | ||
} | ||
_transform (data, encoding, cb) { | ||
@@ -26,15 +29,16 @@ this.tracker.completeWork(data.length ? data.length : 1) | ||
} | ||
} | ||
function delegateChange (trackerStream) { | ||
return function (name, completion, tracker) { | ||
trackerStream.emit('change', name, completion, trackerStream) | ||
completed () { | ||
return this.tracker.completed() | ||
} | ||
addWork (work) { | ||
return this.tracker.addWork(work) | ||
} | ||
finish () { | ||
return this.tracker.finish() | ||
} | ||
} | ||
delegate(TrackerStream.prototype, 'tracker') | ||
.method('completed') | ||
.method('addWork') | ||
.method('finish') | ||
module.exports = TrackerStream |
{ | ||
"name": "are-we-there-yet", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Keep track of the overall completion of many disparate processes", | ||
@@ -8,3 +8,3 @@ "main": "lib/index.js", | ||
"test": "tap", | ||
"lint": "eslint \"**/*.js\"", | ||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", | ||
"lintfix": "npm run lint -- --fix", | ||
@@ -29,9 +29,5 @@ "posttest": "npm run lint", | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.17.0", | ||
"@npmcli/template-oss": "4.21.3", | ||
"tap": "^16.0.1" | ||
}, | ||
"dependencies": { | ||
"delegates": "^1.0.0", | ||
"readable-stream": "^4.1.0" | ||
}, | ||
"files": [ | ||
@@ -56,5 +52,5 @@ "bin/", | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.17.0", | ||
"version": "4.21.3", | ||
"publish": true | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
177
0
13527
- Removeddelegates@^1.0.0
- Removedreadable-stream@^4.1.0
- Removedabort-controller@3.0.0(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbuffer@6.0.3(transitive)
- Removeddelegates@1.0.0(transitive)
- Removedevent-target-shim@5.0.1(transitive)
- Removedevents@3.3.0(transitive)
- Removedieee754@1.2.1(transitive)
- Removedprocess@0.11.10(transitive)
- Removedreadable-stream@4.5.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)