-
Notifications
You must be signed in to change notification settings - Fork 507
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
(deps): upgrade to Jest 25 #679
Conversation
Make it 26 now? 😅 |
@Bnaya other than Jest 26 having more breaking changes, it also requires TS 3.8. TS 3.8 private fields break Rest assured, I have my eyes on the deps and how they break TSDX's users' code. |
@agilgur5, I am porting over a significant monorepo to TSDX. Getting the packages to compile was fairly straight forward, however many of the tests are failing because TSDX is using Jest v24.9.0. My original monorepo is using Jest v26.1.0 and runs successfully, thanks to various bug fixes in Jest. I read your comment about TSDX's dependency on rollup-plugin-typescript2 which is holding up the upgrade to Jest. What workaround would you recommend in my case? TIA. |
@nareshbhatia if you need Jest 26, you don't need to wait for TSDX to upgrade to it. You don't need to use |
Turns out that even after upgrading to Jest 26 and running jest directly, those errors would not go away. Here are the specific errors:
From everything I read, Jest 26 now includes jsdom 16 which fixes these errors. All I can think of is somehow the correct version of jsdom is not being picked up. Finally I installed jest-environment-jsdom-sixteen and forced it via
This made all the tests pass. This works even with |
Yea that's weird. Maybe Jest's auto-import capabilities glitched out with two versions of Jest/JSDOM installed. I know there have been issues with it before but I believe Node's algorithm should choose the closest one by default (which should be the one the Jest version you use specifies).
Yea this one specifically was addressed in #724 as well. Good to hear it got resolved one way or another though and that you could still stick to |
- upgrade jest, ts-jest, @types/jest, and jest-watch-typeahead - Jest 25 changes exports so change internal import to handle properly - Jest 25 drops support for Node <8 that doesn't impact us - we only support Node 10+ anyway - Jest 25 upgrades JSDOM from v11 to v15, which is potentially breaking for any users that relied on some older behavior - yarn.lock changed heavily - from a look-over, many are from babel-jest (which is included with Jest) upgrading its Babel deps, some from istanbul for coverage, and lots of other transitive deps I can't really tell from a glance
This comment has been minimized.
This comment has been minimized.
#678 has been merged so rebased everything in and tests are passing. Merging as getting ready to release v0.14.0 now that v0.13.3 has been released |
Checked what all the deprecation warnings on a fresh install of npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. // [email protected] ... [email protected]
npm WARN deprecated [email protected]: use String.prototype.padStart() // [email protected] ... [email protected]
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 // // [email protected] ... [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 // [email protected] ... [email protected]
npm WARN deprecated [email protected]: this library is no longer supported // [email protected] ... [email protected] ... [email protected] |
- upgrade jest, ts-jest, @types/jest, and jest-watch-typeahead - Jest 25 changes exports so change internal import to handle properly - Jest 25 drops support for Node <8 that doesn't impact us - we only support Node 10+ anyway - Jest 25 upgrades JSDOM from v11 to v15, which is potentially breaking for any users that relied on some older behavior - yarn.lock changed heavily - from a look-over, many are from babel-jest (which is included with Jest) upgrading its Babel deps, some from istanbul for coverage, and lots of other transitive deps I can't really tell from a glance
I can confirm this workaround from @nareshbhatia fixes the issue for me as well. I was having the same problem with |
upgrade jest, ts-jest, @types/jest, and jest-watch-typeahead
Jest 25 drops support for Node <8 that doesn't impact us
Jest 25 upgrades JSDOM from v11 to v15, which is potentially breaking
for any users that relied on some older behavior
yarn.lock changed heavily
Jest) upgrading its Babel deps, some from istanbul for coverage,
and lots of other transitive deps I can't really tell from a glance
Fixes #664
Merges a few Greenkeeper PRs together so all of Jest 25 related deps are done in one step:
Not sure why Greenkeeper didn't make a PR to update Jest itself, it only did the related deps 🤔
This is built on top of #678 , merge that first