-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
src: move Node-API version detection to where it is used #60512
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
Closed
addaleax
wants to merge
2
commits into
nodejs:main
from
addaleax:move-node-api-version-detection-to-where-it-is-used
Closed
src: move Node-API version detection to where it is used #60512
addaleax
wants to merge
2
commits into
nodejs:main
from
addaleax:move-node-api-version-detection-to-where-it-is-used
+32
−32
Conversation
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
`src/js_native_api_types.h` and other files actually depend on the moved macros being evaluated, so before this change there was an implicit requirement that `src/js_native_api.h` would be included separately before any include of `src/js_native_api_types.h`, direct or transitive.
This means that `node.h` can include only this file, instead of the entirety of `node_api.h`. Split out from nodejs#60496 since it was rightfully pointed out that the breaking part of the change should not touch Node-API headers.
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60512 +/- ##
=======================================
Coverage 88.56% 88.56%
=======================================
Files 704 704
Lines 207858 207858
Branches 40058 40053 -5
=======================================
Hits 184089 184089
+ Misses 15807 15803 -4
- Partials 7962 7966 +4 🚀 New features to boost your workflow:
|
lpinca
approved these changes
Oct 31, 2025
Collaborator
cjihrig
approved these changes
Nov 1, 2025
Collaborator
|
Landed in 8f66bec...85ee01c |
nodejs-github-bot
pushed a commit
that referenced
this pull request
Nov 2, 2025
`src/js_native_api_types.h` and other files actually depend on the moved macros being evaluated, so before this change there was an implicit requirement that `src/js_native_api.h` would be included separately before any include of `src/js_native_api_types.h`, direct or transitive. PR-URL: #60512 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
nodejs-github-bot
pushed a commit
that referenced
this pull request
Nov 2, 2025
This means that `node.h` can include only this file, instead of the entirety of `node_api.h`. Split out from #60496 since it was rightfully pointed out that the breaking part of the change should not touch Node-API headers. PR-URL: #60512 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Nov 5, 2025
`src/js_native_api_types.h` and other files actually depend on the moved macros being evaluated, so before this change there was an implicit requirement that `src/js_native_api.h` would be included separately before any include of `src/js_native_api_types.h`, direct or transitive. PR-URL: #60512 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Nov 5, 2025
This means that `node.h` can include only this file, instead of the entirety of `node_api.h`. Split out from #60496 since it was rightfully pointed out that the breaking part of the change should not touch Node-API headers. PR-URL: #60512 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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.
c++
Issues and PRs that require attention from people who are familiar with C++.
commit-queue-rebase
Add this label to allow the Commit Queue to land a PR in several commits.
lib / src
Issues and PRs related to general changes in the lib or src directory.
needs-ci
PRs that need a full CI run.
node-api
Issues and PRs related to the Node-API.
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.
src: move Node-API version detection to where it is used
src/js_native_api_types.hand other files actually depend onthe moved macros being evaluated, so before this change there
was an implicit requirement that
src/js_native_api.hwould beincluded separately before any include of
src/js_native_api_types.h, direct or transitive.src: move
napi_addon_register_functonode_api_types.hThis means that
node.hcan include only this file, instead ofthe entirety of
node_api.h.Split out from #60496 since
it was rightfully pointed out that the breaking part of the change
should not touch Node-API headers.