Skip to content

meta(changelog): Update changelog for 9.15.0 #16162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Apr 29, 2025
Merged

Conversation

chargome
Copy link
Member

No description provided.

github-actions bot and others added 18 commits April 23, 2025 16:27
[Gitflow] Merge master into develop
chore: Improve docstrings for options and add defaults
)

Before submitting a pull request, please take a look at our

[Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md)
guidelines and verify:

- [ X ] If you've added code that should be tested, please add tests.
- [ X ] Ensure your code lints and the test suite passes (`yarn lint`) &
(`yarn test`).
We can get rid of this barrel file.
Exports the `wrapMcpServerWithSentry` which is our MCP server
instrumentation from all the server packages.

Fixes #16111
Adding Node 21 to the accepted version range for `module.register` as it
is already supported (https://nodejs.org/docs/v21.0.0/api/module.html).

This also causes the customization hook not to call register (maybe a
reason why some packages in issue
#14202 are not
instrumented):
https://github.com/getsentry/sentry-javascript/blob/59094afb6ab53ac33b87b83f70eea9d13e4c2291/packages/node/src/sdk/initOtel.ts#L45-L65


--- 
Additionally, the above mentioned issue
#14202 shows the
following warning although it's using v21:
```
[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.
```
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #16106

Co-authored-by: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
…16135)

Extracted out of
#16134

During that refactor, a bunch of stuff failed. The reason for this is
that we relied on a side-effect mock in `use-fake-timers` utility, which
is really not ideal at all.

So this refactors this to instead make this explicit, as a side-effect
import on the top of the test files. Then we can just use
`vi.useFakeTimers()` normally.
Vite 6 is more strict with exports. I changed the `exports` section a
bit to make it compatible.

closes #16120

---------

Co-authored-by: Onur Temizkan <onur@narval.co.uk>
Docs follow-up for this PR:
#14831

---------

Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>
Resolves: #16075

We used to allow rewrapping of the root loader when we had a separate
Express adapter, where we could not determine the instrumentation order.
Now that we don't have it anymore, we can remove this. Still, can't
reproduce the original issue running e2e test apps under load. But it's
clear that's what caused it.
We had a bunch of import/export related eslint rules, but did not
actually apply them to anything 🤦 this PR changes this, and also applies
all the rules to all the files.

The vast majority of the changes is just auto-fixes, but there are a few
small manual things that were needed - these are in separate commits,
it's probably easier to look at them separately!

It also updates prettier to apply to dev-packages.
I was always annoyed that this was not properly highlighted by VSCode,
so I looked into this a bit, and actually refactored it a bit to be more
type-safe in the vitest world we now live in :)

I got rid of `toHaveSentReplay` in favor of simply always using
`toHaveLastSentReplay` (which we already used almost everywhere). I also
moved the type definition into a separate file and ensured it actually
works, at leas tin my vscode/cursor instance. This also kind of surfaced
some type errors that existed in tests, but have not been shown (??) for
whatever reason... no idea what is going on there.
…6158)

Seems like `@shopify/mini-oxygen@3.2.1` breaks something. I somewhat
suspect that they bumped a vite version but I didn't find a changelog
yet

This should unblock the PRs we want to include in Today's release

Update: Shopify/hydrogen#2863 likely caused this
- Closes #16137 

With ESM patching you need to retain the original module and just
overwrite the exports you want to wrap. This usually works for CJS too
but unfortunately, the CJS exports of `ai` only have getters and no
setters so this route is not possible.

This PR changes the patching so that it works slightly differently for
ESM and CJS. The original code that outputs a newly created object is
retained for CJS but for ESM we use the preferred route of replacing the
required exports.

To detect whether the module we're patching is an ES module we check
`Object.prototype.toString.call(moduleExports) === '[object Module]'`
which is documented
[here](https://tc39.es/ecma262/#sec-module-namespace-objects).

This PR also adds an ESM test for `ai`.
@chargome chargome self-assigned this Apr 29, 2025
@chargome chargome requested review from a team as code owners April 29, 2025 14:53
@chargome chargome requested review from mydea, lforst, Lms24 and s1gr1d April 29, 2025 14:53
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.28 KB added added
@sentry/browser - with treeshaking flags 23.1 KB added added
@sentry/browser (incl. Tracing) 36.93 KB added added
@sentry/browser (incl. Tracing, Replay) 74.1 KB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.47 KB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 78.76 KB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 90.58 KB added added
@sentry/browser (incl. Feedback) 39.68 KB added added
@sentry/browser (incl. sendFeedback) 27.9 KB added added
@sentry/browser (incl. FeedbackAsync) 32.67 KB added added
@sentry/react 25.09 KB added added
@sentry/react (incl. Tracing) 38.93 KB added added
@sentry/vue 27.5 KB added added
@sentry/vue (incl. Tracing) 38.69 KB added added
@sentry/svelte 23.31 KB added added
CDN Bundle 24.49 KB added added
CDN Bundle (incl. Tracing) 36.96 KB added added
CDN Bundle (incl. Tracing, Replay) 72 KB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 77.3 KB added added
CDN Bundle - uncompressed 71.5 KB added added
CDN Bundle (incl. Tracing) - uncompressed 109.33 KB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.62 KB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.15 KB added added
@sentry/nextjs (client) 40.51 KB added added
@sentry/sveltekit (client) 37.41 KB added added
@sentry/node 143.4 KB added added
@sentry/node - without tracing 96.49 KB added added
@sentry/aws-serverless 120.82 KB added added

@chargome chargome merged commit e57cc0a into master Apr 29, 2025
158 checks passed
@chargome chargome deleted the prepare-release/9.15.0 branch April 29, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants