Skip to content

4.2.0 (November 20, 2026)

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 02:45
· 66 commits to main since this release
  • A steadier dev loop, a save that fixes a build error rebuilds the page, a content script file deleted and written back is rebuilt, a content script still waiting on the old build retires on reload, dev on macOS no longer misses an edit, two dev sessions in one process no longer share a host or port, an auto-exit session lets a slow stop finish and exits 0, and after a restart --output json writes ready again with restarted: true. Docs
  • Private files never ship, files such as .env, .npmrc, .git and .DS_Store are never copied into the build, even from public/, the dev server answers them as missing, and a page or stylesheet that points at one gets a single warning with a code. Docs
  • Build diagnostics you can match on, named build warnings and errors carry a stable code, and --output json reports them without terminal layout or paths from your machine, so scripts and CI can rely on them. Each issue is said once, and with color off every warning and error line says Warning: or Error:. Docs
  • The polyfill stays out of page code, with polyfill: true, MAIN world content scripts, scripts the extension registers into the MAIN world at runtime and sandboxed pages no longer bundle webextension-polyfill, which threw "This script should only be loaded in a browser extension." there. Their browser is the page's own global, and extension code keeps the polyfill.
  • Failures that say so instead of hanging, a browser that does not start within 3 minutes, or a first Safari package within 10, is reported with E_BROWSER_START_TIMEOUT while rebuilds keep running. A failed Safari package prints why, a browser log capture failure is a warning and the session still reports ready, a locked browser profile leads with the fix, a dev session ends when the process that started it is gone, and extension create ends a timed-out template clone or install along with everything it started. Docs
  • CSS you can link to, outside a content script import href from './panel.css?url' gives the URL of the compiled sheet under assets/, a PostCSS config keeps its parser, syntax, stringifier and map, and a project rule that sets a stylesheet type gets a warning instead of being replaced without a word.
  • Install several browsers at once, extension install chrome firefox takes more than one browser name, and the update check asks the npm registry you configured, caches the answer for an hour and stays quiet in CI, under --output json or with EXTENSION_NO_UPDATE_CHECK=1. Docs
  • Fail a build on a budget overrun, set perfBudgets.onExceed: 'error' and a production build that goes over an asset size budget fails instead of only warning. Docs
  • Upgrade notes, the bundler moves to rspack 2.3.3 and Extension.js no longer ships postcss-preset-env. If your PostCSS config names postcss-preset-env without installing it, run npm install -D postcss-preset-env, or the build skips that plugin with a warning. A project with no package.json now writes dist/ at the folder you name, not beside a manifest in src/, and a perfBudgets value that is not a positive number now stops the build with a clear error. A dev stop that runs past its 10 second bound now ends on failed with E_SHUTDOWN_TIMEOUT in place of E_INTERNAL (the exit code stays 1), and a launch with no free debugging port from 9222 to 9271 stops with E_PORT_UNAVAILABLE. The generated extension-env.d.ts names @types/chrome only when your package.json lists it, so a project that relies on those types lists @types/chrome itself. The commands.preview config type no longer accepts polyfill, include or exclude, which preview never applied, so a config that sets them there fails its type check and should move them to commands.build.
  • Warning codes start with W_, every coded warning now reports a W_ code in --output json details, in warnings and in ready.json cdpFaultCode, while errors and refusals keep their E_ code. A script that matches a warning by code reads W_ in place of E_ for these 30 names: MANAGED_DEP_CONFLICT, TYPES_EMIT, MODULE_NOT_FOUND, ENTRY_NOT_FOUND, ASSET_MISSING, SCRIPT_DEP_MISSING, CSS_PARSE, CSS_PREPROCESSOR_MISSING, CSS_DEAD_REF, POLYFILL_NOT_FOUND, LOCALES_LAYOUT, PROD_LOOPBACK_ORIGIN, NO_ENTRYPOINTS, REMOTE_RESOURCE_BLOCKED, PERF_BUDGET, ENV_NO_MATCH, LAUNCH_SKIPPED_COMPILE_ERRORS, UNINSTALL_NOOP, PORT_IN_USE, LOGS_STREAM_GAP, CDP_NOT_CONNECTED, CDP_TIMEOUT, CDP_OP_FAILED, BROWSER_CONNECTION_CLOSED, EXTENSION_ID_UNKNOWN, MANIFEST_INVALID, WAR_INVALID, RESERVED_FOLDER, INTERNAL, COMPANION_EXTENSION_PATH.

Features

  • Add today's fixes to the 4.2.0 highlights and upgrade notes (#1263) (5aa2d27e6)
  • Add a W_ warning code class and code each warning name (#1230) (82c9742c3)

Fixes

  • Guard what a build deletes and code every build failure (#1156) (b2d1e2478)
  • Guard walked scripts and ship named files from the workspace (#1183) (ab53c96a9)
  • Guard the develop build entries and lean on rslib shims (#1134) (e5f243e9e)
  • Stop hydrate from copying a build script the templates repo lacks (#1103) (331603002)
Other changes (164)
  • Move the templates gate pin to the Windows install fix (#1282) (20ab09164)
  • Write CSS color names in a theme as arrays for Chromium (#1281) (fbbd41063)
  • Move the release gate pins to the pinned corpus and templates (#1280) (4885aabcb)
  • Keep env writes valid and code unreadable env files (#1274) (d41d89f88)
  • Mark refused builds in ready.json, refuse bad perfBudgets in dev (#1278) (752a3a0ae)
  • Name mistyped manifest paths, drop a failed MAIN world bundle (#1272) (81557735b)
  • Keep the AI-help snapshot off the template list the pin moves (#1273) (1b67056f4)
  • Read brackets in resource globs as names, code minifier warning (#1268) (ea7833735)
  • Narrow preview config, code launch errors, map two ready ids (#1266) (2652e07c2)
  • Move the wrapper's reload hints and branches into plugin-reload (#1262) (ab49a8887)
  • Drop the stale chunk loading notes and unused devSession argument (#1265) (0d08be80c)
  • Make plugin-web-extension own the chunk loading target (#1260) (343ed6141)
  • Keep the polyfill out of dev MAIN copies of shared scripts files (#1258) (55f69f714)
  • Run the MAIN world restart from the dev server (#1261) (61f5c00ae)
  • Move reload specs from plugin-browsers to plugin-reload (#1259) (7b7c1dff2)
  • Drop the dev fs patch and keep left-out public files unserved (#1250) (b9cb7738b)
  • Keep left-out public files out of CSS urls (#1257) (5eef0f1c6)
  • Move MAIN world restart holds into the dev server (#1256) (19bc71d74)
  • Keep the polyfill out of sandbox imports and runtime MAIN code (#1255) (19217f163)
  • Code a dev stop that passes its bound as E_SHUTDOWN_TIMEOUT (#1254) (408854ea7)
  • Say when a CSS rule type is replaced and ship css?url as a file (#1253) (228a196f5)
  • Report browser log, Safari package and hung launch failures (#1252) (69bf46f78)
  • Keep the polyfill out of MAIN world and sandboxed page scripts (#1245) (708b1eea8)
  • Move the dev reinject runtime from the wrapper into plugin-reload (#1249) (3f5c59500)
  • Let an auto-exit dev session finish a slow stop and exit 0 (#1251) (8eed80609)
  • End template clones and installs cleanly when they time out (#1246) (79177ee62)
  • Say each compilation issue once, printed and in JSON output (#1248) (43db135ae)
  • Write ready again after a restart, lead browser exits with the fix (#1247) (afd20f59f)
  • Say Warning or Error after the glyph when color is off (#1244) (441a7b27e)
  • Carry coded warnings on a failed build --output json frame (#1234) (dfe0f5382)
  • Hand each dev session its own connectable host (#1243) (74d5d86a9)
  • Watch the public folder in specs the way a dev session does (#1239) (b99d66b35)
  • Refuse a launch when no browser debugging port is free (#1237) (59ef6577a)
  • Build a MAIN world script again when it is written back (#1231) (4d3cd3580)
  • End every dev session when the parent process is gone (#1228) (4edc2f745)
  • Name @types/chrome only when the project itself lists it (#1242) (434467f51)
  • Count the thirty warning codes the W_ prefix moved (#1241) (edc8af4b5)
  • Signal a dev run only once both of its stop listeners are in place (#1236) (b3e4a0eac)
  • Read each dev session's own host and port in its CSP and HMR code (#1240) (42c07d73a)
  • Share one signal listener across the preview sessions of a process (#1224) (ca5030af2)
  • Name a missing public web resource entry as the author wrote it (#1227) (3879d343a)
  • Run the config once when the browser env file changes no name (#1235) (1f6f57c63)
  • Keep rescanning public/ on macOS after a poll lands mid-scan (#1232) (2d8edce9d)
  • Read session files through the one dist path rule in the CLI (#1225) (266790ca8)
  • Say why each pinned row exists without internal numbers (#1233) (f4ae4921f)
  • Read the manifest asset first and report dev manifest changes (#1216) (5512c0c7e)
  • Code build failures from plugins and config hooks, say once (#1218) (a9c19b628)
  • Watch locales and late page files, warn about dead pages once (#1229) (8d9715d26)
  • Write the 4.2.0 release highlights and upgrade notes (#1226) (643458be8)
  • Say a withheld file named by a public stylesheet is not bundled (#1223) (1198875ea)
  • Give 23 more named build diagnostics a code and guard new names (#1213) (a9d5a3920)
  • Read a loader refusal as printed in the loader order rows (#1222) (0481e32c7)
  • Report a ref kept out of the build once, with its twin's code (#1217) (099a3607c)
  • Run the CLI from a function, honor the registry, code each refusal (#1214) (f1805abcd)
  • Lint and typecheck the companion extensions, pin their manifest (#1162) (663a0a2f9)
  • Keep watching a page and its files while the build has errors (#1219) (2df280afb)
  • Print only the message when a loader refuses a named error (#1215) (89bf7f0bc)
  • Write the build at the named root when no package.json owns it (#1212) (641150ef9)
  • Load chunks with the extension loader in every sessionless build (#1202) (f4d9178d9)
  • Leave unserved web resource entries out of the built manifest (#1203) (4dd423353)
  • Report the code that ended a dev session on --wait (#1207) (62baa3c40)
  • Retire a waiting content script on reload, fix four entry cases (#1198) (b9c26e1fe)
  • Say a withheld stylesheet file is not bundled under one code (#1206) (c413e425f)
  • Pin that a page file deleted and written back is rebuilt (#1210) (d3370fd5a)
  • Finish the public option types, ready.json type and README tables (#1211) (014d7afdd)
  • Strip layout and machine paths from build diagnostics (#1152) (107c43fc8)
  • Close what a failed production control start left open (#1209) (34e103931)
  • Load a config once per run and keep two projects' env apart (#1208) (646199624)
  • Port exact theme colors for Chromium and code the ones it refuses (#1196) (5b827f45e)
  • Compile a content script entry once, not through two rules (#1199) (7f7377ef6)
  • Move the bundler to rspack 2.3.3 and drop postcss-preset-env (#1205) (7ca387c68)
  • Export only files the published packages ship and check it (#1167) (837d2b81f)
  • See nested, function-test and one-type query user asset rules (#1195) (efda1bf48)
  • Offer the svelte export condition first in a Svelte project (#1192) (240248593)
  • End each dev session with one terminal frame and release it all (#1190) (c542d4af2)
  • Warn when emitted WebAssembly cannot run or is fetched remotely (#1197) (deafe2502)
  • Keep build output, session folders and keys out of both zips (#1171) (50fc51a44)
  • Settle a throwing module config on Node 22.12 with one coded error (#1159) (20f6e27b2)
  • Watch project files directly so macOS dev never misses an edit (#1200) (e9c4fb09a)
  • Watch, prune and link the files a nested page references (#1201) (dcf6b0f5c)
  • Move reload state and Safari reload trims to the reload plugin (#1164) (350ac00fe)
  • Use the dev build cache, rebuild on a late file, tidy the config (#1161) (e5f15e8a3)
  • Contain inlined CSS imports and resolve CSS tools from the project (#1194) (fb22b5141)
  • Refuse a build engine of another version than the CLI (#1189) (8305ef024)
  • Count the warnings and errors of a compile, print the line last (#1168) (e4be881b6)
  • Leave private files out of what a page, icon or script entry ships (#1182) (b3172eede)
  • Finish the package manager findings in create (#1188) (b5e7ffc02)
  • Keep launcher stamps on their run and finish the launcher findings (#1187) (7ba8b8478)
  • Fill only public env names into emitted JSON and HTML (#1186) (861ec0134)
  • Warn when a Firefox build or dev session has no add-on ID (#1193) (64e4550c1)
  • Move the corpus and templates pins, check declarations on publish (#1154) (02f2b6f60)
  • Run user loaders before the wrapper, explain top-level await (#1176) (908c3012d)
  • Let perfBudgets.onExceed turn a budget overrun into a failed build (#1158) (744ea9692)
  • Remove the wasm plugin and its aliases, merge the asset rules (#1173) (290c3a7f7)
  • Test the CSS plugin on real compiles, fix dead url() in watch (#1170) (4f6276a95)
  • Run the Windows develop suite as two shards to halve the CI wait (#1191) (11849d91e)
  • Run the stack guard before rspack loads and fix the public entries (#1146) (7b80710a9)
  • Write nested manifest.json files in dev, leave copied files alone (#1169) (f37ae30e5)
  • Move the templates pin to where the owner declares Firefox data (#1184) (9875c9faf)
  • Name the Firefox background the build moves off a service worker (#1179) (31a2e51b2)
  • Probe a port with a free neighbor in the host-aware port row (#1185) (e82da8b0f)
  • Check the CLI calls into the build engine against its real types (#1166) (02da64746)
  • Ask a slow package manager its version twice, warn when unset (#1165) (2eb64b479)
  • Share one ready.json path and held start rule across both writers (#1163) (0e62dbf7c)
  • Generate the process module per build with public env values (#1160) (f3fb4c438)
  • Settle loopback fixtures before the watch so no late rebuild lands (#1180) (f6f63b730)
  • Keep private files and outside paths out of the build (#1178) (bddde0056)
  • Treat every file as a module in the tsconfig the build writes (#1174) (04a60178f)
  • Pick a verified run of free ports in the debug port claim test (#1175) (a7146300d)
  • Let a host forget an ended dev session run (#1177) (8fe104bfd)
  • Own the extension chunk loading target in plugin-web-extension (#1157) (7266fb025)
  • Trim duplicate CI work and fix three script exits (#1153) (9e9029fdd)
  • Test the polyfill on real compiles and tidy web resources (#1148) (e5570fd94)
  • Test the special folders plugin on real compiles and temp folders (#1142) (fb254b6c4)
  • Read a content script default export from a parse, not a regex (#1141) (2f9f2d1d8)
  • Parse decorators and test framework plugins on real compilers (#1140) (8ec4f88f9)
  • Test asset and wasm rules on real compiles, leave wasm to rspack (#1135) (ba411fbef)
  • Refuse dev server requests that come from another site (#1147) (a3eb5651a)
  • Drive the browsers plugin specs through a real first compile (#1137) (bd32307d7)
  • Pin how the session contract writer fails and share spec helpers (#1136) (c602174b5)
  • Remove dead companion code and stale root config paths (#1150) (b49e4c6a5)
  • Test the compilation plugin on real compiles, drop dead clean (#1139) (232ae48ef)
  • Load the running mode's env files before the config, code refusals (#1151) (b26633de4)
  • Honor DO_NOT_TRACK and send the resolved browser in telemetry (#1155) (69969afd3)
  • Check every develop build entry at startup and drop the js aliases (#1145) (4b9d488d8)
  • Refuse invalid perf budgets, name the applied budget, cap the list (#1143) (c74a2d5d7)
  • Test the reload plugin on a real compiler with no module mocks (#1138) (283108ae4)
  • Rework the extension CLI specs and fix the launcher teardown (#1144) (bd78f0ba3)
  • Skip Safari on the published corpus reading of a stable (#1130) (2b7360575)
  • Code missing-file findings and hide loader paths in build output (#1133) (cf3cce861)
  • Remove a dead plugin filter in build and an uncalled message (#1132) (c9757cb54)
  • Install only with the project's own manager and name each refusal (#1131) (404b13155)
  • Install shared optional packages once, capture development output (#1129) (dba8f06cd)
  • Retry the project install while the registry lands a new release (#1128) (908106456)
  • Lock, time out and own browser installs, add five install codes (#1127) (b1beb45c8)
  • Retry template downloads, clean failed creates, test real paths (#1126) (5d9790442)
  • Remove dead code and dev dependencies, let canaries skip readings (#1122) (4d87d9739)
  • Pin the corpus gate to the runner that shows passing-cell warnings (#1125) (df6e677d8)
  • Say a PostCSS finding once and keep building as the warning says (#1124) (a2360dfb7)
  • List a font only where it is loaded, hold ready until launch (#1123) (cbba8d02d)
  • Build the same bytes through a symlink, keep silent builds quiet (#1118) (c759813cb)
  • Ship and load what injected sheets and running code ask for (#1117) (2a77364ad)
  • Give each session started at the same moment its own debug port (#1120) (304dc2f7d)
  • Restart a dev session when a folder file goes, clear gone outputs (#1119) (ff0533cee)
  • Print a built path whole when the command runs from the root (#1115) (a7c57e3ba)
  • Find an extension page tab by its context when tab URLs are hidden (#1114) (8a365ee85)
  • Report a browser load refusal the same way on every command (#1113) (ce1832732)
  • Ship what a service worker imports lazily inside the worker file (#1112) (f80fcb048)
  • Write tsconfig.json and its type file together on the first build (#1111) (82f9a0e6b)
  • Restart the dev session when a script moves to another key (#1110) (dafb2e6c2)
  • Keep the dev CSP valid when it adds sources to a 'none' directive (#1109) (8020d259e)
  • Build the same bytes from any CLI install path or project path (#1108) (4aecd070d)
  • Keep a page at its authored path when a script holds that path (#1106) (1e6c15abd)
  • Link the options dialog floor as a file so a strict CSP allows it (#1105) (7567094f8)
  • Answer act verbs with the load refusal the session recorded (#1104) (f2af69666)
  • Scaffold a tsconfig only for TypeScript the build compiles (#1102) (018d3cdc1)
  • Reach a Firefox background page by the path the manifest names (#1101) (82f615b12)
  • Ship files a script names as a plain string, past regex slashes (#1099) (1207757b1)
  • Read manifest comments as the browsers do and emit plain JSON (#1098) (baac6c5cd)
  • Skip the project install when EXTENSION_SKIP_INSTALL is set (#1100) (6b6c7cee8)
  • Pin the corpus head that adds real extensions and a runner (#1097) (2f54e8fde)
  • Show the version a managed Firefox reports in doctor (#1096) (465f3b331)
  • Pin the templates gate to the head that type-checks templates (#1095) (4bdbee535)
  • Say what Safari draws for icon_variants in the build notice (#1094) (dfe89538f)

Validated before publishing: extension@4.1.42-canary.470.20ab091, cut from the same commit, built every buildable sample of extension-js/corpus on Chrome, Firefox, Edge and Safari, and passed the extension-js/templates suite (run).