Replies: 2 comments 4 replies
-
Isn't it the same in NodeJS when working in pure ESM code? |
Beta Was this translation helpful? Give feedback.
-
This has been tried for several years and resulted in endless stream of problems for users. I wrote about it more in https://deno.com/blog/v2.0-release-candidate#changes-to-global-variables. There's a ton of frameworks that load configuration files that the first thing they do is access
How did it break the detection?
At this point, with recent addition of 1a0cb5b the only difference is that Deno defaults to ESM instead of CJS if there's no |
Beta Was this translation helpful? Give feedback.
-
Deno 2.0 delivers bunch of features, but also bunch of inconsistency ...
Why Deno 2.0 supports
process
global, but require to createrequire
method manually ?!See:
https://docs.deno.com/runtime/fundamentals/node/#node.js-global-objects
https://docs.deno.com/runtime/fundamentals/node/#commonjs-support
Personally I think support of
process
global by default is mistake, I think it should be only supported in imported modules usingnpm:
or in*.cjs
files like it done forrequire
method ...Such support of global
process
, broke detection of runtime. Also it make no sense why support one feature and not support other, and where is the boundary betweendeno
andnode
runtime ...Beta Was this translation helpful? Give feedback.
All reactions