-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: override module.createRequire
#9469
feat: override module.createRequire
#9469
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9469 +/- ##
========================================
Coverage ? 65%
========================================
Files ? 283
Lines ? 12131
Branches ? 3002
========================================
Hits ? 7886
Misses ? 3604
Partials ? 641
Continue to review full report at Codecov.
|
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.
nice, thank you! I think we should add some more validation about the shape of the passed in path, other than that this lgtm
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 is great, thank you!
yarn.lock
Outdated
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4" | ||
integrity sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ== | ||
|
||
"@types/node@>= 8": |
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.
roll back change here?
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 have upgraded @types/node
to 13.7
because this version includes syncBuiltinESMExports
in module
.
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.
Which I have used here
https://github.com/facebook/jest/pull/9469/files#diff-5b473ffb7e91f9fc070a6f6025790ef0R918
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 have reverted changes back. I just used another type
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.
oh! I just didn't want 2 versions of it, could have deduped it to the newer ones. Lemme play with it locally. Thanks!
…quire' into origin/override_module_create_require
module.createRequire
Thank you so much @doniyor2109! |
1. createRequire should have been properly handled in newer Jest versions: jestjs/jest#9469 2. We don't test migrators with Jest mock modules anymore So it's safe to skip that condition
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
PR for #9426