fix(env): fix env detection compatibility in node v21.1.0#1036
fix(env): fix env detection compatibility in node v21.1.0#1036plainheart merged 1 commit intoecomfe:masterfrom
Conversation
|
I personally would have preferred
|
plainheart
left a comment
There was a problem hiding this comment.
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