nodejs / abi-stable-node

Repository used by the Node-API team to manage work related to Node-API and node-addon-api
239 stars 47 forks source link

Additional native module arguments #310

Closed gabrielschulhof closed 2 years ago

gabrielschulhof commented 6 years ago

It currently (seems to) provide no way to get the "require", "dirname", and "filename" arguments of a Node.js module. If the native code is a Node.js module there should probably be some way to retrieve such values (which may be used with the above "executing JavaScript codes" during the initialization).

Re: https://github.com/nodejs/node/issues/14256

We discussed that native modules are always fronted by JS modules, so we need not worry about JS-module-specific things. We can close this issue if we decide that our earlier conclusion covers this comment.

mhdawson commented 2 years ago

@gabrielschulhof I think since we've not revisited this for a number of years we can assume our earlier conclusion covers the comment and close this issue. What do you think?

mhdawson commented 2 years ago

We've had a few related discussions but there have been alternate solutions in those cases so we agreed to close in today's Node-API meeting.