webext-schema 5.6.0 → 5.6.1

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/schema.js CHANGED
@@ -206,12 +206,12 @@ export class Schema {
206
206
  const { $ref, properties, type, unsupported } = item;
207
207
  if (!unsupported) {
208
208
  $ref && this._refMap.set(`${namespace}.${key}`, { $ref, namespace });
209
- if (Object.prototype.hasOwnProperty.call(item, 'value')) {
209
+ if (Object.hasOwn(item, 'value')) {
210
210
  target[key] = item.value;
211
211
  } else if (type === 'function') {
212
212
  target[key] = this._sandbox.stub();
213
213
  } else if (type === 'object' || $ref ||
214
- Object.prototype.hasOwnProperty.call(item, 'properties')) {
214
+ Object.hasOwn(item, 'properties')) {
215
215
  target[key] ??= {};
216
216
  properties && this._mockProperties(
217
217
  target[key], properties, `${namespace}.${key}`
package/package.json CHANGED
@@ -22,23 +22,23 @@
22
22
  "commander": "^14.0.0",
23
23
  "decamelize": "^6.0.0",
24
24
  "json5": "^2.2.3",
25
- "sinon": "^20.0.0"
25
+ "sinon": "^21.0.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/firefox-webext-browser": "^120.0.4",
29
- "@types/node": "^22.15.21",
29
+ "@types/node": "^24.1.0",
30
30
  "@types/sinon": "^17.0.4",
31
31
  "c8": "^10.1.3",
32
- "eslint": "^9.27.0",
33
- "eslint-plugin-jsdoc": "^50.6.17",
34
- "eslint-plugin-regexp": "^2.7.0",
35
- "eslint-plugin-unicorn": "^59.0.1",
36
- "globals": "^16.2.0",
37
- "mocha": "^11.5.0",
38
- "neostandard": "^0.12.1",
32
+ "eslint": "^9.32.0",
33
+ "eslint-plugin-jsdoc": "^52.0.2",
34
+ "eslint-plugin-regexp": "^2.9.1",
35
+ "eslint-plugin-unicorn": "^60.0.0",
36
+ "globals": "^16.3.0",
37
+ "mocha": "^11.7.1",
38
+ "neostandard": "^0.12.2",
39
39
  "npm-run-all2": "^8.0.4",
40
- "typescript": "^5.8.3",
41
- "undici": "^7.10.0"
40
+ "typescript": "^5.9.2",
41
+ "undici": "^7.13.0"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "npm run tsc && npm run lint && npm run test",
@@ -58,5 +58,5 @@
58
58
  "update:mail": "node index update --channel=mail -i",
59
59
  "update:release": "node index update --channel=release -i"
60
60
  },
61
- "version": "5.6.0"
61
+ "version": "5.6.1"
62
62
  }
@@ -4434,7 +4434,6 @@
4434
4434
  {
4435
4435
  "type": "object",
4436
4436
  "name": "queryInfo",
4437
- "optional": true,
4438
4437
  "properties": {
4439
4438
  "collapsed": {
4440
4439
  "type": "boolean",
@@ -4543,6 +4542,16 @@
4543
4542
  {
4544
4543
  "$ref": "TabGroup",
4545
4544
  "name": "group"
4545
+ },
4546
+ {
4547
+ "type": "object",
4548
+ "name": "removeInfo",
4549
+ "properties": {
4550
+ "isWindowClosing": {
4551
+ "type": "boolean",
4552
+ "description": "True when the tab group is being closed because its window is being closed."
4553
+ }
4554
+ }
4546
4555
  }
4547
4556
  ]
4548
4557
  },
@@ -5059,6 +5068,10 @@
5059
5068
  "windowId": {
5060
5069
  "type": "integer",
5061
5070
  "optional": true
5071
+ },
5072
+ "cookieStoreId": {
5073
+ "type": "string",
5074
+ "optional": true
5062
5075
  }
5063
5076
  }
5064
5077
  }
@@ -8287,6 +8300,24 @@
8287
8300
  "optional": true
8288
8301
  }
8289
8302
  ]
8303
+ },
8304
+ {
8305
+ "name": "onUserSettingsChanged",
8306
+ "type": "function",
8307
+ "description": "Fired when user-specified settings relating to an extension's action change.",
8308
+ "parameters": [
8309
+ {
8310
+ "name": "change",
8311
+ "type": "object",
8312
+ "properties": {
8313
+ "isOnToolbar": {
8314
+ "type": "boolean",
8315
+ "description": "Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user).",
8316
+ "optional": true
8317
+ }
8318
+ }
8319
+ }
8320
+ ]
8290
8321
  }
8291
8322
  ]
8292
8323
  },
@@ -8427,6 +8458,10 @@
8427
8458
  "zoomSiteSpecific": {
8428
8459
  "$ref": "types.Setting",
8429
8460
  "description": "This boolean setting controls whether zoom is applied on a per-site basis or to the current tab only. If privacy.resistFingerprinting is true, this setting has no effect and zoom is applied to the current tab only."
8461
+ },
8462
+ "verticalTabs": {
8463
+ "$ref": "types.Setting",
8464
+ "description": "This boolean setting controls whether vertical tabs are enabled."
8430
8465
  }
8431
8466
  }
8432
8467
  },
@@ -9410,6 +9445,7 @@
9410
9445
  "id": "SameSiteStatus",
9411
9446
  "type": "string",
9412
9447
  "enum": [
9448
+ "unspecified",
9413
9449
  "no_restriction",
9414
9450
  "lax",
9415
9451
  "strict"
@@ -9703,7 +9739,7 @@
9703
9739
  "$ref": "SameSiteStatus",
9704
9740
  "optional": true,
9705
9741
  "description": "The cookie's same-site status.",
9706
- "default": "no_restriction"
9742
+ "default": "unspecified"
9707
9743
  },
9708
9744
  "expirationDate": {
9709
9745
  "type": "number",
@@ -9957,7 +9993,7 @@
9957
9993
  {
9958
9994
  "id": "ResourceType",
9959
9995
  "type": "string",
9960
- "description": "How the requested resource will be used. Comparable to the webRequest.ResourceType type.",
9996
+ "description": "How the requested resource will be used. Comparable to the webRequest.ResourceType type. object_subrequest is unsupported.",
9961
9997
  "enum": [
9962
9998
  "main_frame",
9963
9999
  "sub_frame",
@@ -13019,6 +13055,28 @@
13019
13055
  "description": "Message localized for current locale."
13020
13056
  }
13021
13057
  },
13058
+ {
13059
+ "name": "getPreferredSystemLanguages",
13060
+ "type": "function",
13061
+ "async": "callback",
13062
+ "description": "Gets the preferred locales of the operating system. This is different from the locales set in the browser; to get those, use $(ref:i18n.getAcceptLanguages).",
13063
+ "parameters": [
13064
+ {
13065
+ "type": "function",
13066
+ "name": "callback",
13067
+ "parameters": [
13068
+ {
13069
+ "name": "languages",
13070
+ "type": "array",
13071
+ "items": {
13072
+ "$ref": "LanguageCode"
13073
+ },
13074
+ "description": "Array of LanguageCode"
13075
+ }
13076
+ ]
13077
+ }
13078
+ ]
13079
+ },
13022
13080
  {
13023
13081
  "name": "getUILanguage",
13024
13082
  "type": "function",
@@ -14323,12 +14381,13 @@
14323
14381
  "enum": [
14324
14382
  "authenticationInfo",
14325
14383
  "bookmarksInfo",
14326
- "browsingHistory",
14384
+ "browsingActivity",
14327
14385
  "financialAndPaymentInfo",
14328
14386
  "healthInfo",
14329
14387
  "locationInfo",
14330
14388
  "personalCommunications",
14331
14389
  "personallyIdentifyingInfo",
14390
+ "searchTerms",
14332
14391
  "websiteActivity",
14333
14392
  "websiteContent"
14334
14393
  ]
@@ -14487,6 +14546,11 @@
14487
14546
  },
14488
14547
  "optional": true,
14489
14548
  "default": []
14549
+ },
14550
+ "has_previous_consent": {
14551
+ "type": "boolean",
14552
+ "optional": true,
14553
+ "default": false
14490
14554
  }
14491
14555
  }
14492
14556
  }
@@ -20906,7 +20970,6 @@
20906
20970
  "script",
20907
20971
  "image",
20908
20972
  "object",
20909
- "object_subrequest",
20910
20973
  "xmlhttprequest",
20911
20974
  "xslt",
20912
20975
  "ping",
@@ -21333,7 +21396,6 @@
21333
21396
  "cryptomining_content",
21334
21397
  "emailtracking",
21335
21398
  "emailtracking_content",
21336
- "consentmanager",
21337
21399
  "tracking",
21338
21400
  "tracking_ad",
21339
21401
  "tracking_analytics",
@@ -21341,7 +21403,9 @@
21341
21403
  "tracking_content",
21342
21404
  "any_basic_tracking",
21343
21405
  "any_strict_tracking",
21344
- "any_social_tracking"
21406
+ "any_social_tracking",
21407
+ "consentmanager",
21408
+ "antifraud"
21345
21409
  ],
21346
21410
  "description": "Tracking flags that match our internal tracking classification"
21347
21411
  },
@@ -5068,6 +5068,10 @@
5068
5068
  "windowId": {
5069
5069
  "type": "integer",
5070
5070
  "optional": true
5071
+ },
5072
+ "cookieStoreId": {
5073
+ "type": "string",
5074
+ "optional": true
5071
5075
  }
5072
5076
  }
5073
5077
  }
@@ -8296,6 +8300,24 @@
8296
8300
  "optional": true
8297
8301
  }
8298
8302
  ]
8303
+ },
8304
+ {
8305
+ "name": "onUserSettingsChanged",
8306
+ "type": "function",
8307
+ "description": "Fired when user-specified settings relating to an extension's action change.",
8308
+ "parameters": [
8309
+ {
8310
+ "name": "change",
8311
+ "type": "object",
8312
+ "properties": {
8313
+ "isOnToolbar": {
8314
+ "type": "boolean",
8315
+ "description": "Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user).",
8316
+ "optional": true
8317
+ }
8318
+ }
8319
+ }
8320
+ ]
8299
8321
  }
8300
8322
  ]
8301
8323
  },
@@ -8436,6 +8458,10 @@
8436
8458
  "zoomSiteSpecific": {
8437
8459
  "$ref": "types.Setting",
8438
8460
  "description": "This boolean setting controls whether zoom is applied on a per-site basis or to the current tab only. If privacy.resistFingerprinting is true, this setting has no effect and zoom is applied to the current tab only."
8461
+ },
8462
+ "verticalTabs": {
8463
+ "$ref": "types.Setting",
8464
+ "description": "This boolean setting controls whether vertical tabs are enabled."
8439
8465
  }
8440
8466
  }
8441
8467
  },
@@ -13029,6 +13055,28 @@
13029
13055
  "description": "Message localized for current locale."
13030
13056
  }
13031
13057
  },
13058
+ {
13059
+ "name": "getPreferredSystemLanguages",
13060
+ "type": "function",
13061
+ "async": "callback",
13062
+ "description": "Gets the preferred locales of the operating system. This is different from the locales set in the browser; to get those, use $(ref:i18n.getAcceptLanguages).",
13063
+ "parameters": [
13064
+ {
13065
+ "type": "function",
13066
+ "name": "callback",
13067
+ "parameters": [
13068
+ {
13069
+ "name": "languages",
13070
+ "type": "array",
13071
+ "items": {
13072
+ "$ref": "LanguageCode"
13073
+ },
13074
+ "description": "Array of LanguageCode"
13075
+ }
13076
+ ]
13077
+ }
13078
+ ]
13079
+ },
13032
13080
  {
13033
13081
  "name": "getUILanguage",
13034
13082
  "type": "function",
@@ -14498,6 +14546,11 @@
14498
14546
  },
14499
14547
  "optional": true,
14500
14548
  "default": []
14549
+ },
14550
+ "has_previous_consent": {
14551
+ "type": "boolean",
14552
+ "optional": true,
14553
+ "default": false
14501
14554
  }
14502
14555
  }
14503
14556
  }
@@ -17871,6 +17924,29 @@
17871
17924
  }
17872
17925
  ]
17873
17926
  },
17927
+ {
17928
+ "name": "getKeys",
17929
+ "type": "function",
17930
+ "description": "Gets the keys of all items in storage.",
17931
+ "async": "callback",
17932
+ "parameters": [
17933
+ {
17934
+ "name": "callback",
17935
+ "type": "function",
17936
+ "description": "Callback with the keys of all items in storage, or on failure (in which case $(ref:runtime.lastError) will be set).",
17937
+ "parameters": [
17938
+ {
17939
+ "name": "keys",
17940
+ "type": "array",
17941
+ "items": {
17942
+ "type": "string"
17943
+ },
17944
+ "description": "The keys of all items in storage."
17945
+ }
17946
+ ]
17947
+ }
17948
+ ]
17949
+ },
17874
17950
  {
17875
17951
  "name": "set",
17876
17952
  "type": "function",
@@ -18044,6 +18120,29 @@
18044
18120
  }
18045
18121
  ]
18046
18122
  },
18123
+ {
18124
+ "name": "getKeys",
18125
+ "type": "function",
18126
+ "description": "Gets the keys of all items in storage.",
18127
+ "async": "callback",
18128
+ "parameters": [
18129
+ {
18130
+ "name": "callback",
18131
+ "type": "function",
18132
+ "description": "Callback with the keys of all items in storage, or on failure (in which case $(ref:runtime.lastError) will be set).",
18133
+ "parameters": [
18134
+ {
18135
+ "name": "keys",
18136
+ "type": "array",
18137
+ "items": {
18138
+ "type": "string"
18139
+ },
18140
+ "description": "The keys of all items in storage."
18141
+ }
18142
+ ]
18143
+ }
18144
+ ]
18145
+ },
18047
18146
  {
18048
18147
  "name": "set",
18049
18148
  "type": "function",
@@ -21343,7 +21442,6 @@
21343
21442
  "cryptomining_content",
21344
21443
  "emailtracking",
21345
21444
  "emailtracking_content",
21346
- "consentmanager",
21347
21445
  "tracking",
21348
21446
  "tracking_ad",
21349
21447
  "tracking_analytics",
@@ -21351,7 +21449,9 @@
21351
21449
  "tracking_content",
21352
21450
  "any_basic_tracking",
21353
21451
  "any_strict_tracking",
21354
- "any_social_tracking"
21452
+ "any_social_tracking",
21453
+ "consentmanager",
21454
+ "antifraud"
21355
21455
  ],
21356
21456
  "description": "Tracking flags that match our internal tracking classification"
21357
21457
  },