Repository navigation
Conversation
Contributor
size-limit report 📦Compared: 7774bea (PR test merge using develop at b6a61d7) Against: f2ee787 (develop) · base run #65001
|
Contributor
Optional E2E testsAll optional checks were successful. 3 successful. See the run. Successful checks
|
The regex rewrite broke on nested arrays and on a `]` inside a string. It skipped a whole file once `wrapMiddlewaresWithSentry` appeared anywhere in it, and it found start files by `start` in the file path. Wrapped files also lost their source maps. The plugin now finds middleware arrays in the AST, skips each wrapped site on its own, and returns a source map. A start file is any file that calls `createStart()`.
timfish
force-pushed
the
ref/tanstackstart-call-site-rewriter
branch
from
November 4, 2026 14:23
51b3096 to
a13330c
Compare
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.
Why: The regex rewrite broke on nested arrays and on a
]inside a string. It skipped the whole file oncewrapMiddlewaresWithSentryappeared anywhere in it, it found start files bystartin the file path, and the rewritten files had no source maps. The plugin now finds middleware arrays in the AST, skips each wrapped site on its own, and returns a source map. A start file is now any file that callscreateStart(), and the plugin only wrapsrequestMiddlewareandfunctionMiddlewareinside that call. The warning text is unchanged.How to review:
src/vite/autoInstrumentMiddleware.ts, then the new test cases.Unsure about: A middleware array followed by
as constis not wrapped, and the plugin gives no warning for it.Ref #25776