You'll need the following dependencies installed on your system:
- Nodejs (any modern version should do)
- pnpm
- A browser to test on (Firefox, Chrome, Chromium, etc.)
pnpm
pnpm build
# or
pnpm build:prod
-
In one terminal start the watch build
pnpm build:watch
-
In another terminal start a browser with the extension loaded
pnpm start
# Watch
pnpm test
# Single run
pnpm test --single-run
These tests run using playwright, you'll need to install the playwright browsers with:
pnpm playwright install chromium
pnpm e2e
Sometimes, the E2E tests will fail complaining about screenshots not matching. You can see what's going on for yourself like this:
# Clear any previous test results / report
rm -rf test-results playwright-report
# Download the e2e results from GHA
gh run download -n playwright-results
# Open the report
pnpm playwright show-report
pnpm build
pnpm lint
This is usually not required for normal development. Here are the instructions in case you need them.
pnpm package
Versioning & the changelog are handled by changesets.
- Look for a PR named "Prepare Release (changsets automation)"
- Make sure the changes are good / what you expect
- The CI doesn't run automatically because of limitations wit GHA. You can
force it to run by manually starting the
Prepare Release workflow
(targeting
main
). - Merge the PR
- The main branch workflow will create a release for you.
- This release will hold the compiled version of the extension. Download it.
- Publish to the Firefox add-ons site
- Publish to the Chrome web store