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

module: implement register utility #46826

Merged
merged 15 commits into from
Jun 12, 2023
Merged

Conversation

jlenon7
Copy link
Member

@jlenon7 jlenon7 commented Feb 24, 2023

To-dos:

  • Implement register function in node:module.
  • Add loaders registered with register function in the same chain of loaders registered with --loader CLI flag.
  • Add tests that prove the feature works.
  • Add documentation about the new feature.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/modules

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Feb 24, 2023
@jlenon7 jlenon7 marked this pull request as draft February 24, 2023 19:30
jlenon7 added a commit to jlenon7/node that referenced this pull request Mar 8, 2023
Use the path.sep variable for handling windows support.

Refs: nodejs#46826 (comment)
test/es-module/test-esm-loader-programmatically.mjs Outdated Show resolved Hide resolved
lib/internal/modules/esm/register.js Outdated Show resolved Hide resolved
lib/internal/modules/esm/register.js Outdated Show resolved Hide resolved
test/fixtures/es-module-loaders/register-loader-app.mjs Outdated Show resolved Hide resolved
doc/api/esm.md Outdated Show resolved Hide resolved
doc/api/esm.md Outdated Show resolved Hide resolved
doc/api/esm.md Outdated Show resolved Hide resolved
@aduh95 aduh95 added the esm Issues and PRs related to the ECMAScript Modules implementation. label Apr 13, 2023
@aduh95
Copy link
Contributor

aduh95 commented Apr 13, 2023

This would need to be rebased now that the other PR has landed. Let me know if you need help with the process.

@GeoffreyBooth GeoffreyBooth added the loaders Issues and PRs related to ES module loaders label Apr 13, 2023
@mcollina
Copy link
Member

How would this work with worker_thread? Can I set a loader specific to a given thread?

@GeoffreyBooth
Copy link
Member

How would this work with worker_thread? Can I set a loader specific to a given thread?

I think the way this works is it would add loaders to the main loaders thread that applies to the main application thread and all worker threads. (And it would create that main loaders thread if it doesn’t already exist at startup time.) Any modules loaded prior to this registration would be unaffected, of course, so people would need to be careful if they want this to apply to their main app, like:

import { registerLoader } from 'module'

await registerLoader('some-loader')
await import('app-entry.js')

So long as there’s just one loaders thread that applies to both the main thread and worker threads, it’s all or nothing: registerLoader adds loaders to apply everywhere.

@mcollina
Copy link
Member

That's perfect for me.

lib/internal/modules/esm/hooks.js Outdated Show resolved Hide resolved
lib/internal/modules/esm/hooks.js Outdated Show resolved Hide resolved
@cjihrig
Copy link
Contributor

cjihrig commented Apr 29, 2023

Not something that needs to be done in this PR, but I think we should consider adding a few supporting APIs:

  • Ability to unregister a hook.
  • Ability to inspect the currently registered hooks.
  • An addition to the permission system to prevent loaders from being registered/unregistered programmatically.

@GeoffreyBooth
Copy link
Member

  • An addition to the permission system to prevent loaders from being registered/unregistered programmatically.

Arguably this should happen at this PR, so there isn’t a gap between being able to register loaders programmatically and preventing people from doing so. Or two PRs but this one is blocked from being released until the permission is added.

The risk is relatively low though, because registerLoader only applies to modules imported after the registration call; which would be only dynamic import() and any resulting new downstream imports (static or dynamic).

  • Ability to unregister a hook.
  • Ability to inspect the currently registered hooks.

I assume you mean loader/loaders here, not hooks? This API registers an entire loader, so presumably the complementary API would be deregisterLoader. Registering or deregistering individual hooks is an interesting idea, but I’m not sure what the use cases would be. A loader can always be broken apart into its component hooks, like you could create a new loader that consists of export { load } from './other-loader.js' to have a loader that’s just some other loader’s load hook, so I’m not sure we need our own API to provide an easier way.

@cjihrig
Copy link
Contributor

cjihrig commented May 1, 2023

I assume you mean loader/loaders here, not hooks?

I did mean loaders instead of hooks here. I apologize for that.

@JakobJingleheimer
Copy link
Member

Okee, sorry for the dump, but I think this is too big to hide in a file comment:

I think the tech design here needs to change quite a bit to actually work:

esm/worker autonomously handles loader registration for loaders specified via CLI. it currently does not expose this; it would need to do. So what I think needs to happen is:

  1. node:module needs to expose a util (eg registerLoader)
  2. module.registerLoader() needs to point to the "main" module loader, which I believe is accessible via const esmLoader = require('internal/process/esm_loader')) when at least 1 custom loader is specified via CLI, node will instantiate CustomizedModuleLoader [1] (which is what you need here).
  3. CustomizedModuleLoader needs a specific way to communicate the registration to HooksProxy (so a register method probably needs to be added to CustomizedModuleLoader).
  4. HooksProxy needs a specific message type (eg simply register) to communicate the registration to the esm worker)
  5. esm/worker needs to handle that message and call Hooks::addCustomLoader (which already exists) [2].

Perhaps module.registerLoader() should be "synchronous" like import.meta.resolve() because forgetting to await is quite a foot-gun that may be very difficult for a user to troubleshoot, and I believe there is no scenario where it would be desirable for the programme to continue before the registration has finished. If so, this is already possible, and CustomizedModuleLoader::register() would just need to call HooksProxy::makeSyncRequest() (instead of HooksProxy::makeAsyncRequest()); see CustomizedModuleLoader::resolve() and CustomizedModuleLoader::load() respectively).

Footnotes:

  1. A limitation to this design is that at least 1 custom loader must be supplied at startup (be it environment var / CLI, or, if supported in future, via something like package.json). When that condition is not met, I would make module.registerLoader somehow indicate (probably throw) to the user that it can't do what it's supposed to do. I believe there is no way to get around this limitation as node needs some indication at startup to know whether to instantiate DefaultModuleLoader vs the much more expensive CustomizedModuleLoader (which was a hard requirement).
  2. initializeHooks in lib/internal/modules/esm/utils.js does some stuff with adding custom loaders; that may be helpful (or you may need to tweak it).

@aduh95
Copy link
Contributor

aduh95 commented May 5, 2023

Regarding making the API sync, I’ve been thinking about that and I’m having conflicting thoughts about it: while I 💯 agree that a sync API would produce fewer surprises, but on the same time we probably want the API to work from --require scripts, and there a sync API might cause problems because the ESM loader is not loaded yet.
Maybe it would be easier to start with converting a smaller use case, and I think that PR is doing a good job at that (only covering the use case "I want to register additional loaders in the runtime when I already have added at least one from the CLI"). I think it would work to first land this PR and iterate on it on follow up PRs. But we can already discuss the other use cases of course!

@GeoffreyBooth
Copy link
Member

while I 💯 agree that a sync API would produce fewer surprises, but on the same time we probably want the API to work from --require scripts, and there a sync API might cause problems because the ESM loader is not loaded yet.

I always assumed it would be an async API; it’s essentially import()-ing a package from disk. I don’t think it would be too much of a footgun; if you do registerLoader('typescript'); import('./app.ts') the latter would immediately error. I feel like that would be the case for most loaders that users would register. And making it async from the start preserves the most flexibility.

  1. I believe there is no way to get around this limitation as node needs some indication at startup to know whether to instantiate DefaultModuleLoader vs the much more expensive CustomizedModuleLoader

If the user needs to pass --loader regardless of whether or not they’re going to use registerLoader, then there’s not much point to creating registerLoader. Maybe what we need is a way for DefaultModuleLoader to “convert” into CustomizedModuleLoader on demand when it’s told to register a loader.

@aduh95
Copy link
Contributor

aduh95 commented May 6, 2023

it’s essentially import()-ing a package from disk

It loads it in a different thread, comparing it with import is not quite right IMO. Also it doesn't have to be from disk, it can be from the network or another loader.

registerLoader('typescript'); import('./app.ts') the latter would immediately error

If it's async, it would race, so sometimes error, sometimes succeeds. But that sounds like a terrible API 😅

And making it async from the start preserves the most flexibility.

Do you have a use case in mind that would require the loader registration to be async? 🤔

Maybe what we need is a way for DefaultModuleLoader to “convert” into CustomizedModuleLoader on demand when it’s told to register a loader.

Maybe we should support it only in scripts loaded from --require on the main thread, before the ESM loader is initiated? We have to reduce its scope for the initial implementation somehow, it's not reasonable to try to address all at once IMO.

@GeoffreyBooth
Copy link
Member

GeoffreyBooth commented May 6, 2023

it’s essentially import()-ing a package from disk

It loads it in a different thread, comparing it with import is not quite right IMO. Also it doesn't have to be from disk, it can be from the network or another loader.

Sure, but loading modules (whether from disk or network etc) is typically an async operation.

registerLoader('typescript'); import('./app.ts') the latter would immediately error

If it’s async, it would race, so sometimes error, sometimes succeeds. But that sounds like a terrible API 😅

Okay, fair enough, but this is no different than any developer forgetting to await an async API. If the code somehow doesn’t error for them, hopefully their linter or typechecker warns them that they forgot an await. I don't think we should constrain our API because developers might forget to await a promise.

And making it async from the start preserves the most flexibility.

Do you have a use case in mind that would require the loader registration to be async? 🤔

Because many loaders will presumably be written as ESM, and loading them means import()-ing them, which is async.

I don’t necessarily want this API to be async; if it can be sync, great, do it that way. I just assumed that somewhere under the hood it would use the import() machinery and therefore would need to be async.

Maybe what we need is a way for DefaultModuleLoader to “convert” into CustomizedModuleLoader on demand when it’s told to register a loader.

Maybe we should support it only in scripts loaded from --require on the main thread, before the ESM loader is initiated? We have to reduce its scope for the initial implementation somehow, it’s not reasonable to try to address all at once IMO.

Needing this to happen from CommonJS and/or from --require really reduces a lot of the usefulness, to the point where we’ve defeated the purpose. The goal of creating this API is to not require flags, whether --require or --import or --loader.

I think we just need to undo the separation of DefaultModuleLoader and CustomizedModuleLoader, where we merge them back together into one ModuleLoader that by default initializes like DefaultModuleLoader does today, and loaders get registered via a method rather than the constructor. And then only when a loader is registered does it create the loaders thread and so on. It would be a lot like the old ESMLoader used to be before the refactor (but let’s keep the name ModuleLoader so that eventually it can supplant the CommonJS loader). This is probably too much to expect a newcomer to the codebase to tackle, so we’ll need to do a lot of this work.

@aduh95
Copy link
Contributor

aduh95 commented May 6, 2023

Because many loaders will presumably be written as ESM, and loading them means import()-ing them, which is async.

But the "import" happens in a different thread, so there’s no reason we couldn’t make it sync, like we do for import.meta.resolve.

UlisesGascon added a commit that referenced this pull request Aug 22, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) #48660
doc:
  * add new TSC members (Michael Dawson) #48841
  * add rluvaton to collaborators (Raz Luvaton) #49215
esm:
  * unflag import.meta.resolve (Guy Bedford) #49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) #48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) #48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) #48765
module:
  * implement `register` utility (João Lenon) #46826
  * make CJS load from ESM loader (Antoine du Hamel) #47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) #48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) #48660 and #45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975

PR-URL: #49185
UlisesGascon added a commit that referenced this pull request Aug 22, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) #48660
doc:
  * add new TSC members (Michael Dawson) #48841
  * add rluvaton to collaborators (Raz Luvaton) #49215
esm:
  * unflag import.meta.resolve (Guy Bedford) #49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) #48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) #48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) #48765
module:
  * implement `register` utility (João Lenon) #46826
  * make CJS load from ESM loader (Antoine du Hamel) #47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) #48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) #48660 and #45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975

PR-URL: #49185
UlisesGascon added a commit that referenced this pull request Aug 24, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) #48660
doc:
  * add new TSC members (Michael Dawson) #48841
  * add rluvaton to collaborators (Raz Luvaton) #49215
esm:
  * unflag import.meta.resolve (Guy Bedford) #49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) #48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) #48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) #48765
module:
  * implement `register` utility (João Lenon) #46826
  * make CJS load from ESM loader (Antoine du Hamel) #47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) #48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) #48660 and #45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975

PR-URL: #49185
UlisesGascon added a commit that referenced this pull request Aug 29, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) #48660
doc:
  * add new TSC members (Michael Dawson) #48841
  * add rluvaton to collaborators (Raz Luvaton) #49215
esm:
  * unflag import.meta.resolve (Guy Bedford) #49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) #48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) #48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) #48765
module:
  * implement `register` utility (João Lenon) #46826
  * make CJS load from ESM loader (Antoine du Hamel) #47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) #48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) #48660 and #45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975

PR-URL: #49185
UlisesGascon added a commit that referenced this pull request Aug 31, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) #48660
doc:
  * add new TSC members (Michael Dawson) #48841
  * add rluvaton to collaborators (Raz Luvaton) #49215
esm:
  * unflag import.meta.resolve (Guy Bedford) #49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) #48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) #48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) #48765
module:
  * implement `register` utility (João Lenon) #46826
  * make CJS load from ESM loader (Antoine du Hamel) #47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) #48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) #48660 and #45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975

PR-URL: #49185
UlisesGascon added a commit that referenced this pull request Sep 1, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) #48660
doc:
  * add new TSC members (Michael Dawson) #48841
  * add rluvaton to collaborators (Raz Luvaton) #49215
esm:
  * unflag import.meta.resolve (Guy Bedford) #49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) #48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) #48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) #48765
module:
  * implement `register` utility (João Lenon) #46826
  * make CJS load from ESM loader (Antoine du Hamel) #47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) #48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) #48660 and #45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975

PR-URL: #49185
juanarbol pushed a commit that referenced this pull request Sep 4, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) #48660
doc:
  * add new TSC members (Michael Dawson) #48841
  * add rluvaton to collaborators (Raz Luvaton) #49215
esm:
  * unflag import.meta.resolve (Guy Bedford) #49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) #48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) #48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) #48765
module:
  * implement `register` utility (João Lenon) #46826
  * make CJS load from ESM loader (Antoine du Hamel) #47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) #48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) #48660 and #45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975

PR-URL: #49185
@ruyadorno ruyadorno added the backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. label Sep 7, 2023
@ruyadorno
Copy link
Member

This does not land cleanly in v18.x-staging and will need manual backport in case you want it to land in v18.

jlenon7 added a commit to jlenon7/node that referenced this pull request Sep 7, 2023
This function was first implemented in nodejs#46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: nodejs#46826 (comment)
jlenon7 added a commit to jlenon7/node that referenced this pull request Sep 20, 2023
This function was first implemented in nodejs#46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: nodejs#46826 (comment)
nodejs-github-bot pushed a commit that referenced this pull request Sep 22, 2023
This function was first implemented in #46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: #46826 (comment)
PR-URL: #48434
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
ruyadorno pushed a commit that referenced this pull request Sep 28, 2023
This function was first implemented in #46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: #46826 (comment)
PR-URL: #48434
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
Notable changes:

deps:
  * V8: cherry-pick 93275031284c (Joyee Cheung) nodejs#48660
doc:
  * add new TSC members (Michael Dawson) nodejs#48841
  * add rluvaton to collaborators (Raz Luvaton) nodejs#49215
esm:
  * unflag import.meta.resolve (Guy Bedford) nodejs#49028
  * add `initialize` hook, integrate with `register` (Izaak Schroeder) nodejs#48842
  * unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) nodejs#48559
inspector:
  * (SEMVER-MINOR) open add `SymbolDispose` (Chemi Atlow) nodejs#48765
module:
  * implement `register` utility (João Lenon) nodejs#46826
  * make CJS load from ESM loader (Antoine du Hamel) nodejs#47999
src:
  * add built-in `.env` file support (Yagiz Nizipli) nodejs#48890
  * initialize cppgc (Daryl Haresign and Joyee Cheung) nodejs#48660 and nodejs#45704
test_runner:
  * (SEMVER-MINOR) expose location of tests (Colin Ihrig) nodejs#48975

PR-URL: nodejs#49185
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
This function was first implemented in nodejs#46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: nodejs#46826 (comment)
PR-URL: nodejs#48434
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
PR-URL: nodejs#46826
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
This function was first implemented in nodejs#46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: nodejs#46826 (comment)
PR-URL: nodejs#48434
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
This function was first implemented in nodejs#46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: nodejs#46826 (comment)
PR-URL: nodejs#48434
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@targos targos added backported-to-v18.x PRs backported to the v18.x-staging branch. and removed backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. labels Nov 23, 2023
targos pushed a commit that referenced this pull request Nov 23, 2023
PR-URL: #46826
Backport-PR-URL: #50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request Nov 23, 2023
This function was first implemented in #46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: #46826 (comment)
PR-URL: #48434
Backport-PR-URL: #50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#46826
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
This function was first implemented in #46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: nodejs/node#46826 (comment)
PR-URL: nodejs/node#48434
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#46826
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
This function was first implemented in #46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: nodejs/node#46826 (comment)
PR-URL: nodejs/node#48434
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backported-to-v18.x PRs backported to the v18.x-staging branch. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. esm Issues and PRs related to the ECMAScript Modules implementation. lib / src Issues and PRs related to general changes in the lib or src directory. loaders Issues and PRs related to ES module loaders needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.