extension-port-stream 2.1.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.0.0]
|
|
10
|
+
### Changed
|
|
11
|
+
- **BREAKING**: Use portable `readable-stream@^3.6.2` instead of native streams ([#51](https://github.com/MetaMask/extension-port-stream/pull/51))
|
|
12
|
+
|
|
9
13
|
## [2.1.1]
|
|
10
14
|
### Changed
|
|
11
15
|
- deps: replace webextension-polyfill-ts with webextension-polyfill ([#43](https://github.com/MetaMask/extension-port-stream/pull/43))
|
|
@@ -35,7 +39,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
35
39
|
- **(BREAKING)** Remove `readable-stream` dependency ([#4](https://github.com/MetaMask/extension-port-stream/pull/4))
|
|
36
40
|
- Consumers using this package in browser environments will have to bring their own Node.js stream polyfill.
|
|
37
41
|
|
|
38
|
-
[Unreleased]: https://github.com/MetaMask/extension-port-stream/compare/
|
|
42
|
+
[Unreleased]: https://github.com/MetaMask/extension-port-stream/compare/v3.0.0...HEAD
|
|
43
|
+
[3.0.0]: https://github.com/MetaMask/extension-port-stream/compare/v2.1.1...v3.0.0
|
|
39
44
|
[2.1.1]: https://github.com/MetaMask/extension-port-stream/compare/v2.1.0...v2.1.1
|
|
40
45
|
[2.1.0]: https://github.com/MetaMask/extension-port-stream/compare/v2.0.1...v2.1.0
|
|
41
46
|
[2.0.1]: https://github.com/MetaMask/extension-port-stream/compare/v2.0.0...v2.0.1
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Duplex } from 'stream';
|
|
2
|
+
import { Duplex } from 'readable-stream';
|
|
3
3
|
import { Runtime } from 'webextension-polyfill';
|
|
4
4
|
declare type Log = (data: unknown, out: boolean) => void;
|
|
5
5
|
export default class PortDuplexStream extends Duplex {
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
class PortDuplexStream extends
|
|
3
|
+
const readable_stream_1 = require("readable-stream");
|
|
4
|
+
class PortDuplexStream extends readable_stream_1.Duplex {
|
|
5
5
|
/**
|
|
6
6
|
* @param port - An instance of WebExtensions Runtime.Port. See:
|
|
7
7
|
* {@link https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/Port}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,qDAAyC;AAKzC,MAAqB,gBAAiB,SAAQ,wBAAM;IAKlD;;;OAGG;IACH,YAAY,IAAkB;QAC5B,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,GAAY,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,GAAG,GAAG,EAAE,CAAC,IAAI,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QACjB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;CACF;AArFD,mCAqFC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extension-port-stream",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "A module for creating a node style stream over a WebExtension port object.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -31,12 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/MetaMask/extension-port-stream#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"readable-stream": "^3.6.2 || ^4.4.2",
|
|
34
35
|
"webextension-polyfill": ">=0.10.0 <1.0"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@metamask/eslint-config": "^4.1.0",
|
|
38
|
-
"@types/
|
|
39
|
+
"@types/readable-stream": "4.0.0",
|
|
39
40
|
"@types/node": "14.14.7",
|
|
41
|
+
"@types/webextension-polyfill": ">=0.10.0 <1.0",
|
|
40
42
|
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
|
41
43
|
"@typescript-eslint/parser": "^4.8.1",
|
|
42
44
|
"eslint": "^7.13.0",
|