extension-port-stream 2.1.1 → 4.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 +12 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [4.0.0]
|
|
10
|
+
### Fixed
|
|
11
|
+
- **BREAKING**: `webextension-polyfill` is now a peer-dependency rather than a dependency. Users are expected to provide the runtime. ([#54](https://github.com/MetaMask/extension-port-stream/pull/54))
|
|
12
|
+
- `webextension-polyfill` import changed to type-only import ([#54](https://github.com/MetaMask/extension-port-stream/pull/54))
|
|
13
|
+
|
|
14
|
+
## [3.0.0]
|
|
15
|
+
### Changed
|
|
16
|
+
- **BREAKING**: Use portable `readable-stream@^3.6.2` instead of native streams ([#51](https://github.com/MetaMask/extension-port-stream/pull/51))
|
|
17
|
+
|
|
9
18
|
## [2.1.1]
|
|
10
19
|
### Changed
|
|
11
20
|
- deps: replace webextension-polyfill-ts with webextension-polyfill ([#43](https://github.com/MetaMask/extension-port-stream/pull/43))
|
|
@@ -35,7 +44,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
35
44
|
- **(BREAKING)** Remove `readable-stream` dependency ([#4](https://github.com/MetaMask/extension-port-stream/pull/4))
|
|
36
45
|
- Consumers using this package in browser environments will have to bring their own Node.js stream polyfill.
|
|
37
46
|
|
|
38
|
-
[Unreleased]: https://github.com/MetaMask/extension-port-stream/compare/
|
|
47
|
+
[Unreleased]: https://github.com/MetaMask/extension-port-stream/compare/v4.0.0...HEAD
|
|
48
|
+
[4.0.0]: https://github.com/MetaMask/extension-port-stream/compare/v3.0.0...v4.0.0
|
|
49
|
+
[3.0.0]: https://github.com/MetaMask/extension-port-stream/compare/v2.1.1...v3.0.0
|
|
39
50
|
[2.1.1]: https://github.com/MetaMask/extension-port-stream/compare/v2.1.0...v2.1.1
|
|
40
51
|
[2.1.0]: https://github.com/MetaMask/extension-port-stream/compare/v2.0.1...v2.1.0
|
|
41
52
|
[2.0.1]: https://github.com/MetaMask/extension-port-stream/compare/v2.0.0...v2.0.1
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Duplex } from 'stream';
|
|
3
|
-
import { Runtime } from 'webextension-polyfill';
|
|
2
|
+
import { Duplex } from 'readable-stream';
|
|
3
|
+
import type { Runtime } from 'webextension-polyfill';
|
|
4
4
|
declare type Log = (data: unknown, out: boolean) => void;
|
|
5
5
|
export default class PortDuplexStream extends Duplex {
|
|
6
6
|
private _port;
|
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,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C,WAAW,CAAC,IAAI,CAAC,CAAC;aAC9B;iBAAM;gBACL,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;gBACrB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;aAC7B;SACF;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,EAAE,CAAC,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,CAAC;SACzD;QACD,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,UAAU,CAAC,GAAQ;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": "4.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,18 +31,23 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/MetaMask/extension-port-stream#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"
|
|
34
|
+
"readable-stream": "^3.6.2 || ^4.4.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@metamask/eslint-config": "^4.1.0",
|
|
38
|
-
"@types/
|
|
38
|
+
"@types/readable-stream": "4.0.0",
|
|
39
39
|
"@types/node": "14.14.7",
|
|
40
|
+
"@types/webextension-polyfill": ">=0.10.0 <1.0",
|
|
40
41
|
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
|
41
42
|
"@typescript-eslint/parser": "^4.8.1",
|
|
42
43
|
"eslint": "^7.13.0",
|
|
43
44
|
"eslint-plugin-import": "^2.22.1",
|
|
44
45
|
"eslint-plugin-json": "^2.1.2",
|
|
45
46
|
"eslint-plugin-node": "^11.1.0",
|
|
46
|
-
"typescript": "^4.0.5"
|
|
47
|
+
"typescript": "^4.0.5",
|
|
48
|
+
"webextension-polyfill": ">=0.10.0 <1.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
|
|
47
52
|
}
|
|
48
53
|
}
|