webext-schema 4.1.0 → 4.1.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.
@@ -484,7 +484,7 @@ export const sendMessage = async (id, msg, opt) => {
484
484
  } else if (id && isString(id)) {
485
485
  func = runtime.sendMessage(id, msg, opt);
486
486
  } else {
487
- func = runtime.sendMessage(runtime.id, msg, opt);
487
+ func = runtime.sendMessage(msg, opt);
488
488
  }
489
489
  }
490
490
  return func || null;
package/package.json CHANGED
@@ -14,18 +14,18 @@
14
14
  "scripts": {
15
15
  "lint": "eslint --fix .",
16
16
  "start": "node index",
17
- "test": "npm run test:central",
18
- "test:beta": "c8 mocha --require=test/mocha/setup.js --channel=beta --exit test/*.test.js",
19
- "test:central": "c8 mocha --require=test/mocha/setup.js --channel=central --exit test/*.test.js",
20
- "test:esr": "c8 mocha --require=test/mocha/setup.js --channel=esr --exit test/*.test.js",
21
- "test:release": "c8 mocha --require=test/mocha/setup.js --channel=release --exit test/*.test.js",
22
- "test_all": "npm-run-all -s test:*",
17
+ "test": "npm run test-central",
18
+ "test-beta": "c8 mocha --require=test/mocha/setup.js --channel=beta --exit test/*.test.js",
19
+ "test-central": "c8 mocha --require=test/mocha/setup.js --channel=central --exit test/*.test.js",
20
+ "test-esr": "c8 mocha --require=test/mocha/setup.js --channel=esr --exit test/*.test.js",
21
+ "test-release": "c8 mocha --require=test/mocha/setup.js --channel=release --exit test/*.test.js",
22
+ "test_all": "npm-run-all -s test-*",
23
23
  "update": "node index update -i",
24
- "update:beta": "node index update --channel=beta -i",
25
- "update:central": "node index update --channel=central -i",
26
- "update:esr": "node index update --channel=esr -i",
27
- "update:mail": "node index update --channel=mail -i",
28
- "update:release": "node index update --channel=release -i"
24
+ "update-beta": "node index update --channel=beta -i",
25
+ "update-central": "node index update --channel=central -i",
26
+ "update-esr": "node index update --channel=esr -i",
27
+ "update-mail": "node index update --channel=mail -i",
28
+ "update-release": "node index update --channel=release -i"
29
29
  },
30
30
  "dependencies": {
31
31
  "camelize": "^1.0.0",
@@ -38,15 +38,15 @@
38
38
  "devDependencies": {
39
39
  "c8": "^7.11.3",
40
40
  "chai": "^4.3.6",
41
- "eslint": "^8.17.0",
41
+ "eslint": "^8.18.0",
42
42
  "eslint-config-standard": "^17.0.0",
43
43
  "eslint-plugin-import": "^2.26.0",
44
- "eslint-plugin-jsdoc": "^39.3.2",
44
+ "eslint-plugin-jsdoc": "^39.3.3",
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.6",
48
+ "nock": "^13.2.7",
49
49
  "npm-run-all": "^4.1.5"
50
50
  },
51
- "version": "4.1.0"
51
+ "version": "4.1.1"
52
52
  }
@@ -3402,7 +3402,7 @@
3402
3402
  {
3403
3403
  "id": "ContactProperties",
3404
3404
  "type": "object",
3405
- "description": "A set of properties for a particular contact. For a complete list of properties that Thunderbird uses, see https://hg.mozilla.org/comm-central/file/tip/mailnews/addrbook/public/nsIAbCard.idl\nIt is also possible to store custom properties. The custom property name however may only use a to z, A to Z, 1 to 9 and underscores.",
3405
+ "description": "A set of individual properties for a particular contact and/or its vCard string in the <code>vCard</code> member. The individual properties may either be `legacy properties <https://searchfox.org/comm-central/rev/8a1ae67088acf237dab2fd704db18589e7bf119e/mailnews/addrbook/modules/VCardUtils.jsm#295-334>`__ or custom properties (name may use a to z, A to Z, 1 to 9 and underscores).\n**Note:** Using individual properties is deprecated, get/set the <code>vCard</code> member instead.",
3406
3406
  "patternProperties": {
3407
3407
  "^\\w+$": {
3408
3408
  "choices": [
@@ -3579,12 +3579,13 @@
3579
3579
  {
3580
3580
  "name": "id",
3581
3581
  "type": "string",
3582
- "description": "Assigns the contact an id. If an existing contact has this id, an exception is thrown.",
3582
+ "description": "Assigns the contact an id. If an existing contact has this id, an exception is thrown. **Note:** Deprecated, the card's id should be specified in the vCard string instead.",
3583
3583
  "optional": true
3584
3584
  },
3585
3585
  {
3586
3586
  "name": "properties",
3587
- "$ref": "ContactProperties"
3587
+ "$ref": "ContactProperties",
3588
+ "description": "The properties object for the new contact. If it includes a <code>vCard</code> member, all specified `legacy properties <https://searchfox.org/comm-central/rev/8a1ae67088acf237dab2fd704db18589e7bf119e/mailnews/addrbook/modules/VCardUtils.jsm#295-334>`__ are ignored and the new contact will be based on the provided vCard string. If a UID is specified in the vCard string, which is already used by another contact, an exception is thrown. **Note:** Using individual properties is deprecated, use the <code>vCard</code> member instead."
3588
3589
  },
3589
3590
  {
3590
3591
  "type": "function",
@@ -3611,10 +3612,11 @@
3611
3612
  },
3612
3613
  {
3613
3614
  "name": "properties",
3614
- "$ref": "ContactProperties"
3615
+ "$ref": "ContactProperties",
3616
+ "description": "An object with properties to update the specified contact. Individual properties are removed, if they are set to <code>null</code>. If the provided object includes a <code>vCard</code> member, all specified `legacy properties <https://searchfox.org/comm-central/rev/8a1ae67088acf237dab2fd704db18589e7bf119e/mailnews/addrbook/modules/VCardUtils.jsm#295-334>`__ are ignored and the details of the contact will be replaced by the provided vCard. Changes to the UID will be ignored. **Note:** Using individual properties is deprecated, use the <code>vCard</code> member instead. "
3615
3617
  }
3616
3618
  ],
3617
- "description": "Edits the properties of a contact. To remove a property, specify it as <code>null</code>."
3619
+ "description": "Updates a contact."
3618
3620
  },
3619
3621
  {
3620
3622
  "name": "delete",
@@ -3066,7 +3066,7 @@
3066
3066
  "namespace": "manifest",
3067
3067
  "types": [
3068
3068
  {
3069
- "$extend": "PermissionNoPrompt",
3069
+ "$extend": "PermissionPrivileged",
3070
3070
  "choices": [
3071
3071
  {
3072
3072
  "type": "string",
@@ -6430,7 +6430,7 @@
6430
6430
  "namespace": "manifest",
6431
6431
  "types": [
6432
6432
  {
6433
- "$extend": "PermissionNoPrompt",
6433
+ "$extend": "PermissionPrivileged",
6434
6434
  "choices": [
6435
6435
  {
6436
6436
  "type": "string",
@@ -7275,7 +7275,7 @@
7275
7275
  "namespace": "manifest",
7276
7276
  "types": [
7277
7277
  {
7278
- "$extend": "PermissionNoPrompt",
7278
+ "$extend": "PermissionPrivileged",
7279
7279
  "choices": [
7280
7280
  {
7281
7281
  "type": "string",
@@ -10910,7 +10910,8 @@
10910
10910
  "additionalProperties": {
10911
10911
  "$ref": "experiments.ExperimentAPI"
10912
10912
  },
10913
- "optional": true
10913
+ "optional": true,
10914
+ "privileged": true
10914
10915
  }
10915
10916
  }
10916
10917
  }
@@ -11761,7 +11762,8 @@
11761
11762
  "items": {
11762
11763
  "type": "string"
11763
11764
  },
11764
- "optional": true
11765
+ "optional": true,
11766
+ "privileged": true
11765
11767
  }
11766
11768
  }
11767
11769
  }
@@ -13089,17 +13091,30 @@
13089
13091
  }
13090
13092
  ]
13091
13093
  },
13094
+ {
13095
+ "id": "PermissionPrivileged",
13096
+ "choices": [
13097
+ {
13098
+ "type": "string",
13099
+ "enum": [
13100
+ "mozillaAddons"
13101
+ ]
13102
+ }
13103
+ ]
13104
+ },
13092
13105
  {
13093
13106
  "id": "PermissionNoPrompt",
13094
13107
  "choices": [
13095
13108
  {
13096
- "$ref": "OptionalPermission"
13109
+ "$ref": "OptionalPermissionNoPrompt"
13110
+ },
13111
+ {
13112
+ "$ref": "PermissionPrivileged"
13097
13113
  },
13098
13114
  {
13099
13115
  "type": "string",
13100
13116
  "enum": [
13101
13117
  "alarms",
13102
- "mozillaAddons",
13103
13118
  "storage",
13104
13119
  "unlimitedStorage"
13105
13120
  ]
@@ -13443,7 +13458,7 @@
13443
13458
  "namespace": "manifest",
13444
13459
  "types": [
13445
13460
  {
13446
- "$extend": "PermissionNoPrompt",
13461
+ "$extend": "PermissionPrivileged",
13447
13462
  "choices": [
13448
13463
  {
13449
13464
  "type": "string",
@@ -14865,7 +14880,8 @@
14865
14880
  "type": "boolean",
14866
14881
  "optional": true,
14867
14882
  "default": false,
14868
- "description": "Whether to create all cookies as nonPersistent (i.e., session) cookies."
14883
+ "description": "Whether to create all cookies as nonPersistent (i.e., session) cookies.",
14884
+ "deprecated": "This property has no effect anymore and its value is always <code>false<code>."
14869
14885
  }
14870
14886
  }
14871
14887
  }
@@ -15720,8 +15736,7 @@
15720
15736
  "type": "string",
15721
15737
  "enum": [
15722
15738
  "scripting"
15723
- ],
15724
- "min_manifest_version": 3
15739
+ ]
15725
15740
  }
15726
15741
  ]
15727
15742
  }
@@ -15733,7 +15748,6 @@
15733
15748
  "permissions": [
15734
15749
  "scripting"
15735
15750
  ],
15736
- "min_manifest_version": 3,
15737
15751
  "types": [
15738
15752
  {
15739
15753
  "id": "ScriptInjection",
@@ -16635,7 +16649,7 @@
16635
16649
  }
16636
16650
  },
16637
16651
  {
16638
- "$extend": "PermissionNoPrompt",
16652
+ "$extend": "PermissionPrivileged",
16639
16653
  "choices": [
16640
16654
  {
16641
16655
  "type": "string",