Repository navigation
fix(v10/cloudflare): auto-instrument when wrangler main is a package - #25430
Merged
Merged
Conversation
Contributor
size-limit report 📦
|
nicohrubec
marked this pull request as ready for review
October 16, 2026 09:13
nicohrubec
requested review from
JPeer264 and
mydea
and removed request for
a team
October 16, 2026 09:13
nicohrubec
marked this pull request as draft
October 16, 2026 09:13
nicohrubec
approved these changes
Oct 16, 2026
nicohrubec
marked this pull request as ready for review
October 16, 2026 09:23
nicohrubec
enabled auto-merge (squash)
October 16, 2026 09:23
…specifier wraps it
A specifier like `export { Impl as MyDO }` pointing at an `export class Impl` renamed the
class in place without stripping `export`, leaking `__SENTRY_ORIGINAL_Impl__` as a public
export and dropping `Impl`. With the specifier before the class, the class could also be
wrapped twice into duplicate bindings.
Declaration exports are now handled before specifier exports, and an `export class` left
unwrapped by its own export gets a wrapper bound right after the class that the specifier is
re-pointed at.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ce0ad9f. Configure here.
…es as auto-wrapped
A WorkerEntrypoint wrapped in place and exported via `export { Foo as default }` was never
recorded under the default export, so same-worker bindings targeting the default entrypoint
were left out of `rpcTracePropagationBindings`. Record `default` specifiers as the default
export on every class-specifier path.
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.

Backport of: #25343
Differences to the original PR
packages/cloudflare/src/vite/transform.ts: on v10, a local class already wrapped by a named export keeps its binding (which now points at the wrapped class), soexport { Foo as default }stays as written instead of being re-pointed at a wrapper name.packages/cloudflare/src/vite/autoInstrument.ts, tests and thecloudflare-autoinstrument-package-entrye2e app: small adjustments to fit v10's code layout.Heads-up: this conflicts with #25407 (backport of #25345) in
packages/cloudflare/src/vite/transform.tsand its test. Whichever lands second needs a rebase.This branch was prepared by the v10 backport automation, which was blocked at PR creation; it's opened manually now.
via Jan Peer Stöcklmair.
--
View Junior Session in Sentry