Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9473e5e
Improve code readability and consistency:
addon-owner Aug 18, 2025
cff1cd1
Merge branch 'develop' into feature/content-shadow
addon-owner Sep 10, 2025
4dd021a
refactor(relay): enhance permission handling and improve type definit…
addon-owner Sep 10, 2025
77f8b2b
docs: improve formatting and clarity in contribution and policy docum…
addon-owner Sep 10, 2025
d4886cb
refactor(cli): improve EntrypointMetaPlugin for better asset handling…
addon-owner Sep 10, 2025
881a4fe
Merge main into develop
github-actions[bot] Aug 28, 2026
c839497
ci(release): prepare protected main automation
atldays Aug 28, 2026
b96fae8
Merge branch 'develop' into feature/content-shadow
atldays Aug 28, 2026
d4730b2
feat(entrypoint): expose asset maps and support content chunk loading
atldays Sep 3, 2026
f2af015
test(entrypoint): make virtual path assertion cross-platform
atldays Sep 3, 2026
1721c92
feat(content): add shadow DOM support
atldays Sep 4, 2026
6bdd6d2
refactor(bundler): organize plugins by directory
atldays Sep 4, 2026
04cbd6f
fix(build): exclude tests from distribution
atldays Sep 4, 2026
3231ece
test(browser): allow stable browser versions
atldays Sep 4, 2026
5319ef7
refactor(manifest): normalize resource handling and validation
atldays Sep 8, 2026
e3777f2
refactor(runtime): centralize page and relay metadata
atldays Sep 8, 2026
f5701c6
fix(build): correct watch updates and virtual module imports
atldays Sep 8, 2026
e40b617
feat(content): unify shadow and iframe isolation
atldays Sep 8, 2026
d8d8202
test: remove obsolete assertions and normalize fixture names
atldays Sep 8, 2026
f4fe39e
docs: document isolation behavior and architecture conventions
atldays Sep 8, 2026
e1ad886
test: fix Windows watch fixture updates
atldays Sep 8, 2026
e63c60b
test(browser): close speculative connections during teardown
atldays Sep 9, 2026
68972af
feat(content): consolidate isolation options and support closed roots
atldays Sep 9, 2026
215486c
Merge branch 'feature/content-shadow' into develop
atldays Sep 9, 2026
74b5c26
feat(locale): generate a shared virtual catalogue
atldays Sep 10, 2026
17e2ef4
feat(locale): use bundled translations in DynamicLocale
atldays Sep 10, 2026
a1479ca
fix(locale): use build language when browser i18n is unavailable
atldays Sep 11, 2026
b711e70
feat(locale): support custom storage drivers
atldays Sep 11, 2026
e7b49ad
refactor(locale): move generated types to LocaleRegistry
atldays Sep 11, 2026
3b60f5e
fix(types): include tests in the editor project
atldays Sep 11, 2026
20016ca
refactor(locale): centralize shared translation helpers
atldays Sep 12, 2026
5160519
fix(locale): refresh generated translations reliably in watch mode
atldays Sep 12, 2026
f9d4436
feat(locale)!: replace the React provider with locale hooks
atldays Sep 12, 2026
d613c0f
chore(test): remove duplicate type checking
atldays Sep 12, 2026
478e3cd
test(locale): fix Windows CI fixtures and output paths
atldays Sep 12, 2026
36032ff
refactor(locale)!: make runtime translation explicit
atldays Sep 12, 2026
be43897
Merge branch 'feature/locale' into develop
atldays Sep 12, 2026
36eb139
refactor: deliver page and relay data through virtual modules
atldays Sep 13, 2026
12719cf
refactor(bundler): remove unused runtime data plugin
atldays Sep 13, 2026
af251c5
refactor: unify entrypoint virtual data and shared contracts
atldays Sep 13, 2026
921466f
fix(bundler): stabilize generated modules and watch updates
atldays Sep 13, 2026
5185bbb
fix(bundler): embed entrypoint asset maps only for consumers
atldays Sep 13, 2026
166b48d
style: organize package fields and frame type imports
atldays Sep 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
72 changes: 72 additions & 0 deletions .github/scripts/releaseAutomation.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
const {spawnSync} = require("node:child_process");
const path = require("node:path");

const root = path.resolve(__dirname, "../..");

const shouldRelease = env => {
if (env.GITHUB_REF !== "refs/heads/main" || !["push", "workflow_dispatch"].includes(env.GITHUB_EVENT_NAME)) {
return false;
}

const actor = env.GITHUB_ACTOR;
const appSlug = env.RELEASE_APP_SLUG;
if (!actor || !appSlug) {
throw new Error("Release actor and App slug are required.");
}

// The authenticated actor survives reruns; commit authors and messages can be spoofed.
return actor.toLowerCase() !== `${appSlug}[bot]`.toLowerCase();
};

const getReleaseArguments = env => {
// The policy job runs before npm ci, so load this dependency only for release arguments.
const {validRange} = require("semver");
const tag = env.RELEASE_NPM_TAG || "latest";
// release-it later passes ['--tag', tag] to npm, where a leading '--' could become another option.
if (!/^[a-zA-Z][a-zA-Z0-9._-]*$/.test(tag) || validRange(tag)) {
throw new Error("Invalid npm dist-tag.");
}

return [
"--ci",
...(env.RELEASE_PREID ? [`--preRelease=${env.RELEASE_PREID}`] : []),
`--npm.tag=${tag}`,
...(env.RELEASE_VERSION ? [`--increment=${env.RELEASE_VERSION}`] : []),
];
};

const runRelease = (env = process.env, execute = spawnSync) => {
if (!shouldRelease(env)) {
throw new Error("This event is not allowed to release.");
}
if (env.RELEASE_TOKEN_APP_SLUG !== env.RELEASE_APP_SLUG) {
throw new Error("The release token App does not match RELEASE_APP_SLUG.");
}

const result = execute(
process.execPath,
[path.join(root, "node_modules/release-it/bin/release-it.js"), ...getReleaseArguments(env)],
{cwd: root, env, shell: false, stdio: "inherit"}
);
if (result.error) {
throw result.error;
}
return result.status ?? 1;
};

if (require.main === module) {
try {
if (process.argv[2] === "policy") {
process.stdout.write(`should_release=${shouldRelease(process.env)}\n`);
} else if (process.argv[2] === "run") {
process.exitCode = runRelease();
} else {
throw new Error("Expected policy or run.");
}
} catch (error) {
console.error(error.message);
process.exitCode = 1;
}
}

module.exports = {shouldRelease, getReleaseArguments, runRelease};
26 changes: 26 additions & 0 deletions .github/scripts/validateMainPullRequestSource.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {readFileSync} from "node:fs";

try {
const event = JSON.parse(readFileSync(0, "utf8"));
const pullRequest = event?.pull_request;
const headRepositoryId = pullRequest?.head?.repo?.id;
const baseRepositoryId = pullRequest?.base?.repo?.id;
const allowed =
pullRequest?.base?.ref === "main" &&
pullRequest?.head?.ref === "develop" &&
Number.isSafeInteger(headRepositoryId) &&
headRepositoryId > 0 &&
Number.isSafeInteger(baseRepositoryId) &&
baseRepositoryId > 0 &&
headRepositoryId === baseRepositoryId;

if (allowed) {
console.log("Source policy passed: develop -> main in the same repository.");
} else {
console.error("Only pull requests from this repository's develop branch may target main.");
process.exitCode = 1;
}
} catch {
console.error("Unable to read valid pull request event JSON.");
process.exitCode = 1;
}
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- 'feature/**'
pull_request:
branches:
- main
- develop
- 'feature/**'
workflow_call:
Expand Down Expand Up @@ -64,16 +65,27 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Set up Firefox
if: matrix.os == 'ubuntu-latest'
id: firefox
uses: browser-actions/setup-firefox@v1
with:
firefox-version: latest

- name: Typecheck
run: npm run typecheck

- name: Typecheck integration fixtures
run: npm run typecheck:integration

- name: Test
if: matrix.os == 'ubuntu-latest'
run: npm run test:ci
env:
ADNBN_CHROME_BIN: ${{ steps.chrome.outputs.chrome-path }}
ADNBN_FIREFOX_BIN: ${{ steps.firefox.outputs.firefox-path }}

# The CDP extension-loading scenario is verified on Chrome's Linux runner.
# Chrome CDP and Firefox BiDi extension scenarios run on the Linux runner.
# The rest of the test suite remains part of the full OS x Node matrix.
- name: Test (non-browser)
if: matrix.os != 'ubuntu-latest'
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/main-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Main PR

on:
pull_request_target:
branches:
- main
types: [opened, reopened, synchronize, edited]

permissions:
contents: read

jobs:
source-policy:
name: Main PR source (develop only)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout trusted policy
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.workflow_sha }}
persist-credentials: false

- name: Validate pull request source
run: node .github/scripts/validateMainPullRequestSource.mjs < "$GITHUB_EVENT_PATH"
71 changes: 47 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,63 @@ on:
type: string

permissions:
contents: write
id-token: write
contents: read

jobs:
policy:
name: Release policy
if: >-
github.ref == 'refs/heads/main' &&
github.actor != format('{0}[bot]', vars.RELEASE_APP_SLUG)
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.policy.outputs.should_release }}
steps:
- name: Checkout trusted workflow revision
uses: actions/checkout@v4
with:
ref: ${{ github.workflow_sha }}
persist-credentials: false

- name: Check release event
id: policy
env:
RELEASE_APP_SLUG: ${{ vars.RELEASE_APP_SLUG }}
run: node .github/scripts/releaseAutomation.cjs policy >> "$GITHUB_OUTPUT"

ci:
name: CI
needs: policy
if: needs.policy.outputs.should_release == 'true'
uses: ./.github/workflows/ci.yml
with:
full: true

release:
name: Release & Publish
runs-on: ubuntu-latest
needs: ci
needs: [policy, ci]
if: needs.policy.outputs.should_release == 'true'
environment: release
permissions:
contents: write
id-token: write
steps:
- name: Create release App token
id: release-app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
# Omitting owner/repositories scopes the token to this repository only.
permission-contents: write

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
token: ${{ steps.release-app-token.outputs.token }}

- name: Use Node.js
uses: actions/setup-node@v4
Expand All @@ -65,26 +102,13 @@ jobs:
env:
DEBUG: release-it:*,@release-it/*
HUSKY: 0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION_ARG=""
if [ -n "${{ inputs.version }}" ]; then
VERSION_ARG="${{ inputs.version }}"
fi

PREID_ARG=""
if [ -n "${{ inputs.preid }}" ]; then
PREID_ARG="--preRelease=${{ inputs.preid }}"
fi

if [ -n "${{ inputs.npm_tag }}" ]; then
NPM_TAG="${{ inputs.npm_tag }}"
else
NPM_TAG="latest"
fi
NPM_TAG_ARG="--npm.tag=${NPM_TAG}"

npx release-it --ci $PREID_ARG $NPM_TAG_ARG $VERSION_ARG
GITHUB_TOKEN: ${{ steps.release-app-token.outputs.token }}
RELEASE_APP_SLUG: ${{ vars.RELEASE_APP_SLUG }}
RELEASE_TOKEN_APP_SLUG: ${{ steps.release-app-token.outputs.app-slug }}
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_PREID: ${{ inputs.preid }}
RELEASE_NPM_TAG: ${{ inputs.npm_tag }}
run: node .github/scripts/releaseAutomation.cjs run

- name: Sync main → develop
uses: devmasx/merge-branch@v1.4.0
Expand All @@ -95,4 +119,3 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
HUSKY: 0

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ TODOs.md
stats.html
.tool-versions
.cache
/tests/integration/browser/offscreen-service/.adnbn/
/tests/integration/**/.adnbn/
*-stats.txt
.npmrc
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
node_modules/
.github/workflows/
dist/
build/
/build/
addon/
src/cli/entrypoint/file/tests/fixtures/
CHANGELOG.md
CHANGELOG.md
2 changes: 1 addition & 1 deletion .release-it.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const createReleaseConfig = () => {
git: {
requireCleanWorkingDir: true,
requireUpstream: false,
requireBranch: false,
requireBranch: "main",
commit: true,
commitMessage: "chore(release): v${version}",
tag: true,
Expand Down
Loading
Loading