-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: create amaro loader #47
Conversation
1f97f37
to
3718094
Compare
3718094
to
4c29631
Compare
This will behave exactly as the one in core, and it requires |
4c29631
to
8436277
Compare
PTAL @nodejs/typescript @nodejs/loaders |
8436277
to
ed88906
Compare
a8dedaf
to
21395ed
Compare
21395ed
to
2a7f73a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should either use a non-null assertion, we want to throw an error if the source is nullish. Falling back to an empty string is not doing a service to our users, as it's going to be much more confusing to debug. Alternatively, we could use a runtime assert if the non-null assert is not an option.
There are cases in node core where source will be undefined https://github.com/nodejs/node/blob/3cbeed88d9de9231f420ba53ad0e4d4a7af9c637/lib/internal/modules/esm/get_format.js#L131-L136 |
9fae110
to
a6f374e
Compare
IIUC that's only true for when |
Apparently it happens so I had to add the check here https://github.com/nodejs/node/blob/3cbeed88d9de9231f420ba53ad0e4d4a7af9c637/lib/internal/modules/helpers.js#L335 |
a6f374e
to
502d9de
Compare
502d9de
to
5dd1bb1
Compare
5dd1bb1
to
429744b
Compare
It is now possible to use amaro as external loader, that behaves the same way as in core, but allows to decouple the typescript version supported