It seems like esm overrides eval somewhere.
I made a script that create a Map object, add 2 values and then call eval('Map Object created as string');
If I use normal node to execute that script it works just fine and shows the Map with values inside.
However if I use node -r esm to execute that script, it shows the Map as empty;

index.js being:

This seems to happen for both Map and Set
Is there is any reason it is behaving this way?
I need to see what is inside Map or Set with the eval function so I was surprised to find this out.
I don't know for certain, but I don't think that has anything to do with eval, but rather with console.log, and/or util.inspect (not sure how it's been implemented in node internally)
node -r esm
util.inspect(new Map([[1,2]])) // Map {}
console.log(new Map([[1,2]])) // Map {}
If I try to eval('eval').
I get the following result:

If that help?
I only assumed it was eval because of that.
it seems esm is intercepting (proxying) the behavior of console and utils https://github.com/standard-things/esm/blob/master/src/builtin/console.js
I'm sure it can be fixed.
Alright, thanks for the fast answer and clearing my doubt about this issue!
Looking forward for the possible fix :+1:
v3.0.75 is released :tada:
Most helpful comment
v3.0.75 is released :tada: