Update esbuild from 0.23 to 0.28 - #538
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: WordPress/contributor-toolkit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: WordPress/contributor-toolkit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe package manifest updates the esbuild development dependency range from ^0.23.0 to ^0.28.2. It also changes the allowed install-script version from esbuild@0.23.1 to esbuild@0.28.2. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The dependency update affects development-time renderer tooling, while shipped builds consume generated output. No merge-blocking risk is established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
The renderer bundler moves five minors. Nothing in the flags the build scripts pass changed meaning across them; the behaviour changes that do apply are dev-only: watch mode now deletes the bundle when a rebuild fails, and the esbuild binary itself needs macOS 12 or newer on the machine that builds. The allowScripts key follows the version, as it is keyed by name@version. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
d8d0eed to
fae8652
Compare
Why
esbuild, the renderer bundler, was five minors behind at 0.23. It is a dev-only tool with the smallest surface of the majors
npm outdatedlists after #537, so it goes first: one flag set in two scripts, and the bundle it produces is exercised by every journey.What changes
The
esbuildrange moves from^0.23.0to^0.28.2, and theallowScriptskey follows, since it is keyed by exact version. The lockfile diff is esbuild and its@esbuild/*platform packages only. No flag inbuild:onceorbuild:watchchanges.Of the behaviour changes between 0.23 and 0.28, two apply to this repository and both are dev-only:
npm start, saving a syntax error insrc/renderer/index.jsxnow removessrc/renderer/index.jsuntil the next successful save, instead of leaving the last good bundle in place. A reload of the running window in that state shows a blank page rather than stale code, which is the more honest failure.Not in this PR: the other majors from the list (electron-store, diff, concurrently, Electron 44, ESLint 10, the WordPress components jump). Each is its own PR.
How to test this
Platforms: any. There is no user-visible surface. The proof is the bundle building and the app running on it.
From the repository root:
Expected: the build reports
src/renderer/index.jsandindex.csswritten, and all 33 journeys pass. The journeys drive the built bundle through every flow the app has, including the terminal panel, so a bundle that esbuild 0.28 produced differently would fail there.To see the one dev-visible change: run
npm start, save a deliberate syntax error intosrc/renderer/index.jsx, and confirm the watcher reports the error andsrc/renderer/index.jsis gone; fix the error and confirm it comes back.What must not have happened:
@esbuild/*changing in the lockfile.Risks and limitations
npm startand then reloads the window mid-edit. It cannot break a build or a user.Related
Follow-up to #537, first of the majors listed there.
Design decisions and alternatives considered
Pinning to a specific 0.28.x was considered and rejected: the repository already uses a caret range for esbuild, and the lockfile pins the resolution. Adding an esbuild config file instead of CLI flags was not needed; nothing in the flag set is affected by the upgrade.
Review outcome (required — see AGENTS.md)
0 [fix here] · 1 [follow-up] — the follow-up is recorded here and not acted on in this PR.
.github/instructions/code-review.instructions.md; reviewed head d8d0eed / base 9d2bc17 (trunk); outcome: 1 finding.[follow-up],src/main.js:563: the main window loadsindex.htmlwith nodid-fail-loadhandling, so a reload while watch mode has deleted the bundle paints an empty page with no message. Pre-existing; this bump only adds a second way to reach it, and only in the dev loop. Deferred because it is not something the bundler change should fix and cannot reach a packaged build, where the smoke test asserts the bundle is present.98a7e545-8511-49d3-bc3e-3fef4f7c3fe7, reviewed head d8d0eed / base 9d2bc17; no actionable comments. It reviewedpackage.jsononly:package-lock.jsonis excluded by its path filter, so the lockfile is covered by the fresh-context review above.--version; macOS refused it with system error -88 (EBADMACHO, a malformed executable). The journeys and packaged-smoke jobs on the same commit and the samemacos-26-arm64image ran the identicalnpm ciand passed, and the re-run passed, so this was a corrupted download or extraction on that one runner, not the 0.28 binary. If it recurs, it is worth an upstream issue: 0.28's new integrity check covers only the fallback download path, not the npm optional-dependency path that CI takes.Implementation notes
npm run lintclean;npm test1674 pass, 2 skipped;npm run test:electron1676 pass;npm run test:e2e33 passed;build:oncewrites a 2.9 MBindex.jsand a 105 KBindex.css.--serve), BigInt transforms and--drop:console(not used), the text loader stripping a BOM (notextloader), the binary loader usingUint8Array.fromBase64(nobinaryloader), and the 0.28 integrity check on the fallback binary download ininstall.js(only reached when the platform package is missing).Screenshots or recording
Nothing on screen changes.
🤖 Generated with Claude Code