Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3f36c17
Merge main into develop
github-actions[bot] Sep 22, 2026
d9d6c22
fix(release): set sync merge message through github-script
atldays Sep 23, 2026
1874899
chore(deps): update browser and storage packages
atldays Sep 24, 2026
6b9204d
test: use browser harness by default with audited legacy exceptions
atldays Sep 24, 2026
2903310
fix(relay): omit scripting permission for MV2
atldays Sep 24, 2026
8d035a8
fix(relay): preserve scripting error envelopes
atldays Sep 24, 2026
dc98d06
test(relay): migrate remaining suites to browser harness
atldays Sep 24, 2026
938e9be
fix(message): unwrap successful responses without payload
atldays Sep 24, 2026
938598b
test(message): migrate suites to browser harness
atldays Sep 25, 2026
1eb9141
fix(message): preserve synchronous falsy responses
atldays Sep 25, 2026
3aa1c4a
fix(message): update React handlers after render commits
atldays Sep 25, 2026
25fe7e4
test(offscreen): migrate lifecycle suites to browser harness
atldays Sep 25, 2026
e3133d5
refactor(locale): move observable state to observers
atldays Sep 25, 2026
c99f598
test(locale): migrate observable locale to browser harness
atldays Sep 25, 2026
d7c7157
refactor(locale): import native provider through barrel
atldays Sep 25, 2026
046184e
test(service): migrate suites to browser harness
atldays Sep 25, 2026
7c4e136
test(sandbox): migrate messaging and remove legacy setup
atldays Sep 25, 2026
c20da37
test(browser): replace remaining local module mocks
atldays Sep 25, 2026
c534157
chore(test): organize commands and pre-push checks
atldays Sep 25, 2026
71451b8
perf(relay): preserve named definitions during type inference
atldays Sep 25, 2026
5fe410b
docs(test): record migration and relay benchmarks
atldays Sep 25, 2026
7730555
test(override): split build scenarios across page suites
atldays Sep 25, 2026
3b52058
test(browser): centralize startup deadlines and timing reports
atldays Sep 27, 2026
211adfe
fix(cli): await build completion and close failed compilers
atldays Sep 27, 2026
a285791
fix(cli): load dotenv only from application and project paths
atldays Sep 27, 2026
5c43c0a
refactor(cli): isolate sequential internal app builds
atldays Sep 27, 2026
ed60c4a
fix(cli): resolve builds from the project root
atldays Sep 28, 2026
2978006
test: add opt-in in-process override builds
atldays Sep 28, 2026
5074e10
test: record override benchmarks and Rspack retention
atldays Sep 28, 2026
cf3a311
docs: define production boundaries for test work
atldays Sep 28, 2026
3017489
refactor(cli): remove pilot virtual-directory workaround
atldays Sep 28, 2026
fa6fd32
test: isolate override builds in file-owned child sessions
atldays Sep 28, 2026
3244040
docs: record isolated build-session benchmarks
atldays Sep 28, 2026
eb784b0
chore(release): narrow package contents and make preview read-only
atldays Sep 28, 2026
da92605
ci(test): exercise override build sessions across the matrix
atldays Sep 28, 2026
e68366e
Merge branch 'feature/testing' into develop
atldays Sep 28, 2026
72abf34
fix(style)!: resolve relative Sass requests from their source files
atldays Sep 28, 2026
2a49fa4
feat(action): configure toolbar icon and title defaults
atldays Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ jobs:
- name: Compiler, CLI and declaration integrations
if: matrix.os != 'ubuntu-latest' || matrix.node != 22
run: npm run test:run -- --selectProjects build types --ci --maxWorkers=2
- name: Override builds in isolated sessions
run: npm run test:run -- --selectProjects build --testPathPatterns=tests/integration/build/override --ci --maxWorkers=2
env:
ADNBN_OVERRIDE_BUILD_MODE: session
- name: Upload build coverage
if: matrix.os == 'ubuntu-latest' && matrix.node == 22
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -126,7 +130,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build package, prepare and typecheck every application
run: npm run typecheck:integration
run: npm run typecheck:fixtures

browser:
name: Browser (${{ matrix.browser }}, Node ${{ matrix.node }})
Expand Down Expand Up @@ -168,6 +172,15 @@ jobs:
env:
ADNBN_CHROME_BIN: ${{ steps.chrome.outputs.chrome-path }}
ADNBN_FIREFOX_BIN: ${{ steps.firefox.outputs.firefox-path }}
- name: Upload browser startup timings
if: always()
uses: actions/upload-artifact@v4
with:
name: browser-startup-${{ matrix.browser }}-node-${{ matrix.node }}
path: .cache/integration/browser-startup.json
include-hidden-files: true
if-no-files-found: ignore
retention-days: 7

coverage:
name: Coverage (ubuntu-latest, Node 22)
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ jobs:
run: node .github/scripts/releaseAutomation.cjs run

- name: Sync main → develop
uses: devmasx/merge-branch@v1.4.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
type: now
from_branch: main
target_branch: develop
message: "chore(sync): merge main into develop"
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
HUSKY: 0
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.repos.merge({
...context.repo,
base: "develop",
head: "main",
commit_message: "chore(sync): merge main into develop",
});
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh

# Browser scenarios and coverage run in CI; build the package only once here.
npm run test:pre-push
npm run check
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ dist/
/build/
addon/
src/cli/entrypoint/file/tests/fixtures/
src/cli/plugins/style/tests/fixtures/
tests/integration/build/style/fixtures/
CHANGELOG.md
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

- `CHANGELOG.md` is generated by the release pipeline during publication. Do not edit it manually; document behavior and migration guidance in the relevant documentation instead.

## Production code changes during test work

- Authorization to add, migrate, refactor, or accelerate tests does not authorize changes to production code, including CLI, build configuration, resolvers, plugins, public contracts, or resource lifecycles. Do not change working production behavior merely to accommodate a test runner, fixture layout, parallel execution, or an experimental test backend.
- Distinguish a product defect from a limitation of the test setup. Before proposing a production fix, demonstrate how supported consumer usage violates the intended contract, independently of test-only assumptions. A failing experiment or a faster test run alone is not evidence of a product defect. Keep a confirmed fix within an already authorized scope; otherwise present the evidence and obtain agreement before changing production code.
- First use the existing public boundaries and realistic execution model in tests. Prefer properly isolated fixtures, processes, and resources owned by the test session. Preserve scenario coverage and observable behavior; do not hide failures with private implementation access, hidden global state, arbitrary retries, or special production branches for tests.
- If a sound test-layer solution is unavailable, stop the affected implementation and propose alternatives before editing production code. Explain the ownership boundary, consumer impact, lifecycle and cleanup, concurrency and platform constraints, tradeoffs, and validation. Choose established mechanisms that fit this codebase; neither novelty nor passing tests justifies an architectural workaround.
- Treat newly discovered production changes as a separate scope decision, even inside an approved test optimization pilot. Agreement on a product fix does not authorize unrelated infrastructure redesign. Keep product fixes and test-only changes separately reviewable.

## Cross-platform tests

- The full CI matrix in `.github/workflows/ci.yml` runs on Linux and Windows with Node.js 22 and 24. New and changed non-browser tests must work on both operating systems. Chrome and Firefox browser integrations currently run on Linux; consult the workflow for the current matrix.
Expand Down
21 changes: 11 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ Releases and versioning:
- We use SemVer. Commit types help determine version bumps (`feat` → minor, `fix` → patch, `BREAKING CHANGE` → major).
- Package version is updated by maintainers within release/hotfix branches.

Run `npm run release:preview` to inspect the proposed version and changelog from a feature branch,
even with a dirty working tree. This is a dry run: it does not update files, create commits or tags, push,
or publish to GitHub/npm. Only committed changes contribute to the proposed release notes and version.
The preview uses the read-only `--release-version` and `--changelog` modes, which exit before the version
update stage. `--dry-run` alone is insufficient with the installed release-it version: its npm plugin still
executes `npm version`. The preview's relaxed checks do not change the actual release restrictions.

## How to contribute

1. Fork the repository and create a branch from `develop` (or `main` for `hotfix`):
Expand All @@ -83,16 +90,10 @@ Releases and versioning:
3. Make changes and ensure commits follow Conventional Commits.
4. Before opening a PR, run local checks:
- Formatting: `npm run format`
- Tests: `npm test` (the full suite includes a Chrome MV3 integration test; use `ADNBN_CHROME_BIN=/path/to/chrome` to override automatic Chrome discovery)
- By area (if needed):
- `npm run test:relay`
- `npm run test:service`
- `npm run test:storage`
- `npm run test:message`
- `npm run test:locale`
- `npm run test:manifest`
- `npm run test:entrypoint`
- `npm run test:plugins`
- Non-browser checks: `npm run check` (framework types, package build, non-browser tests and fixture typechecks).
- Full tests: `npm test` (includes Chrome and Firefox; use `ADNBN_CHROME_BIN` and `ADNBN_FIREFOX_BIN` to override discovery).
- Focused units: `npm run test:unit -- --testPathPatterns=src/locale` or `npm run test:unit -- --runTestsByPath src/sandbox/SandboxMessage.test.ts`.
- See [tests/README.md](tests/README.md) for test groups, watch mode, coverage and fixture commands.
5. Open a PR to the appropriate branch (usually `develop`) and include:
- motivation and solution;
- alternatives and trade-offs (if any);
Expand Down
15 changes: 11 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import {availableParallelism} from "node:os";
const shared: Config = {
rootDir: import.meta.dirname,
testEnvironment: "node",
// This function is serialized into browser/VM realms; Istanbul closures cannot cross that boundary.
coveragePathIgnorePatterns: ["/node_modules/", "<rootDir>/src/relay/adapters/invoke-relay\\.ts$"],

globals: {ADNBN_TEST_ROOT: import.meta.dirname},
setupFiles: ["<rootDir>/tests/jest.setup.ts"],
setupFilesAfterEnv: ["<rootDir>/tests/jest.setup.ts"],
transformIgnorePatterns: ["/node_modules/(?!(@addon-core/storage|nanoid)/)"],
modulePathIgnorePatterns: ["<rootDir>/.cache/"],
resolver: "<rootDir>/tests/raw-module-resolver.cjs",
moduleNameMapper: {
Expand All @@ -24,6 +28,7 @@ const shared: Config = {
"^@transport/(.*)$": "<rootDir>/src/transport/$1",
"^@main/(.*)$": "<rootDir>/src/main/$1",
"^@typing/(.*)$": "<rootDir>/src/types/$1",
"^@tests/(.*)$": "<rootDir>/tests/$1",
},
extensionsToTreatAsEsm: [".ts", ".tsx"],
transform: {
Expand All @@ -45,14 +50,15 @@ const shared: Config = {

const buildTests = [
"<rootDir>/src/cli/bundler/plugins/**/*.test.ts",
"<rootDir>/src/cli/index.test.ts",
"<rootDir>/src/cli/builders/app/**/*.test.ts",
"<rootDir>/src/cli/virtual/virtual.test.ts",
"<rootDir>/src/cli/plugins/content/RelayDeclaration.test.ts",
"<rootDir>/src/cli/plugins/locale/declaration/LocaleDeclaration.test.ts",
"<rootDir>/tests/build-output.test.ts",
"<rootDir>/tests/integration/build/**/*.test.ts",
];
const domTests = [
"<rootDir>/tests/browser-harness-dom.test.ts",
"<rootDir>/src/entry/**/*.test.ts",
"<rootDir>/src/frame/**/*.test.ts",
"<rootDir>/src/sandbox/providers/**/*.test.ts",
Expand All @@ -65,6 +71,7 @@ const exclude = (patterns: string[]) =>

const config: Config = {
verbose: false,
reporters: ["default", "<rootDir>/tests/BrowserStartupReporter.cjs"],
maxWorkers: Math.max(1, Math.min(8, availableParallelism() - 1)),
coverageProvider: "babel",
projects: [
Expand All @@ -91,7 +98,7 @@ const config: Config = {
{
...shared,
displayName: "chrome",
setupFiles: [],
setupFilesAfterEnv: [],
testMatch: [
"<rootDir>/tests/integration/browser/**/*.integration.test.ts",
...exclude(["<rootDir>/tests/integration/browser/**/*.firefox.integration.test.ts"]),
Expand All @@ -100,7 +107,7 @@ const config: Config = {
{
...shared,
displayName: "firefox",
setupFiles: [],
setupFilesAfterEnv: [],
testMatch: ["<rootDir>/tests/integration/browser/**/*.firefox.integration.test.ts"],
},
],
Expand Down
81 changes: 40 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading