From 7283a8484741c6169e8c188389b59a9eac991c5e Mon Sep 17 00:00:00 2001 From: Julius Walton <31512984+ShiosOS@users.noreply.github.com> Date: Tue, 14 Jul 2026 14:25:28 -0400 Subject: [PATCH 1/3] Fix broken release packaging, test the fragile core, and polish to a higher bar (#15) Co-authored-by: Cursor Agent --- .github/workflows/ci.yml | 25 +++++- CHANGELOG.md | 36 ++++++++ README.md | 28 +++--- background.js | 129 ++++++++++++++++----------- checks.js | 17 +++- constants.js | 20 +++-- content.js | 153 +++++++------------------------- eslint.config.mjs | 8 +- manifest.json | 5 +- package-lock.json | 6 +- package.json | 8 ++ pages.js | 156 +++++++++++++++++++++++++++++++++ popup.html | 40 +++++++-- popup.js | 12 ++- scripts/build.mjs | 71 ++++++++++----- test/background.test.mjs | 148 +++++++++++++++++++++++++++++++ test/build.test.mjs | 70 +++++++++++++++ test/checks.test.mjs | 18 ++++ test/constants.test.mjs | 19 ++++ test/pages.test.mjs | 182 +++++++++++++++++++++++++++++++++++++++ tsconfig.json | 1 + types/globals.d.ts | 25 ++++-- vitest.config.mjs | 9 +- 23 files changed, 941 insertions(+), 245 deletions(-) create mode 100644 pages.js create mode 100644 test/background.test.mjs create mode 100644 test/build.test.mjs create mode 100644 test/constants.test.mjs create mode 100644 test/pages.test.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ace7f57..8d1b7fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,15 +17,25 @@ concurrency: jobs: check: runs-on: ubuntu-latest + strategy: + # Test the oldest Node we claim to support (package.json engines) + # alongside current, so "works on my machine" can't hide an engines + # violation. + matrix: + node-version: [22, 24] steps: # Actions are pinned to commit SHAs (supply-chain hardening); the # trailing comment records the human-readable version. v6 runs on the # Node 24 action runtime, clearing the Node 20 deprecation warning. - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + # No step here pushes or calls the API; don't leave the token in + # .git/config for the rest of the job. + persist-credentials: false - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: 24 + node-version: ${{ matrix.node-version }} cache: npm - run: npm ci @@ -42,3 +52,16 @@ jobs: - run: npm run coverage - run: npm run build + + # Merge gate: branch protection requires a single status named "check". + # Reporting that name from an aggregate job (instead of the matrix legs, + # whose names carry the Node version) keeps the required-check name + # stable no matter how the matrix changes. + ci-ok: + name: check + needs: check + if: always() + runs-on: ubuntu-latest + steps: + - name: Fail unless every matrix leg succeeded + run: test "${{ needs.check.result }}" = "success" diff --git a/CHANGELOG.md b/CHANGELOG.md index fa786e2..42210ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Release packaging omitted `checks.js`, so published `.zip`/`.xpi` builds + shipped without the status-checks helpers the content script depends on. + The packaged file list is now derived from `manifest.json` (plus popup + `