@extension.dev/skill 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  "name": "extension-dev",
11
11
  "source": "./",
12
12
  "description": "Build, debug, and publish cross-browser extensions (Chrome, Edge, Firefox, Safari, and any Chromium- or Gecko-based browser): Manifest V3 gotchas, chromium:/firefox: manifest prefixes, live-browser verification playbooks, and store publishing checklists.",
13
- "version": "1.0.1",
13
+ "version": "1.0.2",
14
14
  "category": "development",
15
15
  "author": {
16
16
  "name": "Cezar Augusto"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "extension-dev",
3
3
  "description": "Cross-browser extension development skill: Manifest V3 gotchas, chromium:/firefox: manifest prefixes, live-browser verification playbooks, and store publishing checklists for the extension.dev / Extension.js stack.",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "author": {
6
6
  "name": "Cezar Augusto",
7
7
  "email": "hello@extension.dev",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.2
4
+
5
+ - Rule 6 and the cross-browser reference no longer say `chromium:world`
6
+ hard-fails the Chromium build. Measured with Extension.js 4.1.31, it
7
+ builds and gives the same Chromium output as the unprefixed `world`
8
+ key, and keeps Firefox on the isolated world. Unprefixed `world` stays
9
+ the default.
10
+
3
11
  ## 1.0.1
4
12
 
5
13
  - `references/publishing.md` teaches the `projects` input on
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@extension.dev/skill",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "description": "Agent Skill that teaches AI coding agents (Claude Code, Cursor, Copilot, Codex) to build, debug, and publish browser extensions for Chrome, Edge, Firefox, Safari, and every Chromium- or Gecko-based browser (Brave, Opera, Vivaldi, Yandex, Waterfox, LibreWolf): Manifest V3 gotchas, cross-browser manifest rules, and live-browser verification playbooks. Powered by extension.dev and Extension.js.",
6
6
  "license": "Apache-2.0",
7
7
  "author": {
@@ -4,7 +4,7 @@ description: Build, debug, and publish cross-browser extensions (Chrome, Edge, F
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Cezar Augusto
7
- version: 1.0.1
7
+ version: 1.0.2
8
8
  ---
9
9
 
10
10
  # Cross-Browser Extension Development
@@ -121,8 +121,7 @@ platform fails silently when you get it wrong.
121
121
  `chromium:service_worker` (string) vs `firefox:scripts` (array). Unprefixed
122
122
  fields apply everywhere; a matching prefixed key overrides the plain key,
123
123
  and prefixes resolve at any nesting depth (so `firefox:world` works inside
124
- a `content_scripts` entry). Exception: never prefix `world` as
125
- `chromium:world` (see rule 6).
124
+ a `content_scripts` entry), `world` included (see rule 6).
126
125
  4. **Side panels need an open trigger and the right permission.** Chromium
127
126
  requires the `sidePanel` permission plus explicit open behavior
128
127
  (`chrome.sidePanel.setPanelBehavior` or `open()` from a gesture). Firefox's
@@ -136,13 +135,13 @@ platform fails silently when you get it wrong.
136
135
  `browser.*`, ship with `npm run build -- --polyfill`. Otherwise write
137
136
  `chrome.*` (promise-based on MV3) and reserve `browser.*` for
138
137
  Firefox-specific branches.
139
- 6. **Write `world: "MAIN"` unprefixed, never `chromium:world`.** The build
140
- inserts a main-world bridge keyed off the literal `world` key; the prefixed
141
- form hard-fails the Chromium build. Firefox keeps the unprefixed key
142
- verbatim (understood from Firefox 128+), so pair it with
143
- `firefox:world: "ISOLATED"` when older Firefox must stay on the isolated
144
- world, and branch in code if the feature truly needs main-world access
145
- there.
138
+ 6. **Write `world: "MAIN"` unprefixed by default.** The build inserts the
139
+ main-world bridge on every target, and Firefox keeps the key (understood
140
+ from Firefox 128+). When older Firefox must stay on the isolated world,
141
+ add `firefox:world: "ISOLATED"`, or write `chromium:world: "MAIN"`, which
142
+ leaves Firefox without a `world` key; both build, and the Chromium output
143
+ is the same. Branch in code if the feature truly needs main-world access
144
+ on Firefox.
146
145
  7. **Service workers hold no state.** Chromium kills the worker after ~30s
147
146
  idle. Module-level variables vanish; persist everything to
148
147
  `chrome.storage.local` and re-read on wake. Register event listeners at the
@@ -24,8 +24,7 @@ These rules come from Extension.js's `filterKeysForThisBrowser` resolver
24
24
  family-wide fields and keep `chrome:`/`edge:` for a true per-vendor value.
25
25
  - Prefixes resolve at **any nesting depth**: inside `background`, inside a
26
26
  `content_scripts` entry (`firefox:world`), anywhere an object key appears.
27
- One exception: never write `chromium:world`; see the `world: "MAIN"`
28
- section below.
27
+ `world` follows the same rule; see the `world: "MAIN"` section below.
29
28
  - Precedence is deterministic and independent of declaration order:
30
29
  **plain key < family prefix < exact-browser prefix**. A non-matching
31
30
  prefixed key is dropped and the plain key survives. So
@@ -136,12 +135,12 @@ gesture handler.)
136
135
 
137
136
  ## Content scripts with `world: "MAIN"`
138
137
 
139
- Write the `world` key **unprefixed**. Main-world content scripts need a
140
- companion bridge script that the build inserts automatically, and that
141
- insertion keys off the literal `world` key in the source manifest. A
142
- `chromium:world` prefix hides the key from the bridge step and **hard-fails
143
- the Chromium build** (the emitted manifest references bridge bundles that
144
- were never compiled).
138
+ Write the `world` key **unprefixed** by default. Main-world content scripts
139
+ need a companion bridge script, and the build inserts it automatically. A
140
+ `chromium:world` key works too: measured with Extension.js 4.1.31, it builds,
141
+ the Chromium output is the same as the unprefixed key (the main-world script
142
+ plus its bridge), and the Firefox build gets the entry with no `world`, so it
143
+ runs in the isolated world.
145
144
 
146
145
  The build strips `world` from the bridge entry it emits, and Firefox keeps
147
146
  the unprefixed key verbatim (Firefox understands manifest `world` from 128