chore(deps): Downgrade typescript & jest to versions used in sentry-javascript#310
chore(deps): Downgrade typescript & jest to versions used in sentry-javascript#310
Conversation
|
@billyvg maybe you could take a look at the failing test? I am lacking a bit of context on that test (e.g. what exactly the timing of stuff should be etc), so having a hard time debugging this 😅 also the "replacement" for the |
|
I think the |
|
Weird, tests are passing locally for me |
f875718 to
e0eb773
Compare
size-limit report 📦
|
|
Tests seem to be passing now! Had to do some further adjustments for the build as well, but seems all good now. |
billyvg
left a comment
There was a problem hiding this comment.
This looks good to me -- can we separate out removing @jest/globals into its own PR? I would like to have it in its own commit so it's easy to reference/revert down the road.
👍 will do! see: #319 |
We do not use it in sentry-javascript (although it is actually nice! but for ease of transition), so replacing this here. Extracted from: #310
Because the latter is only supported since TS 3.9
b1303e5 to
a969ade
Compare
We do not use it in sentry-javascript (although it is actually nice! but for ease of transition), so replacing this here. Extracted from: getsentry/sentry-replay#310
…avascript (getsentry/sentry-replay#310) For reasons™️ we are stuck with an old version of typescript (3.8) in sentry-javascript. In order to prepare the migration there, this PR downgrades typescript to that version as well. With it, that required some other changes, mainly also downgrading jest, which required adapting some tests... 😢 not ideal, but I tried to make it work with as little changes as possible. The two biggest issues were: * jest 27 does not support `jest.useFakeTimers({ autoAdvance: true })`, so needed to work around that somehow. I tried to replicate this manually * jest 27 does not support `expect.closeTo()`. This was used once, I commented this out for now. Other things: * `@ts-expect-error` is not supported, so instead we use `@ts-ignore` * eslint also needed downgrading * I had issues with `@jest/globals` (which we also don't use in sentry-javascript), so I changed this to use the globals everywhere Co-authored-by: Billy Vong <billyvg@users.noreply.github.com>
For reasons™️ we are stuck with an old version of typescript (3.8) in sentry-javascript.
In order to prepare the migration there, this PR downgrades typescript to that version as well.
With it, that required some other changes, mainly also downgrading jest, which required adapting some tests... 😢 not ideal, but I tried to make it work with as little changes as possible.
The two biggest issues were:
jest.useFakeTimers({ autoAdvance: true }), so needed to work around that somehow. I tried to replicate this manuallyexpect.closeTo(). This was used once, I commented this out for now.Other things:
@ts-expect-erroris not supported, so instead we use@ts-ignore@jest/globals(which we also don't use in sentry-javascript), so I changed this to use the globals everywhere