Conversation
|
This pull request is part of a Mergify stack:
|
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 Required ReviewsWaiting for:
This rule is failing.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
|
@jd this pull request is now in conflict 😩 |
5534e96 to
105e509
Compare
Revision history
|
105e509 to
815ac3c
Compare
There was a problem hiding this comment.
Pull request overview
Refactors the extension content script by splitting the previously monolithic src/mergify.js into focused ES modules and bundling them back into a single MV3-compatible content script via esbuild, while updating Jest to run against the new module structure.
Changes:
- Split core functionality into dedicated modules (
cache,debug,dom,logo,queue,stacks,timestamps) and makesrc/mergify.jsa small orchestrator/re-export hub. - Add an esbuild bundling step in the
Makefileto producedev-build/mergify.js/build/mergify.jsfrom the module graph. - Update Jest configuration to transform ESM-style modules using
@swc/jest, plus dependency updates.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/timestamps.js | Timestamp conversion extracted into a dedicated module. |
| src/stacks.js | Stack/revision context panel + stack nav logic moved into its own module. |
| src/queue.js | Queue state detection, polling, and merge-box UI extracted into a module. |
| src/mergify.js | New orchestrator wiring page observers/injection; re-exports modules for tests. |
| src/logo.js | Logo SVG constants + parsing helper extracted. |
| src/dom.js | DOM utilities and selectors extracted (PR parsing, status reading, etc.). |
| src/debug.js | Debug flag + logger extracted behind window.__MERGIFY_DEBUG__. |
| src/cache.js | Storage-backed caches extracted (MergifyCache, PrStatusCache). |
| src/tests/mergify.test.js | Adjusted a cache-related test to assert no fetch occurs when cached. |
| package.json | Added esbuild, @swc/core, @swc/jest dev dependencies. |
| package-lock.json | Lockfile updates for new tooling dependencies. |
| Makefile | Build now bundles via esbuild instead of copying src/ wholesale. |
| jest.config.js | Added SWC transform so Jest can execute the refactored module code. |
| biome.json | Narrowed/updated Biome include globs for the new layout/tools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…d bundle Splits the monolithic 2500-line src/mergify.js into focused modules (logo, debug, dom, cache, timestamps, queue, stacks) and adds an esbuild step that bundles them back into the single dev-build/mergify.js the Manifest V3 content script declares. No behavior change. Tests use Jest with @swc/jest to handle the ESM imports. src/mergify.js becomes a small orchestrator that wires the MutationObserver, the URL-change reset, and the tryInject loop, and re-exports everything for the test suite (which keeps importing from "../mergify"). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Change-Id: I0ff58889ac6d8adcd60d4f9660d3f2dbf8e006ac
815ac3c to
ce65d4f
Compare
Splits the monolithic 2500-line src/mergify.js into focused modules
(logo, debug, dom, cache, timestamps, queue, stacks) and adds an
esbuild step that bundles them back into the single
dev-build/mergify.js the Manifest V3 content script declares. No
behavior change. Tests use Jest with @swc/jest to handle the ESM
imports.
src/mergify.js becomes a small orchestrator that wires the
MutationObserver, the URL-change reset, and the tryInject loop, and
re-exports everything for the test suite (which keeps importing from
"../mergify").
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com