@mattiasbuelens/web-streams-adapter
Advanced tools
Comparing version 0.1.0-alpha.3 to 0.1.0-alpha.4
@@ -1,5 +0,1 @@ | ||
// FILE GENERATED BY `rollup-plugin-dts@0.12.0` | ||
// https://github.com/Swatinem/rollup-plugin-dts | ||
interface ReadableStreamLikeConstructor { | ||
@@ -51,2 +47,2 @@ new <R extends ArrayBufferView = ArrayBufferView>(underlyingSource: UnderlyingByteSource, strategy?: { | ||
export { createReadableStreamWrapper, createWrappingReadableSource, createWritableStreamWrapper, createWrappingWritableSink, createTransformStreamWrapper, createWrappingTransformer, ReadableStreamLikeConstructor, ReadableStreamLike, ReadableByteStreamLike, WritableStreamLikeConstructor, WritableStreamLike, TransformStreamLikeConstructor, TransformStreamLike, WrappingReadableSourceOptions, ReadableStreamWrapper, TransformStreamWrapper, WritableStreamWrapper }; | ||
export { ReadableByteStreamLike, ReadableStreamLike, ReadableStreamLikeConstructor, ReadableStreamWrapper, TransformStreamLike, TransformStreamLikeConstructor, TransformStreamWrapper, WrappingReadableSourceOptions, WritableStreamLike, WritableStreamLikeConstructor, WritableStreamWrapper, createReadableStreamWrapper, createTransformStreamWrapper, createWrappingReadableSource, createWrappingTransformer, createWrappingWritableSink, createWritableStreamWrapper }; |
@@ -5,3 +5,3 @@ (function (global, factory) { | ||
(global = global || self, factory(global.WebStreamsAdapter = {})); | ||
}(this, function (exports) { 'use strict'; | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -248,10 +248,9 @@ /*! ***************************************************************************** | ||
var read = this._underlyingReader.read() | ||
.then(function (_a) { | ||
var value = _a.value, done = _a.done; | ||
.then(function (result) { | ||
var controller = _this._readableStreamController; | ||
if (done) { | ||
if (result.done) { | ||
_this._tryClose(); | ||
} | ||
else { | ||
controller.enqueue(value); | ||
controller.enqueue(result.value); | ||
} | ||
@@ -351,6 +350,5 @@ }); | ||
var read = this._underlyingReader.read(buffer) | ||
.then(function (_a) { | ||
var value = _a.value, done = _a.done; | ||
.then(function (result) { | ||
var controller = _this._readableStreamController; | ||
if (done) { | ||
if (result.done) { | ||
_this._tryClose(); | ||
@@ -360,4 +358,4 @@ byobRequest.respond(0); | ||
else { | ||
copyArrayBufferView(value, byobRequest.view); | ||
byobRequest.respond(value.byteLength); | ||
copyArrayBufferView(result.value, byobRequest.view); | ||
byobRequest.respond(result.value.byteLength); | ||
} | ||
@@ -514,8 +512,7 @@ }); | ||
this._transformStreamController = undefined; | ||
this._onRead = function (_a) { | ||
var done = _a.done, value = _a.value; | ||
if (done) { | ||
this._onRead = function (result) { | ||
if (result.done) { | ||
return; | ||
} | ||
_this._transformStreamController.enqueue(value); | ||
_this._transformStreamController.enqueue(result.value); | ||
return _this._reader.read().then(_this._onRead); | ||
@@ -565,11 +562,11 @@ }; | ||
exports.createReadableStreamWrapper = createReadableStreamWrapper; | ||
exports.createTransformStreamWrapper = createTransformStreamWrapper; | ||
exports.createWrappingReadableSource = createWrappingReadableSource; | ||
exports.createWrappingTransformer = createWrappingTransformer; | ||
exports.createWrappingWritableSink = createWrappingWritableSink; | ||
exports.createWritableStreamWrapper = createWritableStreamWrapper; | ||
exports.createWrappingWritableSink = createWrappingWritableSink; | ||
exports.createTransformStreamWrapper = createTransformStreamWrapper; | ||
exports.createWrappingTransformer = createWrappingTransformer; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
})); | ||
}))); | ||
//# sourceMappingURL=web-streams-adapter.js.map |
{ | ||
"name": "@mattiasbuelens/web-streams-adapter", | ||
"version": "0.1.0-alpha.3", | ||
"version": "0.1.0-alpha.4", | ||
"description": "Adapters for converting between different implementations of WHATWG Streams", | ||
@@ -13,3 +13,2 @@ "main": "dist/web-streams-adapter", | ||
"build": "rollup -c", | ||
"prebuild": "tsc --noEmit -p ./src/tsconfig.json", | ||
"test": "cd test && node -r ts-node/register --expose_gc run-web-platform-tests.ts" | ||
@@ -28,13 +27,16 @@ }, | ||
"devDependencies": { | ||
"@types/micromatch": "^3.1.0", | ||
"@types/node": "^10.12.30", | ||
"micromatch": "^3.1.10", | ||
"rollup": "^1.6.0", | ||
"rollup-plugin-dts": "^0.12.0", | ||
"ts-node": "^8.0.3", | ||
"tslib": "^1.9.3", | ||
"typescript": "^3.3.3", | ||
"web-streams-polyfill": "^2.0.0", | ||
"wpt-runner": "^2.7.1" | ||
"@rollup/plugin-typescript": "^4.1.1", | ||
"@types/micromatch": "^4.0.1", | ||
"@types/node": "^10.17.21", | ||
"@types/resolve": "^1.14.0", | ||
"micromatch": "^4.0.2", | ||
"resolve": "^1.17.0", | ||
"rollup": "^2.7.2", | ||
"rollup-plugin-dts": "^1.4.0", | ||
"ts-node": "^8.9.0", | ||
"tslib": "^1.11.1", | ||
"typescript": "^3.8.3", | ||
"web-streams-polyfill": "^2.1.1", | ||
"wpt-runner": "^2.8.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
139872
13
1135