-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat!: Bump typescript to ~5.0.0
#14758
Conversation
size-limit report 📦
|
b894c53
to
0b9bfdc
Compare
@@ -444,7 +444,8 @@ describe('markFunctionWrapped', () => { | |||
const wrappedFunc = jest.fn(); | |||
markFunctionWrapped(wrappedFunc, originalFunc); | |||
|
|||
expect((wrappedFunc as WrappedFunction).__sentry_original__).toBe(originalFunc); | |||
// cannot wrap because it is frozen, but we do not error! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, why did this test pass before? 😅 some ts bug or so? The new behavior is def. the actual expected behavior!
0b9bfdc
to
042c25d
Compare
CpuProfilerBindings.startProfiling(name); | ||
await fn(); | ||
return CpuProfilerBindings.stopProfiling(name, format); | ||
return CpuProfilerBindings.stopProfiling(name, ProfileFormat.THREAD); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This started complaining in TS, no idea why. I fixed it by just inlining the one place that we used a different format.
ad2f77c
to
080fc65
Compare
@@ -53,6 +53,8 @@ In preparation for the OpenTelemetry SDK v2, which will raise the minimum requir | |||
|
|||
Additionally, like the OpenTelemetry SDK, the Sentry JavaScript SDK will follow [DefinitelyType's version support policy](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) which has a support time frame of 2 years for any released version of TypeScript. | |||
|
|||
Older Typescript versions _may_ still work, but we will not test them anymore and no more guarantees apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this note, not 100% sure if this makes sense? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that feels reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No hard opinions but personally if a sentence effectively says nothing, which is the case for this one I believe, I would not write it down.
@@ -158,7 +158,7 @@ export function getLocationHref(): string { | |||
*/ | |||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |||
export function getDomElement<E = any>(selector: string): E | null { | |||
if (WINDOW.document && WINDOW.document.querySelector) { | |||
if (WINDOW.document && 'querySelector' in WINDOW.document) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this complains about being deprecated, which is really stupid 😬 I wonder if we need this check at all anymore 🤔 but probably...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://caniuse.com/queryselector seems to be supported in all the environments we say we support, I think it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove/deprecate this in a separate PR!
@@ -53,6 +53,8 @@ In preparation for the OpenTelemetry SDK v2, which will raise the minimum requir | |||
|
|||
Additionally, like the OpenTelemetry SDK, the Sentry JavaScript SDK will follow [DefinitelyType's version support policy](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) which has a support time frame of 2 years for any released version of TypeScript. | |||
|
|||
Older Typescript versions _may_ still work, but we will not test them anymore and no more guarantees apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that feels reasonable to me.
I noticed this in #14758, this seems unnecessary and all browsers/envs we support should be able to handle this. We only use this in two places anyhow, so we can just guard there (a bit) for this instead. I will add a deprecation to v8 for this too, although this is just exported from core and will most likely not affect anybody.
080fc65
to
f8d1138
Compare
Closes #14757
For now we keep downleveling to 3.8, as long as that works without problems... we can still remove that in a follow up step.