mozilla / web-ext

A command line tool to help build, run, and test web extensions
Mozilla Public License 2.0
2.65k stars 334 forks source link

feat: remove --id flag on web-ext sign #3126

Closed willdurand closed 2 months ago

willdurand commented 3 months ago

Fixes #3124


As per https://github.com/mozilla/web-ext/pull/2458#discussion_r929826399, we require the add-on ID to be specified in the manifest.

:warning: This is another breaking change, and since it was confusing, I am going to document a few use cases below.

New MV2 add-on, no ID in the manifest

Add-on ID is generated by AMO, a message is printed to update the manifest.json file:

Generated extension ID: {297f6bbb-7604-41ca-8473-0b685e4ae3ff}.
You must add the following to your manifest:
"browser_specific_settings": {"gecko": {"id": "{297f6bbb-7604-41ca-8473-0b685e4ae3ff}"}}

Add-on submitted successfully.

Existing MV2 add-on, no ID in the manifest

An error is thrown by web-ext:

UsageError: Cannot use previously auto-generated extension ID {297f6bbb-7604-41ca-8473-0b685e4ae3ff} - This extension ID must be specified in the manifest.json file.

New MV2 add-on, ID in the manifest

Add-on submitted successfully.

Existing MV2 add-on, ID in the manifest

Add-on submitted successfully.

New MV3 add-on, no ID in the manifest

An error is thrown by web-ext:

UsageError: An extension ID must be specified in the manifest.json file.

New MV3 add-on, ID in the manifest

Add-on submitted successfully.