webext-messenger 0.17.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- package/distribution/receiver.js +0 -1
- package/distribution/sender.js +0 -1
- package/distribution/shared.js +1 -2
- package/package.json +35 -30
package/distribution/receiver.js
CHANGED
package/distribution/sender.js
CHANGED
package/distribution/shared.js
CHANGED
@@ -30,9 +30,8 @@ export const handlers = new Map();
|
|
30
30
|
export const debug = logging ? console.debug.bind(console, "Messenger:") : noop;
|
31
31
|
export const warn = logging ? console.warn.bind(console, "Messenger:") : noop;
|
32
32
|
export function isErrorObject(error) {
|
33
|
-
var _a;
|
34
33
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a type guard function and it uses ?.
|
35
|
-
return typeof (
|
34
|
+
return typeof (error === null || error === void 0 ? void 0 : error.message) === "string";
|
36
35
|
}
|
37
36
|
export async function delay(milliseconds) {
|
38
37
|
return new Promise((resolve) => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webext-messenger",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.18.1",
|
4
4
|
"description": "Browser Extension component messaging framework",
|
5
5
|
"keywords": [],
|
6
6
|
"repository": "pixiebrix/webext-messenger",
|
@@ -8,14 +8,6 @@
|
|
8
8
|
"author": "Federico Brigante for PixieBrix <federico@pixiebrix.com> (https://www.pixiebrix.com)",
|
9
9
|
"type": "module",
|
10
10
|
"main": "distribution/index.js",
|
11
|
-
"alias": {
|
12
|
-
"./this-stuff-is-just-for-local-parcel-tests": "./package.json",
|
13
|
-
"./source/sender.js": "./source/sender.ts",
|
14
|
-
"./source/receiver.js": "./source/receiver.ts",
|
15
|
-
"./source/types.js": "./source/types.ts",
|
16
|
-
"./source/shared.js": "./source/shared.ts",
|
17
|
-
"./source/thisTarget.js": "./source/thisTarget.ts"
|
18
|
-
},
|
19
11
|
"scripts": {
|
20
12
|
"build": "tsc",
|
21
13
|
"demo:watch": "WEBEXT_MESSENGER_LOGGING=true parcel watch --no-cache --no-hmr",
|
@@ -89,8 +81,8 @@
|
|
89
81
|
"*.test.ts"
|
90
82
|
],
|
91
83
|
"rules": {
|
92
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
93
84
|
"@typescript-eslint/no-explicit-any": "off",
|
85
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
94
86
|
"@typescript-eslint/no-unsafe-member-access": "off"
|
95
87
|
}
|
96
88
|
},
|
@@ -105,31 +97,44 @@
|
|
105
97
|
]
|
106
98
|
},
|
107
99
|
"dependencies": {
|
108
|
-
"p-retry": "^5.
|
109
|
-
"serialize-error": "^
|
110
|
-
"type-fest": "^2.
|
111
|
-
"webext-detect-page": "^4.0.
|
112
|
-
"webextension-polyfill": "^0.8.0"
|
100
|
+
"p-retry": "^5.1.0",
|
101
|
+
"serialize-error": "^10.0.0",
|
102
|
+
"type-fest": "^2.12.1",
|
103
|
+
"webext-detect-page": "^4.0.1"
|
113
104
|
},
|
114
105
|
"devDependencies": {
|
115
|
-
"@parcel/config-webextension": "^2.0
|
106
|
+
"@parcel/config-webextension": "^2.4.0",
|
116
107
|
"@sindresorhus/tsconfig": "^2.0.0",
|
117
|
-
"@types/chrome": "^0.0.
|
108
|
+
"@types/chrome": "^0.0.180",
|
118
109
|
"@types/tape": "^4.13.2",
|
119
|
-
"@types/webextension-polyfill": "^0.8.
|
120
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
121
|
-
"@typescript-eslint/parser": "^5.
|
122
|
-
"
|
123
|
-
"eslint
|
124
|
-
"eslint-config-
|
125
|
-
"eslint-config-xo
|
126
|
-
"eslint-
|
127
|
-
"eslint-plugin-
|
110
|
+
"@types/webextension-polyfill": "^0.8.3",
|
111
|
+
"@typescript-eslint/eslint-plugin": "^5.17.0",
|
112
|
+
"@typescript-eslint/parser": "^5.17.0",
|
113
|
+
"buffer": "^6.0.3",
|
114
|
+
"eslint": "^8.12.0",
|
115
|
+
"eslint-config-prettier": "^8.5.0",
|
116
|
+
"eslint-config-xo": "^0.40.0",
|
117
|
+
"eslint-config-xo-typescript": "^0.50.0",
|
118
|
+
"eslint-plugin-import": "^2.25.4",
|
119
|
+
"eslint-plugin-unicorn": "^41.0.1",
|
120
|
+
"events": "^3.3.0",
|
128
121
|
"npm-run-all": "^4.1.5",
|
129
|
-
"parcel": "^2.0
|
130
|
-
"
|
131
|
-
"
|
132
|
-
"
|
122
|
+
"parcel": "^2.4.0",
|
123
|
+
"path-browserify": "^1.0.1",
|
124
|
+
"process": "^0.11.10",
|
125
|
+
"stream-browserify": "^3.0.0",
|
126
|
+
"tape": "^5.5.2",
|
127
|
+
"typescript": "^4.6.3",
|
128
|
+
"webext-content-scripts": "^1.0.1",
|
129
|
+
"webextension-polyfill": "^0.9.0"
|
130
|
+
},
|
131
|
+
"alias": {
|
132
|
+
"./this-stuff-is-just-for-local-parcel-tests": "./package.json",
|
133
|
+
"./source/sender.js": "./source/sender.ts",
|
134
|
+
"./source/receiver.js": "./source/receiver.ts",
|
135
|
+
"./source/types.js": "./source/types.ts",
|
136
|
+
"./source/shared.js": "./source/shared.ts",
|
137
|
+
"./source/thisTarget.js": "./source/thisTarget.ts"
|
133
138
|
},
|
134
139
|
"targets": {
|
135
140
|
"main": false,
|