-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add napi crosswalk #398
Add napi crosswalk #398
Conversation
@springmeyer The |
@jschlight thanks for sharing.
So, my script uses the Also, another 2 questions for you:
|
@jschlight I'll also mention that my confusions/questions are coming from trying to get TryGhost/node-sqlite3#1008 working. It seems like I have two options:
It is the diff --git a/package.json b/package.json
index a7a6e1b..cd0e6d5 100644
--- a/package.json
+++ b/package.json
@@ -9,13 +9,10 @@
},
"binary": {
"module_name": "node_sqlite3",
- "module_path": "./lib/binding/napi-v{napi_build_version}",
+ "module_path": "./lib/binding/{node_abi_napi}",
"host": "https://mapbox-node-binary.s3.amazonaws.com",
"remote_path": "./{name}/v{version}/{configuration}/{toolset}/",
- "package_name": "{platform}-{arch}-napi-v{napi_build_version}.tar.gz",
- "napi_versions": [
- 1
- ]
+ "package_name": "{platform}-{arch}-napi-v{node_abi_napi}.tar.gz"
},
"contributors": [
"Konstantin Käfer <[email protected]>", Context: breaking node v4 support for node-sqlite3 I think could cause a lot of user pain if done soon (since we're not far out of LTS support for node v4). |
@springmeyer N-API was introduced in Node 8.0.0 and was in experimental status until Node 10.0.0 when it left experimental status. While in experimental status, the N-API implementation evolved. This means that every version of Node 8, 9, and 10 supports some version of N-API. Every version of Node that supports N-API includes a The current N-API implementation has since been back-ported to Node 6, currently in experimental status, starting with Node 6.14.2. When I first made the modifications to |
Thanks for the thoughts and extra links @jschlight. |
@springmeyer I've posted a proposed solution for building |
This crosswalk document tracks when the NAPI version is added or bumped in node core (e.g. nodejs/node@6572f63).
The reason I'm creating it is that I'm trying to figure out a way to support both node versions without NAPI support and multiple NAPI versions (in those node versions that do support NAPI). E.g. what if you want to make binaries for:
@jschlight - does this crosswalk look correct to you as a starting point to figure out why node versions support N-API? Also @jschlight can you explain why these lines are present and what they do?
node-pre-gyp/lib/util/napi.js
Lines 33 to 36 in 5ccf817
process.versions.napi
?