-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: getBuiltin() does not work with node:test #48516
Comments
I assume that it would probably be trivial to add support for the cc @nodejs/loaders |
I was just looking at that util a couple days ago. It reads/validates from a list; I expect |
PR-URL: nodejs#48779 Fixes: nodejs#48778 Fixes: nodejs#48516 Refs: nodejs#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs#48779 Fixes: nodejs#48778 Fixes: nodejs#48516 Refs: nodejs#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs#48779 Fixes: nodejs#48778 Fixes: nodejs#48516 Refs: nodejs#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs#48779 Fixes: nodejs#48778 Fixes: nodejs#48516 Refs: nodejs#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs#48779 Fixes: nodejs#48778 Fixes: nodejs#48516 Refs: nodejs#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs#48779 Fixes: nodejs#48778 Fixes: nodejs#48516 Refs: nodejs#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs/node#48779 Backport-PR-URL: nodejs/node#50669 Fixes: nodejs/node#48778 Fixes: nodejs/node#48516 Refs: nodejs/node#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs/node#48779 Backport-PR-URL: nodejs/node#50669 Fixes: nodejs/node#48778 Fixes: nodejs/node#48516 Refs: nodejs/node#46402 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
Version
latest main
Platform
all
Subsystem
esm, loaders
What steps will reproduce the bug?
Create an ESM loader, and in the
globalPreload()
hook, usegetBuiltin()
to accessnode:test
(test
without thenode:
scheme also does not work).How often does it reproduce? Is there a required condition?
Always reproduces.
What is the expected behavior? Why is that the expected behavior?
node:test
can be used withgetBuiltin()
What do you see instead?
Additional information
I imagine this is related to the use of
BuiltinModule.canBeRequiredWithoutScheme(builtinName)
ingetBuiltin()
.My use case is to attach the message port to the
node:test
module. For now, I have worked around this by attaching the port toglobalThis
instead. Once nodejs/loaders#147 is resolved, I won't need to do this, but I wanted to raise the issue in case the loaders team thinks it's important.The text was updated successfully, but these errors were encountered: