-
Notifications
You must be signed in to change notification settings - Fork 237
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: prefer importing jest globals for specific types #1568
Conversation
5b7aa20
to
38eb74a
Compare
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.
good idea 👍
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.
cool, but I think let's drop the tuple utils stuff - I'm pretty confident we'll not be adding any new types anytime soon, so we should be safe to just directly write out the tuple
beb5655
to
2f342f5
Compare
Accessing the `jest` global in ESM must be done either through `import.meta.jest` or by importing it from `@jest/globals`. The latter is useful while migrating to ESM because the former is not accessible in non-ESM. This adds an option to specify the types of globals for which we want to enforce the import.
2f342f5
to
cb9d9fd
Compare
Thanks for the quick review! |
# [28.3.0](v28.2.0...v28.3.0) (2024-04-27) ### Features * prefer importing jest globals for specific types ([#1568](#1568)) ([c464ae3](c464ae3))
🎉 This PR is included in version 28.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Accessing the
jest
global in ESM must be done either throughimport.meta.jest
or by importing it from@jest/globals
. The latter is useful while migrating to ESM because the former is not accessible in non-ESM.This adds an option to specify the types of globals for which we want to enforce the import.