-
-
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
chore: use globalThis
over global
everywhere
#12447
Conversation
@@ -35,6 +35,7 @@ const createState = (): Circus.State => { | |||
}; | |||
}; | |||
|
|||
/* eslint-disable no-restricted-globals */ |
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.
mostly for types, not sure how to enhance globalThis
with a symbol
I don't suppose there's any chance this could be back-ported to the 27 branch, could it? Using |
Yep, I'd suggest locking the version to a known good one for your consumers ( |
Thanks for responding. I'll talk to the team about the options, but it seems odd that Jest 28 will allow node 12.13+, but not node 16 less than 16.13. That feels overly restrictive, and I'm not clear for the reasoning there. Were features added in 16.13 that jest uses? But then, how would 12.13 work? Is it really necessary to set Thanks again for the suggestions. |
It's the first LTS release of v16: https://nodejs.org/en/blog/release/v16.13.0/ (same with our minimal v12 and v14 - first LTS) |
But what is the reason to require that as a minimum in this package? From my understanding, that's just the version when they started calling it "LTS". It seems like a bummer to prevent folks who may be on a fairly-up-to-date node.js version from using jest just because of an arbitrary label. It seems like |
The reason is that the less platforms we support, the easier maintenance of the project as a whole is. LTS releases are nice targets, and people valuing stability should be on those versions. If an issue is found with e.g. 16.10 which is fixed in 16.11, I have zero interest in fixing that or receiving bug reports about it. 16.14.0 release is close to 5 months old, I doubt it's a real issue for people wanting to run it. I highly doubt it's normal with people unable to upgrade their node versions, but are stuck on versions of node before they got the LTS stamp. |
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. |
@IanVS fwiw Jest 28.0.2 dropped node 16 req to 16.10. Dunno if that's in range of what you need, but thought to call it out 🙂 Might not help if your current range is something like |
Summary
globalThis
works in all environments, not just Node.Vaguely related to #11569.
Test plan
Green CI.