GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(v10/cloudflare): keep default exports intact when auto-instrumenting by sentry-junior[bot] · Pull Request #25732 · getsentry/sentry-javascript

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Backport of: #25372

Stacked on #25407 (backport of #25345), which touches the same transform. Once #25407 merges, this retargets to v10.

Differences to the original PR

  • packages/cloudflare/test/vite/autoInstrument.test.ts: the four vinext tests (wraps the entry with @sentry/nextjs/cloudflare … and siblings) are left out. They come from feat(cloudflare): Wrap vinext Worker entries with @sentry/nextjs/cloudflare #25000, which isn't on v10. The other expectation updates in that file apply unchanged.
  • Extra fix on top, from a Bugbot review: the original found the end of the export default keywords with lastIndexOf('default') on the text before the expression, so a comment like export default /* default handler */ { ... } moved the overwrite past the keyword and produced invalid syntax. The keyword is now found by skipping whitespace and comments after export. develop still has the original code and needs the same fix.

via Junior system actor event.

--

View Junior Session [Sentry]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sentry-junior @isaacs
fix(v10/cloudflare): keep default exports intact when auto-instrumenting
498856a
Backport of #25372. The vinext-specific tests in autoInstrument.test.ts
are left out because vinext support (#25000) is not on v10.

(cherry picked from commit 6b728c6)

Co-Authored-By: Isaac Schlueter <[email protected]>
@sentry-junior sentry-junior Bot mentioned this pull request Oct 25, 2026
fix(v10/cloudflare): Bind a default re-export with var in the Vite transform #25733
Merged
@github-actions

github-actions Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.28 kB added added
@sentry/browser - with treeshaking flags 26.73 kB added added
@sentry/browser (incl. Tracing) 47.3 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 49.1 kB added added
@sentry/browser (incl. Tracing, Profiling) 52.09 kB added added
@sentry/browser (incl. Tracing, Replay) 86.75 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.38 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 91.46 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 104.08 kB added added
@sentry/browser (incl. Feedback) 45.45 kB added added
@sentry/browser (incl. sendFeedback) 33.09 kB added added
@sentry/browser (incl. FeedbackAsync) 38.21 kB added added
@sentry/browser (incl. Metrics) 29.38 kB added added
@sentry/browser (incl. Logs) 29.61 kB added added
@sentry/browser (incl. Metrics & Logs) 30.3 kB added added
@sentry/react 30.1 kB added added
@sentry/react (incl. Tracing) 49.6 kB added added
@sentry/vue 34.17 kB added added
@sentry/vue (incl. Tracing) 49.68 kB added added
@sentry/svelte 28.31 kB added added
CDN Bundle 30.69 kB added added
CDN Bundle (incl. Tracing) 49.25 kB added added
CDN Bundle (incl. Logs, Metrics) 32.28 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 50.57 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71.75 kB added added
CDN Bundle (incl. Tracing, Replay) 86.99 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.27 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 92.8 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.08 kB added added
CDN Bundle - uncompressed 91.2 kB added added
CDN Bundle (incl. Tracing) - uncompressed 148.46 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 95.91 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.44 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 221.4 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 268.43 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272.39 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 282.13 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.08 kB added added
@sentry/nextjs (client) 52.25 kB added added
@sentry/sveltekit (client) 47.75 kB added added
@sentry/core/server 81.66 kB added added
@sentry/core/browser 67.73 kB added added
@sentry/node-core 64.1 kB added added
@sentry/node 127.28 kB added added
@sentry/node (incl. diagnostics channel injection) 171.48 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B added added
@sentry/node/light 52.19 kB added added
@sentry/node - without tracing 75.89 kB added added
@sentry/aws-serverless 85.04 kB added added
@sentry/cloudflare (withSentry) - minified 204.93 kB added added
@sentry/cloudflare (withSentry) 505.2 kB added added
sentry-junior[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@isaacs
isaacs added this pull request to stack #25740 October 25, 2026 22:36
@isaacs
isaacs marked this pull request as ready for review October 25, 2026 22:36
@isaacs
isaacs requested a review from a team as a code owner October 25, 2026 22:36
@isaacs
isaacs requested review from andreiborza and isaacs and removed request for a team October 25, 2026 22:36
cursor[bot]
cursor Bot reviewed Oct 25, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 498856a. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/cloudflare/src/vite/transform.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sentry-junior
fix(v10/cloudflare): Skip comments when locating the default keyword
73375f5
A comment between `export default` and the expression that contained the
word `default` moved the overwrite past the keyword and produced invalid
syntax.
@sentry-junior sentry-junior Bot mentioned this pull request Oct 25, 2026
fix(cloudflare): Skip comments when locating the default keyword in the Vite transform #25741
Merged
@sentry-junior
fix(v10/cloudflare): Scan for the default keyword without a backtra…
cdd7058
…cking regex

CodeQL flagged the comment-skipping regex as prone to exponential
backtracking. A linear scan over whitespace and comments finds the same
offset.
isaacs added a commit that referenced this pull request Oct 26, 2026
@sentry-junior @isaacs
fix(cloudflare): Skip comments when locating the default keyword in…
03e18ae
… the Vite transform (#25741)

The transform found the end of the `export default` keywords with
`lastIndexOf('default')` on the text before the expression. A comment in
that span that contains the word `default`, such as `export default /*
default handler */ { ... }`, moved the overwrite past the keyword and
produced invalid syntax, so the Worker failed to start.

The keyword is now found by matching `export`, then any whitespace or
comments, then `default`, starting at the statement. Acorn only gives an
`ExportDefaultDeclaration` when that sequence is there, so the match
always succeeds.

Cursor Bugbot found this on the v10 backport in #25732, which already
has the same fix.

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Isaac Schlueter <[email protected]>
isaacs
isaacs approved these changes Oct 26, 2026
View reviewed changes
@isaacs
isaacs merged commit 0cde423 into v10 Oct 26, 2026
163 of 166 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@isaacs
isaacs deleted the backport/v10-25372-cloudflare-default-export-intact branch October 26, 2026 15:36
isaacs added a commit that referenced this pull request Oct 26, 2026
@sentry-junior @isaacs
fix(v10/cloudflare): Bind a default re-export with var in the Vite …
31c8b95
…transform (#25733)

Backport of: #25663

Stacked on #25732 (backport of #25372), which is stacked on #25407. Once
those merge, this retargets to `v10`.

The cherry-pick applied cleanly and is identical to the original.

<!-- junior-request-attribution:start -->
via **Isaac Schlueter**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AD0CBUGS556X%3A1792966013.340469 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AD0CBUGS556X%3A1792966013.340469)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0CBUGS556X%3A1792966013.340469/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Isaac Schlueter <[email protected]>
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Oct 27, 2026
publish: getsentry/[email protected] getsentry/publish#10030
Closed
49 of 54 tasks
@Lms24 Lms24 mentioned this pull request Oct 28, 2026
meta(changelog): Update changelog for 10.78.0 #25831
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@isaacs isaacs isaacs approved these changes
@andreiborza andreiborza Awaiting requested review from andreiborza andreiborza is a code owner automatically assigned from getsentry/team-javascript-sdks-server

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@isaacs
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.