2026-05-01 06:08:29 +02:00
# AMO Source Build Instructions
This source package is provided for Mozilla Add-ons review. The extension is built with webpack, so reviewers should rebuild the submitted source and compare the generated Firefox output with the uploaded add-on package.
## Build environment
2026-09-07 19:10:02 +02:00
Build the 4.0.6 release with this exact toolchain:
2026-05-01 06:08:29 +02:00
2026-09-06 12:51:12 +02:00
- Windows 11 (PowerShell); the build script also supports Linux and macOS
2026-05-01 06:08:29 +02:00
- Node.js 22.17.0
- npm 10.8.2
2026-09-06 12:51:12 +02:00
These versions are intentionally pinned instead of relying on the default AMO reviewer environment. The build script checks both versions before installing dependencies and stops if either differs. The release's accompanying reproducibility report records the environment actually used for its independent source rebuild.
2026-05-01 06:08:29 +02:00
## Install Node.js
Using `nvm` :
```sh
nvm install 22.17.0
nvm use 22.17.0
2026-09-06 12:51:12 +02:00
npm install --global npm@10.8.2
2026-05-01 06:08:29 +02:00
```
Confirm the versions:
```sh
node --version
npm --version
```
Expected versions:
```text
v22.17.0
10.8.2
```
## Build
From the repository root, run:
```sh
node scripts/build-firefox-source.mjs
```
The script performs all required technical build steps:
2026-09-06 12:51:12 +02:00
1. Confirms Node.js 22.17.0 and npm 10.8.2 are in use.
2. Installs the locked dependencies with `npm ci` .
3. Builds the extension with the release-specific `npm run build-for-amo` hook.
2026-09-07 19:10:02 +02:00
4. Verifies the generated Firefox manifest is version 4.0.6, retains the published AMO add-on ID, and declares the expected desktop data-collection permissions and minimum Firefox version.
2026-09-06 12:51:12 +02:00
5. Verifies `menu-fixer.js` and the other required Firefox files were generated.
6. Verifies `ryd.content-script.js` is below 5 MB.
7. Verifies every generated JavaScript file has no source-map reference.
8. Runs the extension artifact verifier to confirm that the generated files match the current source inputs.
2026-05-01 06:08:29 +02:00
The generated Firefox extension files are written to:
```text
Extensions/combined/dist/firefox
```
Use that directory when comparing the rebuilt code with the submitted Firefox add-on package.
## Notes
- `package-lock.json` is included so npm installs the same dependency versions used for this release.
2026-09-06 12:51:12 +02:00
- `Extensions/e2e/verify-extension-artifact.js` is included as a build-time verifier; it is not packaged in the add-on.
- All dependencies are installed from the npm registry with the standard npm package manager; no vendored or remotely fetched build scripts are used.
- This Firefox package is desktop-only. Its manifest requires Firefox 140.0 or newer and intentionally omits `gecko_android` .
2026-05-01 06:08:29 +02:00
- Production builds disable inline source maps. Development builds still use inline source maps through `npm run dev` .
- The production bundle is generated by webpack but is not intentionally obfuscated or minified.
- `node_modules` and `Extensions/combined/dist` are generated locally and are not source inputs.