Skip to content

Latest commit

 

History

History
114 lines (80 loc) · 2.03 KB

CONTRIBUTING.md

File metadata and controls

114 lines (80 loc) · 2.03 KB

How to contribute

Development

Dependencies

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.)

Setup

pnpm

Build

pnpm build
# or
pnpm build:prod

Run

  1. In one terminal start the watch build

    pnpm build:watch
  2. In another terminal start a browser with the extension loaded

    pnpm start

Unit Test

# Watch
pnpm test
# Single run
pnpm test --single-run

E2E Tests

Setup

These tests run using playwright, you'll need to install the playwright browsers with:

pnpm playwright install chromium

Running E2E tests

pnpm e2e

Inspecting test results from GitHub Actions

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

Lint

pnpm build
pnpm lint

Package

This is usually not required for normal development. Here are the instructions in case you need them.

pnpm package

Release

Versioning & the changelog are handled by changesets.

  1. Look for a PR named "Prepare Release (changsets automation)"
  2. Make sure the changes are good / what you expect
  3. 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).
  4. Merge the PR
  5. The main branch workflow will create a release for you.
  6. This release will hold the compiled version of the extension. Download it.
  7. Publish to the Firefox add-ons site
  8. Publish to the Chrome web store