Program ID

The Program ID is a unique identifier for your add-on. When you package your add-on for distribution using jpm xpi, it will become the ID field in the add-on's Install Manifest.

The ID is used for a variety of purposes. For example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.

When you create an XPI with jpm xpi:

  • if the package.json does not include an id field, then the ID written into the install.rdf is the value of the name field prepended with "@".
  • if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on ID.
  • if the package.json does include an id field, and it does not contain "@", then jpm xpi raises an error and the XPI will not be built.