Repository navigation
Conversation
Contributor
size-limit report 📦Compared: ba12f86 (PR test merge using develop at 1c10c6f) Against: 1c10c6f (develop) · base run #68574 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 61 successful. See the run.
Successful checks
|
timfish
marked this pull request as ready for review
December 2, 2026 12:48
javascript-sdk-gitflow
Bot
requested review from
andreiborza,
isaacs and
maxcell
December 2, 2026 12:48
Rules now record edits on the state and no longer write to a MagicString. The rewriter checks the edits of each rule and drops a rule that throws or whose edits overlap those of an earlier rule. Rules also get the plugin context, and can match on the Vite environment, a source pattern and an id exclude pattern.
timfish
force-pushed
the
feat/bundler-plugins-rule-api
branch
from
December 2, 2026 14:41
1b74d5b to
2cfd6af
Compare
Collaborator
Author
|
@sentry-junior review |
Contributor
There was a problem hiding this comment.
No findings.
For the human reviewer
- A throwing
cloudflare-worker-entryrule now ships an uninstrumented worker with a console warning instead of failing the build. Is that wanted? (Product behavior trade-off.) - Should a dropped-rule warning go to
ctx.plugin.warnwhen nologgeris set, instead ofconsole? Cloudflare passes no logger. (Option shape.)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of phase 2 of the call-site rewriter (#25776), which moves every per-module Sentry transform into one pass.
Rules no longer write to a shared MagicString. They record edits on the state (
insert,replace,remove,prepend,append), and the rewriter applies them once after all rules ran. MagicString drops an insert without an error when a lateroverwritecovers it, so two rules on one module could break each other without a sign. With a list, the rewriter can check each rule's edits before it applies anything.Rules also get the bundler's plugin context as
ctx.plugin, andincludecan match on the Vite environment, a regular expression on the source, and an id exclude pattern. No rule uses these yet. The SDK rules move to them in later PRs.Behaviour changes:
state.msis gone, so the Cloudflare transform and the TanStack Start standalone wrapper change by a few lines. The expectations of the existing rewriter, Cloudflare, SvelteKit and TanStack Start tests are unchanged.