fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

fix(sveltekit): Add import attribute for node exports - #16528

Merged
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop
Jun 11, 2025
Merged

fix(sveltekit): Add import attribute for node exports#16528
Lms24 merged 10 commits into
getsentry:developfrom
teemingc:develop

Conversation

@teemingc

Copy link
Copy Markdown
Contributor

This PR changes the node export in the package.json file to include an import version (similar to the other exports) to fixsveltejs/kit#13869 . I'm not sure why the import key was left out but it seems to exist under the "module" key already, just that Vite never resolves to that one.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency. This has caused an issue where builds with @sentry/sveltekit were being bundled incorrectly. Adding the import attribute fixes this so that Vite resolves to the ESM build of Sentry.

  • If you've added code that should be tested, please add tests.
    • Not sure if this needs a test. Let me know if I should add one.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
    • Lint passes but I can't seem to get the ember tests to pass locally although I haven't changed anything there

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way. For now though, if this works, let's be pragmatic and merge this in.

(just assigning myself to the PR to indicate that I'm reviewing it)

@teemingc

teemingc commented Jun 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Hey @eltigerchino thanks for fixing this! I started CI to ensure this change doesn't break on older SvelteKit versions.

In SvelteKit, we're now bundling dependencies on the server that specify SvelteKit as a dependency or peerDependency.

hmm so the Sentry SDK is not getting bundled? This will cause issues once we find an OpenTelemetry-compatible way of initializing the Server-side SDK (import-in-the-middle cannot be bundled). I wonder if we'll need to work around this by removing the peer dependency on SvelteKit in some way.

The @sentry/sveltekit dep is bundled because of that peerDependency on @sveltejs/kit. Is it using any of kit’s exports? Meanwhile, @sentry/node and @sentry/core are not bundled because they have no peerDependency on kit. Are those what you mean by the SDK?

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

Ah sorry, I misstyped -- ignore the "not" in my previous reply 🤦‍♂️ (as in, I'm concerned about the SDK getting bundled instead of not bundled). However, if it'll only bundle @sentry/sveltekit but stop at the border where we import @sentry/node we should be good 🤞

it using any of kit’s exports?

Yes:

  • We import { navigating, page } from '$app/stores'; in our client side routing instrumentation (we need a way to listen to routing changes on the client, see here)
  • we dynamically import kit to get the VERSION on the server-side (see here).
  • various type exports (which should be fine?)

I didn't merge this PR yet btw because for some reason, our SvelteKit<>Cloudflare e2e test app is failing with this change. Currently investigating what could be causing this. I suspect some kind of collision with the worker export 🤔

(sorry that this is taking so long, this day was really busy on our end)

@Lms24

Lms24 commented Jun 10, 2025

Copy link
Copy Markdown
Member

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit. It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

@teemingc

teemingc commented Jun 11, 2025

Copy link
Copy Markdown
ContributorAuthor

@eltigerchino I re-bumped the kit versions in this PR, since we first pinned them to 2.21.2 in #16529 to unblock our repo and debugged the failing cloudflare test a bit.

Thank you!

It seems like, since we're now bundling @sentry/sveltekit, we also pull in our build time exports (basically everything around the sentrySvelteKit vite plugin) into the server runtime code.

More specifically, I can now find a chunk called .svelte-kit/output/server/chunks/sourceMaps.js. This chunk contains parts of the server SDK but also this:

import "@sentry/vite-plugin";

which we never import in runtime code but only our vite plugin code:

import{sentryVitePlugin}from'@sentry/vite-plugin';

any idea how we can keep this out of the newly bundled way? I'm kinda getting NextJS flashbacks here, where all of a sudden our webpack plugin also ended up in runtime code causing this issue. Back then, we had to work around this with a dynamic import of the plugin which caused a million of other issues. Really hoping we could avoid this here 😅

I've added "sideEffects": "false" to the Kit package.json which is also present in the sentry core and node package.json files. I've also skimmed through the sentry/sveltekit code and there are indeed no side-effects so this should be safe. The dead code is now eliminated correctly during bundling.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nice, thanks for fixing the last test! CI seems to pass now. I just made a couple of cleanup changes but once everything is ready I'll merge it and see that we cut an SDK release today.

Thanks for fixing this -- really appreciate it!

@Lms24
Lms24 merged commit f56cc3e into getsentry:developJun 11, 2025
Lms24 added a commit that referenced this pull request Jun 11, 2025
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16528
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
@tehnrd

Copy link
Copy Markdown

I think this change may have introduced a memory leak. Mentioning issue #16674 here to keep it all link together.

mergifyBot added a commit to reisene/HulajDusza-serwis that referenced this pull request Jul 7, 2025
![snyk-io[bot]](https://badgen.net/badge/icon/snyk-io%5Bbot%5D/green?label=)
![Contributor](https://badgen.net/badge/icon/Contributor/000000?label=)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)
<h3>Snyk has created this PR to upgrade @sentry/browser from 9.26.0 to
9.28.1.</h3>
:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>
- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **22 days ago**.
#### Issues fixed by the recommended upgrade:
| | Issue | Score | Exploit Maturity |
:-------------------------:|:-------------------------|:-------------------------|:-------------------------
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
![low
severity](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests//severity-low.svg
'low severity') | Regular Expression Denial of Service
(ReDoS)<br/>[SNYK-JS-BRACEEXPANSION-9789073](https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073)
| **57** | Proof of Concept
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@sentry/browser</b></summary>
<ul>
<li>
<b>9.28.1</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.1">2025-06-11</a></br><ul>
<li>feat(deps): Bump @ sentry/cli from 2.45.0 to 2.46.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16516"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16516/hovercard">#16516</a>)</li>
<li>fix(nextjs): Avoid tracing calls to symbolication server on dev (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16533"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16533/hovercard">#16533</a>)</li>
<li>fix(sveltekit): Add import attribute for node exports (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16528"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16528/hovercard">#16528</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/eltigerchino/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/eltigerchino">@ eltigerchino</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.28.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.28.0">2025-06-10</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>feat(nestjs): Stop creating spans for
<code>TracingInterceptor</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16501"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16501/hovercard">#16501</a>)</strong></li>
</ul>
<p>With this change we stop creating spans for
<code>TracingInterceptor</code> as this interceptor only serves as an
internal helper and adds noise for the user.</p>
<ul>
<li><strong>feat(node): Update vercel ai spans as per new conventions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16497"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16497/hovercard">#16497</a>)</strong></li>
</ul>
<p>This feature ships updates to the span names and ops to better match
OpenTelemetry. This should make them more easily accessible to the new
agents module view we are building.</p>
<h3>Other Changes</h3>
<ul>
<li>fix(sveltekit): Export <code>vercelAIIntegration</code> from <code>@
sentry/node</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16496"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16496/hovercard">#16496</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/agrattan0820/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/agrattan0820">@ agrattan0820</a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.9 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.27.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.27.0">2025-06-05</a></br><ul>
<li>feat(node): Expand how vercel ai input/outputs can be set (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16455"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16455/hovercard">#16455</a>)</li>
<li>feat(node): Switch to new semantic conventions for Vercel AI (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16476"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16476/hovercard">#16476</a>)</li>
<li>feat(react-router): Add component annotation plugin (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16472"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16472/hovercard">#16472</a>)</li>
<li>feat(react-router): Export wrappers for server loaders and actions
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16481"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16481/hovercard">#16481</a>)</li>
<li>fix(browser): Ignore unrealistically long INP values (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16484/hovercard">#16484</a>)</li>
<li>fix(react-router): Conditionally add <code>ReactRouterServer</code>
integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16470"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16470/hovercard">#16470</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.46 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.68 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.94 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.77 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.41 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.69 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.27 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.63 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.66 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.99 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.72 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.25 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.03 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.75 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
<li>
<b>9.26.0</b> - <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.26.0">2025-06-04</a></br><ul>
<li>feat(react-router): Re-export functions from <code>@
sentry/react</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16465"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16465/hovercard">#16465</a>)</li>
<li>fix(nextjs): Skip re instrumentating on generate phase of
experimental build mode (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16410"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16410/hovercard">#16410</a>)</li>
<li>fix(node): Ensure adding sentry-trace and baggage headers via
SentryHttpInstrumentation doesn't crash (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/16473"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/16473/hovercard">#16473</a>)</li>
</ul>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser</td>
<td>23.43 KB</td>
</tr>
<tr>
<td>@ sentry/browser - with treeshaking flags</td>
<td>23.2 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing)</td>
<td>37.44 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay)</td>
<td>74.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking
flags</td>
<td>67.96 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td>
<td>79.33 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td>
<td>91.13 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. Feedback)</td>
<td>39.78 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. sendFeedback)</td>
<td>28.03 KB</td>
</tr>
<tr>
<td>@ sentry/browser (incl. FeedbackAsync)</td>
<td>32.8 KB</td>
</tr>
<tr>
<td>@ sentry/react</td>
<td>25.15 KB</td>
</tr>
<tr>
<td>@ sentry/react (incl. Tracing)</td>
<td>39.39 KB</td>
</tr>
<tr>
<td>@ sentry/vue</td>
<td>27.67 KB</td>
</tr>
<tr>
<td>@ sentry/vue (incl. Tracing)</td>
<td>39.24 KB</td>
</tr>
<tr>
<td>@ sentry/svelte</td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.88 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.62 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.64 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>77.93 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>72.67 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.4 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>222.7 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>235.22 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs (client)</td>
<td>41.02 KB</td>
</tr>
<tr>
<td>@ sentry/sveltekit (client)</td>
<td>37.93 KB</td>
</tr>
<tr>
<td>@ sentry/node</td>
<td>146.56 KB</td>
</tr>
<tr>
<td>@ sentry/node - without tracing</td>
<td>96.03 KB</td>
</tr>
<tr>
<td>@ sentry/aws-serverless</td>
<td>121.19 KB</td>
</tr>
</tbody>
</table>
</li>
</ul>
from <a
href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
</details>
</details>
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._
**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMWI4Yjc0Yy0xNjRjLTRkNGItYWMwZi1kYzA4NzIxNTA4MTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAxYjhiNzRjLTE2NGMtNGQ0Yi1hYzBmLWRjMDg3MjE1MDgxMCJ9fQ=="
width="0" height="0"/>
> - 🧐 [View latest project
report](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github-cloud-app&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.26.0","to":"9.28.1"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"prId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","prPublicId":"01b8b74c-164c-4d4b-ac0f-dc0872150810","packageManager":"npm","priorityScoreList":[57],"projectPublicId":"55e114f8-489e-4f14-b900-20574b041e59","projectUrl":"https://app.snyk.io/org/reisene/project/55e114f8-489e-4f14-b900-20574b041e59?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2025-06-11T09:13:17.691Z"},"vulns":["SNYK-JS-BRACEEXPANSION-9789073","SNYK-JS-BRACEEXPANSION-9789073"]}'
## Podsumowanie od Sourcery
Aktualizacja @sentry/browser do wersji 9.28.1 w celu usunięcia luk w
zabezpieczeniach i utrzymania aktualności zależności.
Poprawki błędów:
- Załatanie luki Regular Expression Denial of Service w brace-expansion
(SNYK-JS-BRACEEXPANSION)
Prace porządkowe:
- Podniesienie wersji @sentry/browser z 9.26.0 do 9.28.1
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Upgrade @sentry/browser to version 9.28.1 to address security
vulnerabilities and keep dependencies up to date.
Bug Fixes:
- Patch Regular Expression Denial of Service vulnerability in
brace-expansion (SNYK-JS-BRACEEXPANSION)
Chores:
- Bump @sentry/browser from 9.26.0 to 9.28.1
</details>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@teemingc@Lms24@tehnrd