Skip to content

Commit

Permalink
chore: patch out validation of extensionId
Browse files Browse the repository at this point in the history
We provide it in manifest.json to pass manifest v3 validation,
and that is at odds with passing it as a CLI to web-ext.
  • Loading branch information
wkillerud committed Apr 15, 2024
1 parent 13bbbba commit 4db109d
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 0 deletions.
179 changes: 179 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
],
"license": "MIT",
"scripts": {
"postinstall": "patch-package",
"build": "npm run build -ws --if-present",
"lint": "npm run lint -ws --if-present",
"test": "npm run test -ws --if-present",
Expand All @@ -20,6 +21,7 @@
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"patch-package": "8.0.0",
"prettier": "3.2.5",
"semantic-release": "23.0.5",
"semantic-release-firefox-add-on": "0.2.8",
Expand Down
33 changes: 33 additions & 0 deletions patches/semantic-release-firefox-add-on+0.2.8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/node_modules/semantic-release-firefox-add-on/src/constants.js b/node_modules/semantic-release-firefox-add-on/src/constants.js
index c5dea36..2e34ade 100644
--- a/node_modules/semantic-release-firefox-add-on/src/constants.js
+++ b/node_modules/semantic-release-firefox-add-on/src/constants.js
@@ -11,8 +11,6 @@ const defaultOptions = {
}

const requiredOptions = {
- extensionId:
- 'Omitting this would create a new extension instead of a new version.',
targetXpi:
'Omitting this would leave the xpi file unnamed when it is returned from mozilla.',
}
diff --git a/node_modules/semantic-release-firefox-add-on/src/publish.js b/node_modules/semantic-release-firefox-add-on/src/publish.js
index ad0f63d..6c3ce35 100644
--- a/node_modules/semantic-release-firefox-add-on/src/publish.js
+++ b/node_modules/semantic-release-firefox-add-on/src/publish.js
@@ -16,7 +16,6 @@ const publish = async options => {
// the console which will lead to the validation page which should contain
// detailed reasons why the extension was rejected
const {
- extensionId,
artifactsDir,
channel,
sourceDir,
@@ -46,7 +45,6 @@ const publish = async options => {
apiSecret: FIREFOX_SECRET_KEY,
artifactsDir,
channel,
- id: extensionId,
sourceDir,
},
{ signAddon },

0 comments on commit 4db109d

Please sign in to comment.