-
Notifications
You must be signed in to change notification settings - Fork 147
should import { getter } from 'cjs-mod' work? #517
Comments
Getters should work. The issue with |
aaaah, ok. so only I'm kinda thinking that node should have separate exports for any promises, a la fsPromises, dnsPromises or something like that -- maybe even a separate module a la |
uh, I guess JavaScript is killing me! |
The enumerable bit is a way to avoid triggering getters which may be for deprecations or experimental APIs. The way ESM is handled in native node they must iterate over these properties before running their ESM scaffolding for them. This would trigger deprecation warnings for APIs that aren't even accessed by the user. With |
not sure if this is intended, or a bug.
related to: from #516
I was originally wondering if it should be possible to import
promises
(which currently is a getter) fromfs
.@jdalton after some research I saw your comment that this was planned for node: nodejs/node#20504 (comment) is this still the case and a bug in
node
and/oresm
? or was it decided against to allow named imports of cjs getters?someone also did mention that it did work prior
node
v10.2 withesm
nodejs/node#20504 (comment)The text was updated successfully, but these errors were encountered: