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

node-api: allow retrieval of add-on file name #37195

Closed

Commits on Feb 7, 2021

  1. node-api: allow retrieval of add-on file name

    Unlike JS-only modules, native add-ons are always associated with a
    dynamic shared object from which they are loaded. Being able to
    retrieve its absolute path is important to native-only add-ons, i.e.
    add-ons that are not themselves being loaded from a JS-only module
    located in the same package as the native add-on itself.
    
    Currently, the file name is obtained at environment construction time
    from the JS `module.filename`. Nevertheless, the presence of `module`
    is not required, because the file name could also be passed in via a
    private property added onto `exports` from the `process.dlopen`
    binding.
    
    Fixes: nodejs/node-addon-api#449
    PR-URL: nodejs#37195
    Gabriel Schulhof committed Feb 7, 2021
    Copy the full SHA
    0f7da2c View commit details
    Browse the repository at this point in the history
  2. heed review comment

    Gabriel Schulhof committed Feb 7, 2021
    Copy the full SHA
    e2a7626 View commit details
    Browse the repository at this point in the history
  3. prefix with file://

    Gabriel Schulhof committed Feb 7, 2021
    Copy the full SHA
    ecddc20 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2021

  1. Update doc/api/n-api.md

    Co-authored-by: Michael Dawson <mdawson@devrus.com>
    Gabriel Schulhof and mhdawson committed Feb 8, 2021
    Copy the full SHA
    77fff59 View commit details
    Browse the repository at this point in the history
  2. retain message about null-termination

    Gabriel Schulhof committed Feb 8, 2021
    Copy the full SHA
    2d017d4 View commit details
    Browse the repository at this point in the history