Use propagate-abort module instead

master
Sven Slootweg 3 years ago
parent 0a25a80d33
commit 9bed5dce40

@ -7,6 +7,7 @@ const debug = require("debug")("promistream:last-will");
const isEndOfStream = require("@promistream/is-end-of-stream"); const isEndOfStream = require("@promistream/is-end-of-stream");
const isAborted = require("@promistream/is-aborted"); const isAborted = require("@promistream/is-aborted");
const propagateAbort = require("@promistream/propagate-abort");
const { validateOptions } = require("@validatem/core"); const { validateOptions } = require("@validatem/core");
const isFunction = require("@validatem/is-function"); const isFunction = require("@validatem/is-function");
@ -79,10 +80,7 @@ module.exports = function lastWill() {
return { return {
_promistreamVersion: 0, _promistreamVersion: 0,
description: `last-will handler`, description: `last-will handler`,
abort: function abort_lastWill(source, reason) { abort: propagateAbort,
// FIXME: propagate module
return source.abort(reason);
},
peek: function peek_lastWill(source) { peek: function peek_lastWill(source) {
return Promise.try(() => { return Promise.try(() => {
return pauser.await(); return pauser.await();

@ -9,6 +9,7 @@
"@joepie91/consumable": "^1.0.1", "@joepie91/consumable": "^1.0.1",
"@promistream/is-aborted": "^0.1.0", "@promistream/is-aborted": "^0.1.0",
"@promistream/is-end-of-stream": "^0.1.0", "@promistream/is-end-of-stream": "^0.1.0",
"@promistream/propagate-abort": "^0.1.6",
"@validatem/core": "^0.3.15", "@validatem/core": "^0.3.15",
"@validatem/is-function": "^0.1.0", "@validatem/is-function": "^0.1.0",
"@validatem/require-either": "^0.1.0", "@validatem/require-either": "^0.1.0",

@ -58,6 +58,11 @@
resolved "https://registry.yarnpkg.com/@promistream/is-end-of-stream/-/is-end-of-stream-0.1.1.tgz#7f84e630c9e49a92739df6a8c574eff99dd4c09d" resolved "https://registry.yarnpkg.com/@promistream/is-end-of-stream/-/is-end-of-stream-0.1.1.tgz#7f84e630c9e49a92739df6a8c574eff99dd4c09d"
integrity sha512-GZn7W0wrUen7kkgWCcwFFgr0g/ftfuddnuK/Tp0MLWCCJA4hyAboglCZP0JzEJdi34gClEP8lCfDwGekw18LHg== integrity sha512-GZn7W0wrUen7kkgWCcwFFgr0g/ftfuddnuK/Tp0MLWCCJA4hyAboglCZP0JzEJdi34gClEP8lCfDwGekw18LHg==
"@promistream/propagate-abort@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@promistream/propagate-abort/-/propagate-abort-0.1.6.tgz#dfc3c78c2e22662b9e5d548afce2180c40584ef5"
integrity sha512-Ap4eDFiIcLb4yuJdin2tQM1+2ZJZm78sYWkKVdqECJY0UGkwNsbaMMeYyfZpFRpJGmW8mCCuOkWs0fQl5H9DGA==
"@validatem/allow-extra-properties@^0.1.0": "@validatem/allow-extra-properties@^0.1.0":
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/@validatem/allow-extra-properties/-/allow-extra-properties-0.1.0.tgz#e8c434818d6fd74b8cb237cfaa4d548295de13c1" resolved "https://registry.yarnpkg.com/@validatem/allow-extra-properties/-/allow-extra-properties-0.1.0.tgz#e8c434818d6fd74b8cb237cfaa4d548295de13c1"

Loading…
Cancel
Save