webext-schema 6.0.0 → 7.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.
@@ -0,0 +1,13 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13
+ custom: ['https://paypal.me/asamuzakjp'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,31 @@
1
+ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
+
4
+ name: build
5
+ permissions:
6
+ contents: read
7
+
8
+ on:
9
+ push:
10
+ branches: [ main ]
11
+ pull_request:
12
+ branches: [ main ]
13
+ release:
14
+ types: [ created ]
15
+
16
+ jobs:
17
+ build:
18
+ strategy:
19
+ matrix:
20
+ node-version: [ 20.x, lts/*, latest ]
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v6
24
+ - name: Use Node.js ${{ matrix.node-version }}
25
+ uses: actions/setup-node@v6
26
+ with:
27
+ node-version: ${{ matrix.node-version }}
28
+ check-latest: true
29
+ - run: npm ci
30
+ - run: npm run lint
31
+ - run: npm run testall
@@ -0,0 +1,52 @@
1
+ import jsdoc from 'eslint-plugin-jsdoc';
2
+ import regexp from 'eslint-plugin-regexp';
3
+ import unicorn from 'eslint-plugin-unicorn';
4
+ import globals from 'globals';
5
+ import neostandard, { plugins as neostdplugins } from 'neostandard';
6
+
7
+ export default [
8
+ ...neostandard({
9
+ semi: true
10
+ }),
11
+ jsdoc.configs['flat/recommended'],
12
+ regexp.configs['flat/recommended'],
13
+ {
14
+ languageOptions: {
15
+ globals: {
16
+ ...globals.browser,
17
+ ...globals.node,
18
+ ...globals.webextensions
19
+ }
20
+ },
21
+ linterOptions: {
22
+ reportUnusedDisableDirectives: true
23
+ },
24
+ plugins: {
25
+ '@stylistic': neostdplugins['@stylistic'],
26
+ regexp,
27
+ unicorn
28
+ },
29
+ rules: {
30
+ '@stylistic/space-before-function-paren': ['error', {
31
+ anonymous: 'always',
32
+ asyncArrow: 'always',
33
+ named: 'never'
34
+ }],
35
+ 'import-x/order': ['error', {
36
+ alphabetize: {
37
+ order: 'ignore',
38
+ caseInsensitive: false
39
+ }
40
+ }],
41
+ 'no-await-in-loop': 'error',
42
+ 'no-use-before-define': ['error', {
43
+ allowNamedExports: false,
44
+ classes: true,
45
+ functions: true,
46
+ variables: true
47
+ }],
48
+ 'prefer-object-has-own': 'error',
49
+ 'unicorn/prefer-node-protocol': 'error'
50
+ }
51
+ }
52
+ ];
package/modules/schema.js CHANGED
@@ -22,14 +22,13 @@ export class Schema {
22
22
  * construct
23
23
  * @param {...(string|object)} [args] - optional arguments
24
24
  * {string} - release channel.
25
- * one of "beta", "central",
26
- * "esr", "mail".
25
+ * "beta", "central", "mail".
27
26
  * {object} - sinon config
28
27
  */
29
28
  constructor(...args) {
30
29
  const [arg1, arg2] = args;
31
30
  this.#channel =
32
- isString(arg1) && /(?:centra|mai)l|beta|esr/.test(arg1)
31
+ isString(arg1) && /^(?:central|mail)$/.test(arg1)
33
32
  ? arg1
34
33
  : 'beta';
35
34
  this._sandbox =
@@ -48,7 +47,7 @@ export class Schema {
48
47
  }
49
48
 
50
49
  set channel(ch) {
51
- if (isString(ch) && /(?:centra|mai)l|beta|esr/.test(ch)) {
50
+ if (isString(ch) && /^(?:central|mail|beta)$/.test(ch)) {
52
51
  this.#channel = ch;
53
52
  }
54
53
  }
package/modules/update.js CHANGED
@@ -14,7 +14,6 @@ import { createFile } from './file-util.js';
14
14
  import { CHAR, INDENT } from './constant.js';
15
15
  const DIR_CWD = process.cwd();
16
16
  const PERM_FILE = 0o644;
17
- export const ESR_VER = 115;
18
17
 
19
18
  /**
20
19
  * fetch text
@@ -45,9 +44,6 @@ export const getChannelUrl = channel => {
45
44
  case 'central':
46
45
  dir = 'mozilla-central/';
47
46
  break;
48
- case 'esr':
49
- dir = `releases/mozilla-esr${ESR_VER}/`;
50
- break;
51
47
  case 'mail':
52
48
  dir = 'comm-central/';
53
49
  break;
@@ -274,7 +270,6 @@ export const updateSchemas = async (cmdOpts = {}) => {
274
270
  func.push(
275
271
  saveSchemaFile('beta', info),
276
272
  saveSchemaFile('central', info),
277
- saveSchemaFile('esr', info),
278
273
  saveSchemaFile('mail', info)
279
274
  );
280
275
  }
package/package.json CHANGED
@@ -19,26 +19,26 @@
19
19
  "types": "types/index.d.ts",
20
20
  "dependencies": {
21
21
  "camelize": "^1.0.1",
22
- "commander": "^14.0.1",
22
+ "commander": "^14.0.2",
23
23
  "decamelize": "^6.0.1",
24
24
  "json5": "^2.2.3",
25
- "sinon": "^21.0.0"
25
+ "sinon": "^21.0.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/firefox-webext-browser": "^120.0.5",
29
- "@types/node": "^24.6.2",
30
- "@types/sinon": "^17.0.4",
28
+ "@types/firefox-webext-browser": "^143.0.0",
29
+ "@types/node": "^25.0.9",
30
+ "@types/sinon": "^21.0.0",
31
31
  "c8": "^10.1.3",
32
- "eslint": "^9.37.0",
33
- "eslint-plugin-jsdoc": "^60.8.0",
32
+ "eslint": "^9.39.2",
33
+ "eslint-plugin-jsdoc": "^62.1.0",
34
34
  "eslint-plugin-regexp": "^2.10.0",
35
- "eslint-plugin-unicorn": "^61.0.2",
36
- "globals": "^16.4.0",
37
- "mocha": "^11.7.4",
35
+ "eslint-plugin-unicorn": "^62.0.0",
36
+ "globals": "^17.0.0",
37
+ "mocha": "^11.7.5",
38
38
  "neostandard": "^0.12.2",
39
39
  "npm-run-all2": "^8.0.4",
40
40
  "typescript": "^5.9.3",
41
- "undici": "^7.16.0"
41
+ "undici": "^7.18.2"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "npm run tsc && npm run lint && npm run test",
@@ -51,11 +51,10 @@
51
51
  "test:release": "c8 mocha --require=test/mocha/setup.js --channel=release --exit test/*.test.js",
52
52
  "testall": "npm-run-all -s test:*",
53
53
  "tsc": "node index clean --dir=types -i && npx tsc",
54
- "update": "node index update -i",
54
+ "update": "npm-run-all -s update:*",
55
55
  "update:beta": "node index update --channel=beta -i",
56
56
  "update:central": "node index update --channel=central -i",
57
- "update:esr": "node index update --channel=esr -i",
58
57
  "update:mail": "node index update --channel=mail -i"
59
58
  },
60
- "version": "6.0.0"
59
+ "version": "7.0.0"
61
60
  }
@@ -12837,7 +12837,8 @@
12837
12837
  "memory",
12838
12838
  "tracing",
12839
12839
  "sandbox",
12840
- "flows"
12840
+ "flows",
12841
+ "jssources"
12841
12842
  ]
12842
12843
  },
12843
12844
  {
@@ -13516,7 +13517,7 @@
13516
13517
  },
13517
13518
  {
13518
13519
  "id": "ExtensionInstallType",
13519
- "description": "How the extension was installed. One of<br><var>development</var>: The extension was loaded unpacked in developer mode,<br><var>normal</var>: The extension was installed normally via an .xpi file,<br><var>sideload</var>: The extension was installed by other software on the machine,<br><var>admin</var>: The extension was installed by policy,<br><var>other</var>: The extension was installed by other means.",
13520
+ "description": "How the extension was installed.<dl><dt>development</dt><dd>The extension was loaded unpacked in developer mode,</dd><dt>normal</dt><dd>The extension was installed normally via an .xpi file</dd><dt>sideload</dt><dd>The extension was installed by other software on the machine</dd><dt>admin</dt><dd>The extension was installed by policy</dd><dt>other</dt><dd>The extension was installed by other means.</dd></dl>",
13520
13521
  "type": "string",
13521
13522
  "enum": [
13522
13523
  "development",
@@ -13867,8 +13868,7 @@
13867
13868
  "manifest_version": {
13868
13869
  "type": "integer",
13869
13870
  "minimum": 2,
13870
- "maximum": 3,
13871
- "postprocess": "manifestVersionCheck"
13871
+ "maximum": 3
13872
13872
  },
13873
13873
  "applications": {
13874
13874
  "$ref": "DeprecatedApplications",
@@ -14565,6 +14565,9 @@
14565
14565
  "optional": true,
14566
14566
  "default": false
14567
14567
  }
14568
+ },
14569
+ "additionalProperties": {
14570
+ "$ref": "UnrecognizedProperty"
14568
14571
  }
14569
14572
  }
14570
14573
  },
@@ -16995,7 +16998,7 @@
16995
16998
  ],
16996
16999
  "returns": {
16997
17000
  "$ref": "Port",
16998
- "description": "Port through which messages can be sent and received. The port's $(ref:runtime.Port onDisconnect) event is fired if the extension/app does not exist. "
17001
+ "description": "Port through which messages can be sent and received. The port's $(ref:runtime.Port.onDisconnect) event is fired if the extension/app does not exist. "
16999
17002
  }
17000
17003
  },
17001
17004
  {
@@ -18074,7 +18077,7 @@
18074
18077
  {
18075
18078
  "name": "areaName",
18076
18079
  "type": "string",
18077
- "description": "The name of the storage area (<code>\"sync\"</code>, <code>\"local\"</code> or <code>\"managed\"</code>) the changes are for."
18080
+ "description": "The name of the storage area (<code>\"session\"</code>, <code>\"sync\"</code>, <code>\"local\"</code> or <code>\"managed\"</code>) the changes are for."
18078
18081
  }
18079
18082
  ]
18080
18083
  }
@@ -12837,7 +12837,8 @@
12837
12837
  "memory",
12838
12838
  "tracing",
12839
12839
  "sandbox",
12840
- "flows"
12840
+ "flows",
12841
+ "jssources"
12841
12842
  ]
12842
12843
  },
12843
12844
  {
@@ -13867,8 +13868,7 @@
13867
13868
  "manifest_version": {
13868
13869
  "type": "integer",
13869
13870
  "minimum": 2,
13870
- "maximum": 3,
13871
- "postprocess": "manifestVersionCheck"
13871
+ "maximum": 3
13872
13872
  },
13873
13873
  "applications": {
13874
13874
  "$ref": "DeprecatedApplications",
@@ -14565,6 +14565,9 @@
14565
14565
  "optional": true,
14566
14566
  "default": false
14567
14567
  }
14568
+ },
14569
+ "additionalProperties": {
14570
+ "$ref": "UnrecognizedProperty"
14568
14571
  }
14569
14572
  }
14570
14573
  },