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
fix: fix isNode variable not properly detecting Node.js environment #6148
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Please fix the lint check by running prettier |
This patch fixes Node.js being detected by the lack of `global.document` which isn't necessairly always true in Node (example: using JSDOM library). Instead, we're now detecting `process.versions.node` being present, which I copied over from [here](https://github.com/MatthewSH/is-node/commit/426943ae936536f9c2fd10fd58a9a46b59470097#diff-168726dbe96b3ce427e7fedce31bb0bc). Fixes #6147
@marcjansen Done - sorry about that, VSCode linting didn't kick in since I installed the repo for the first time after opening VSCode :) |
Not sure why @marcjansen would care to be honest 😅 Thanks for the fix-up! |
Of course I care, ;-) |
@mathiasbynens hey I'm actually having this issue which is how I found this, I can see this was merged 7 days ago and 5.0.0 was released 8 days ago, when abouts is this planned to release? Cheers :) |
Hey @fgfmichael, we don't have a fixed release schedule but rest assured this will be in a proper release soon. Until then, you can |
For those following this thread - this fix is live as of v5.1.0. |
This patch fixes Node.js being detected by the lack of
global.document
which isn't necessairly always true in Node.js (example: using JSDOM library). Instead, we're now detectingprocess.versions.node
being present, which I copied over from here.Fixes #6147