webext-schema 3.0.3 → 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/modules/browser.js +6 -3
- package/modules/update.js +1 -1
- package/package.json +4 -4
- package/schemas/esr/webext.json +809 -320
package/modules/browser.js
CHANGED
|
@@ -346,8 +346,9 @@ export const createNotification = async (id, opt) => {
|
|
|
346
346
|
let func;
|
|
347
347
|
if (isGranted) {
|
|
348
348
|
const { notifications } = browser;
|
|
349
|
-
!notifications.onClosed.hasListener(clearNotification)
|
|
349
|
+
if (!notifications.onClosed.hasListener(clearNotification)) {
|
|
350
350
|
notifications.onClosed.addListener(clearNotification);
|
|
351
|
+
}
|
|
351
352
|
func = notifications.create(id, opt);
|
|
352
353
|
}
|
|
353
354
|
return func || null;
|
|
@@ -981,7 +982,9 @@ export const warmupTab = async tabId => {
|
|
|
981
982
|
if (!Number.isInteger(tabId)) {
|
|
982
983
|
throw new TypeError(`Expected Number but got ${getType(tabId)}.`);
|
|
983
984
|
}
|
|
984
|
-
typeof tabs.warmup === 'function'
|
|
985
|
+
if (typeof tabs.warmup === 'function') {
|
|
986
|
+
await tabs.warmup(tabId);
|
|
987
|
+
}
|
|
985
988
|
};
|
|
986
989
|
|
|
987
990
|
/**
|
|
@@ -1083,7 +1086,7 @@ export const getWindow = async (windowId, opt) => {
|
|
|
1083
1086
|
export const checkIncognitoWindowExists = async () => {
|
|
1084
1087
|
const arr = await getAllNormalWindows();
|
|
1085
1088
|
let bool;
|
|
1086
|
-
if (arr
|
|
1089
|
+
if (arr?.length) {
|
|
1087
1090
|
for (const win of arr) {
|
|
1088
1091
|
bool = win.incognito;
|
|
1089
1092
|
if (bool) {
|
package/modules/update.js
CHANGED
package/package.json
CHANGED
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
"commander": "^9.3.0",
|
|
33
33
|
"decamelize": "^6.0.0",
|
|
34
34
|
"json5": "^2.2.1",
|
|
35
|
-
"node-fetch": "^3.2.
|
|
35
|
+
"node-fetch": "^3.2.5",
|
|
36
36
|
"sinon": "^14.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"c8": "^7.11.3",
|
|
40
40
|
"chai": "^4.3.6",
|
|
41
|
-
"eslint": "^8.
|
|
41
|
+
"eslint": "^8.17.0",
|
|
42
42
|
"eslint-config-standard": "^17.0.0",
|
|
43
43
|
"eslint-plugin-import": "^2.26.0",
|
|
44
44
|
"eslint-plugin-jsdoc": "^39.3.2",
|
|
45
45
|
"eslint-plugin-node": "^11.1.0",
|
|
46
46
|
"eslint-plugin-promise": "^6.0.0",
|
|
47
47
|
"mocha": "^10.0.0",
|
|
48
|
-
"nock": "^13.2.
|
|
48
|
+
"nock": "^13.2.6",
|
|
49
49
|
"npm-run-all": "^4.1.5"
|
|
50
50
|
},
|
|
51
|
-
"version": "
|
|
51
|
+
"version": "4.0.0"
|
|
52
52
|
}
|