Skip to content
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

chore: upgrade internally to jest@28 #3395

Merged
merged 2 commits into from May 31, 2022
Merged

Conversation

noomorph
Copy link
Collaborator

@noomorph noomorph commented May 16, 2022

Description

Maintenance PR.
Upgrades all the sub-projects internally to Jest 28 (fixes #3396)

It has a couple of issues, though:

  1. Error stack traces have changed slightly in Jest 28, so I had to update some expectations in the unit tests related to our error mangling utilities.
  2. There's an issue with dropping redundant @types/jest devDependencies at the moment. Trying to solve it here: chore: drop old @types/jest^27 kulshekhar/ts-jest#3513
  3. There's a weird import glitch for require("yargs/yargs").Parser – created a bug report to Jest: [Bug]: import behavior has been broken for certain cases jestjs/jest#12843

All the issues have been resolved via various workarounds, but this makes me wary about merging this PR soon. I'd wait for some official responses above.

@noomorph noomorph force-pushed the chore/jest-28-upgrade-internally branch from c59df11 to f8baf48 Compare May 16, 2022 10:10
@noomorph noomorph force-pushed the chore/jest-28-upgrade-internally branch from f8baf48 to c22795a Compare May 16, 2022 16:58
@@ -1,6 +1,6 @@
// @ts-nocheck
const _ = require('lodash');
const parse = require('yargs/yargs').Parser;
const parse = require('yargs-parser');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noomorph so in fact, this should unbind us from the known Jest hacks related to yargs? Does this work with jest 27 ( - I think is the most important question here)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works "gam ve gam".
P. S. I'll reiterate: Jest has no hacks for yargs. I just see that Jest fails on a specific re-export, that's why here I'm using a direct reference and omitting that glitchy re-export.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, nice. Except for maybe the usual effect adding a dependency might have, I see no reason to approve this, then. LMK when it's out of draft

@noomorph noomorph marked this pull request as ready for review May 31, 2022 10:05
@noomorph noomorph merged commit cb30415 into master May 31, 2022
@noomorph noomorph deleted the chore/jest-28-upgrade-internally branch May 31, 2022 16:10
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.

Upgrade test/demo projects to Jest 28
2 participants