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(deps-dev): bump jest to 26.x #497

Merged
merged 6 commits into from
Mar 30, 2022
Merged

chore(deps-dev): bump jest to 26.x #497

merged 6 commits into from
Mar 30, 2022

Conversation

trivikr
Copy link
Contributor

@trivikr trivikr commented Mar 26, 2022

I attempted bumping to jest 27.x in https://github.com/trivikr/jscodeshift/pull/3 but there are too many breaking changes.

The jest 27.x bump can be attempted after merging changes from evcodeshift fork.

@Daniel15 Daniel15 merged commit be4a67a into facebook:main Mar 30, 2022
@trivikr trivikr deleted the bump-jest-26 branch March 30, 2022 03:21
@ElonVolo
Copy link
Contributor

ElonVolo commented Apr 8, 2022

I actually coded a Jest 27 bump while working on jscodeshift itself (not the evcodeshift fork) about two months ago. In addition to the breaking changes in Jest itself, there was an issue that IIRC was caused by the jscodeshift Workers use of the module.parent property (which has since been deprecated in node.js) not playing nicely with Jest 27.

It turns out that the module.parent property is being used as a way to detect whether a transform is being run from a forked off process vs being run in-band (e.g if you're debugging, running unit tests, calling via jscodeshift API, etc). I ended up having to do a full refactoring of Worker.js to stop making use of module.parent and to instead use a more explicit method of determining whether transforms were being run. Since you're looking at bumping jest up to 27 I've started working on this branch again, but there's one or two kinks that still have to be ironed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants