Uh oh!
There was an error while loading. Please reload this page.
[v14.x] node-api: allow retrieval of add-on file name - #37327
Closed
gabrielschulhof wants to merge 1 commit into
Closed
[v14.x] node-api: allow retrieval of add-on file name#37327gabrielschulhof wants to merge 1 commit into
gabrielschulhof wants to merge 1 commit into
Conversation
gabrielschulhofforce-pushed
the
backport-node-api-module-file-name-to-v14.x
branch
from
February 12, 2021 03:07
866dd16 to
dd3936eComparenodejs-github-bot
commented
Feb 13, 2021
Collaborator
gabrielschulhof
commented
Feb 14, 2021
ContributorAuthor
The solution to the conflict in this backport backport consists of restoring the names of the macros used in the test: Whereas on the main branch it was
on this branch it is the old
|
legendecas
approved these changes
Feb 20, 2021
nodejs-github-bot
commented
Apr 24, 2021
Collaborator
targos
commented
Apr 25, 2021
Member
This conflicts with #37728 |
gabrielschulhofforce-pushed
the
backport-node-api-module-file-name-to-v14.x
branch
from
June 4, 2021 14:19
dd3936e to
6b6f28eComparegabrielschulhof
commented
Jun 4, 2021
ContributorAuthor
@targos rebased. |
gabrielschulhof
commented
Jun 4, 2021
ContributorAuthor
@danielleadams rebased. |
targosforce-pushed
the
v14.x-staging
branch
4 times, most recently
from
June 11, 2021 07:31
49c8441 to
50b3bd0Comparerichardlauforce-pushed
the
v14.x-staging
branch
2 times, most recently
from
July 5, 2021 16:02
1f06fcf to
16dcd9cCompareUnlike 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. As an attempt at future-proofing, the file name is provided as a URL, i.e. prefixed with the `file://` protocol. Fixes: nodejs/node-addon-api#449 PR-URL: nodejs#37195 Co-authored-by: Michael Dawson <mdawson@devrus.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
targosforce-pushed
the
backport-node-api-module-file-name-to-v14.x
branch
from
August 8, 2021 08:23
6b6f28e to
db14845Comparenodejs-github-bot
commented
Aug 8, 2021
Collaborator
targos
commented
Aug 8, 2021
Member
Landed in d98d193 |
targos pushed a commit
that referenced
this pull request
Aug 8, 2021
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. As an attempt at future-proofing, the file name is provided as a URL, i.e. prefixed with the `file://` protocol. Fixes: nodejs/node-addon-api#449 PR-URL: #37195 Backport-PR-URL: #37327 Co-authored-by: Michael Dawson <mdawson@devrus.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
BethGriggs pushed a commit
that referenced
this pull request
Aug 12, 2021
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. As an attempt at future-proofing, the file name is provided as a URL, i.e. prefixed with the `file://` protocol. Fixes: nodejs/node-addon-api#449 PR-URL: #37195 Backport-PR-URL: #37327 Co-authored-by: Michael Dawson <mdawson@devrus.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
MylesBorins pushed a commit
that referenced
this pull request
Aug 31, 2021
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. As an attempt at future-proofing, the file name is provided as a URL, i.e. prefixed with the `file://` protocol. Fixes: nodejs/node-addon-api#449 PR-URL: #37195 Backport-PR-URL: #37327 Co-authored-by: Michael Dawson <mdawson@devrus.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofmoduleis not required, because the file name could also be passed in via a
private property added onto
exportsfrom theprocess.dlopenbinding.
As an attempt at future-proofing, the file name is provided as a URL,
i.e. prefixed with the
file://protocol.Fixes: nodejs/node-addon-api#449
PR-URL: #37195
Co-authored-by: @mhdawson
Reviewed-By: @mhdawson