It looks like some emerging APIs are required to be covered by API in order to support hooking into import.meta and dynamic import(). See https://github.com/jkrems/loader/issues/1 for more details. \cc @jkrems
I think this applies to module APIs in general - e.g. creating / compiling a module also doesn't exist.
i started working on parts of this a while ago. having callbacks for import.meta and dynamic import would need to wait on us finishing whatever is going on in core though. node needs to own those two callbacks from the engine.
Is this the right place for that? If there are new APIs they would go into core as C N-API apis and then later be wrapped by node-addon-api right?
@mhdawson Where should I file the API request _(repo/issue-tracker)_?
@jdalton in this case nodejs/ecmascript-modules, specifically src/node_api.cc
This is not a nodejs/ecmascript-modules aspect though. It is already used by ModuleWrap:
So what would be the procedure to get this through core?
@smotaal you would need to make an API that exposes them here https://github.com/nodejs/ecmascript-modules/blob/master/src/node_api.cc
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
I think that the discussion was leading towards the work needing to be done in core first versus node-addon-api, therefore closing. Please let us know if that is not the right thing to do.
Most helpful comment
Is this the right place for that? If there are new APIs they would go into core as C N-API apis and then later be wrapped by node-addon-api right?