feat(react-router): Align options with shared build time options type#18014
feat(react-router): Align options with shared build time options type#18014
Conversation
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
3a7fa72 to
b3d44be
Compare
There was a problem hiding this comment.
The changes in this file are basically just a back-port of the changes in the bundler-plugin type.
getsentry/sentry-javascript-bundler-plugins@main/packages/bundler-plugin-core/src/types.ts
| } | ||
| // delete sourcemaps after upload | ||
| let updatedFilesToDeleteAfterUpload = sourceMapsUploadOptions?.filesToDeleteAfterUpload; | ||
| let updatedFilesToDeleteAfterUpload = await sourcemaps?.filesToDeleteAfterUpload; |
There was a problem hiding this comment.
As this can be a Promise when coming from the unstable_... option: getsentry/sentry-javascript-bundler-plugins@4255012
JPeer264
left a comment
There was a problem hiding this comment.
I am a little late to the party. I leave this here for the record
| ...sentryConfig.sourcemaps, | ||
| ...sourceMapsUploadOptions, | ||
| // eslint-disable-next-line deprecation/deprecation | ||
| disable: sourceMapsUploadOptions?.enabled === false ? true : sentryConfig.sourcemaps?.disable, |
There was a problem hiding this comment.
l: following would do the same and is a little shorter
| disable: sourceMapsUploadOptions?.enabled === false ? true : sentryConfig.sourcemaps?.disable, | |
| disable: sourceMapsUploadOptions?.enabled === false || sentryConfig.sourcemaps?.disable, |
|
|
||
| it('should start a span for data requests with active root span', async () => { | ||
| vi.spyOn(Util, 'isDataRequest').mockReturnValue(true); | ||
| // @ts-expect-error MockSpan just for testing |
There was a problem hiding this comment.
l: you could use new SentryCore.SentryNonRecordingSpan({ traceId: '1', spanId: '2' }) instead, then you can get rid of the ts-expect-error. But for that you need too adapt the mocking:
vi.mock('@sentry/core', async (importOriginal) => {
return {
...(await importOriginal()),
getActiveSpan: vi.fn(),
...
};
});
closes #17066
Also updates the shared
BuildTimeOptionsBasetype a bit to align with the latest changes.