-
Notifications
You must be signed in to change notification settings - Fork 17
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
ESM Loaders breaking changes notification #103
Comments
cc:
|
❤️ |
Until now, loaders didn't affect the resolution / load steps of subsequent loaders. For example, it wasn't possible to have loaders written in TypeScript, because the TypeScript loader wouldn't be used to resolve and load subsequent loaders:
We merged PR nodejs/node#43772 that fixes that. While I see it as a bugfix, it may also be seen as a breaking change in that if you have a loader that breaks the resolution, as it'll also prevent subsequent loaders from being properly loaded. For example, the following wouldn't work anymore:
I'd like to land it in the next 19.x release to collect early feedback and unblock use cases that rely on multiple loaders. Is everyone fine with that? The alternative is to wait for nodejs/node#44710 to land, to try to batch together PRs that have the potential to break something somewhere - but with off-threading being a much larger / riskier change, I'm not convinced batching them is a good idea. I'd personally prefer to incrementally land PRs, rather than all at once. |
Sounds good to me, agreed that iterating is easier for the ecosystem than batching. I also suspect the off-thread changes are gonna need more work till they're merge-able. |
Status update for loader authors: We will be deprecating the At the same time as releasing the new hook and deprecating the old, we plan to release We are also in the process of handling CJS loading via ESMLoader when ESM is involved (there are various conditions for this). This means custom loaders will now be able to supply CJS source (prior to this change, |
This comment was marked as off-topic.
This comment was marked as off-topic.
Status update for hook authors: The On a related note, Customization Hooks will also become Release Candidate as of node v21.0.0. This means we do not anticipate significant changes. They will remain RC for some time for issues to surface, and after those have been addressed, the API will be marked stable. Edit: an earlier version of this post said the |
FYI nodejs/node#50669 will backport the changes on 20 ( |
Since Node.js has no official way of notifying package authors of incoming breaking changes, and Loaders has had and likely will have a couple more before stability, I'll post incoming breaking changes to this thread before landing them. When a breaking change is about to land, one of us will post a message here with a link to the PR
To avoid spamming authors who just want the change notifications, I'm locking the thread.
The text was updated successfully, but these errors were encountered: