Skip to content
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

Stability Request: ESM Loader experimental status is holding EVERYTHING back #41059

Closed
arpowers opened this issue Dec 2, 2021 · 5 comments
Closed
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders

Comments

@arpowers
Copy link

arpowers commented Dec 2, 2021

Hey Node team,
I'm creating this issue to point out something that I'm not sure is obvious to everyone, but the lack of (stated) stability in the ESM loader API is holding the entire JavaScript ecosystem from adopting ESM in node.

What's happening is indirect. Unit testing libs absolutely need this functionality for mocking. Since they can't go forward, no one else in with a legit JS app can move forward.

These loaders have remained in experimental status for many years, not sure what can be done to get them stable faster.

@arpowers arpowers added the feature request Issues that request new features to be added to Node.js. label Dec 2, 2021
@arpowers arpowers changed the title Stability Request: ESM Loaders experimental status is holding EVERYTHING back Stability Request: ESM Loader experimental status is holding EVERYTHING back Dec 2, 2021
@Mesteery Mesteery added esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders and removed feature request Issues that request new features to be added to Node.js. labels Dec 2, 2021
@aduh95
Copy link
Contributor

aduh95 commented Dec 3, 2021

These loaders have remained in experimental status for many years, not sure what can be done to get them stable faster.

Experiment with them, raise bugs if you found any, participate in discussions in nodejs/loaders, share your use cases if you think it's not covered well enough, invest time and money to make PRs, etc.
The @nodejs/loaders is made of a handful of volunteers (that you would be welcome to join if that suits you btw), and Node.js would benefit a lot to have more contributions from the community on this topic.

@JakobJingleheimer
Copy link
Contributor

JakobJingleheimer commented Dec 3, 2021

There is a project in this repo tracking the todos: https://github.com/nodejs/node/projects/17

EDIT: the REAME in nodejs/loaders is probably easier to see what's remaining and status for that.

We're not sat idle ;)

Next on the agenda is to finish up https imports and then loader chaining. There are 2 proposals in https://github.com/nodejs/loaders/tree/HEAD/doc/design for how chaining would be achieved. Please do chime in if you have some value to add there or a use-case not listed in use-cases.md.

@arpowers
Copy link
Author

arpowers commented Dec 3, 2021

@JakobJingleheimer thanks, and yes I realize you guys are working hard.

honestly, the loaders have worked fine (in my use cases) since I first tried them in 2019! ...

The point of this issue was to direct attention to the indirect link between the "experimental" status of loaders, unit test mocking, and then ESM adoption as a whole.

Additional threads to review

@JakobJingleheimer
Copy link
Contributor

We are very aware ;)

You'll find me on at least a couple of Jest's ESM issues.

Jest uses VM by the way (the Jest link "need this functionality" in your original post links to VM "considered experimental by Node" as the experimental Node.js module it needs).

@GeoffreyBooth
Copy link
Member

You contributions to loaders or the vm module would be most welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders
Projects
None yet
Development

No branches or pull requests

5 participants