-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(env): fix env detection compatibility in node v21.1.0 #1036
Conversation
I personally would have preferred
|
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.
Thanks for your contribution!
Related information:
@Uzlopak A small question: Before v21.1.0, is the |
For what stands the abbreviation NPE? |
Null Pointer Exception - that is, a type error thrown when accessing properties / methods of an undefined object. |
I looked through the release note of Node v21.0.0, which added the |
In node 21.0.0 userAgent was missing. But node 21 is anyway a dev version and it was expected to result in regressions. So using it for production is anyway bad. I would personally try to detect node/deno/bun with
first one would detect node and bun, second one would detect Deno. |
FWIW, that is not the official stance of the Node.js project. While we generally recommend LTS versions for production, non-LTS release lines are not "dev versions". They typically receive the same level of support as LTS versions, albeit for a shorter amount of time. Breaking changes may be introduced in both LTS and non-LTS release lines, but regressions are highly undesirable in any case. |
This PR improves the detection of nodejs version 21.1.0 and above