Skip to content

Commit

Permalink
Fix a build error during build_electron (#199)
Browse files Browse the repository at this point in the history
It's a regression after 6c08eee.
We should use the external N-API for electron build, but it's failed to apply
the related patch because there is a difference in the code due to the upgrade
of node-addon-api.

ISSUE=#198
  • Loading branch information
romandev authored Nov 22, 2017
1 parent b1de6d1 commit d5b6578
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
--- node_modules/node-addon-api/index.js 2017-08-26 03:40:40.000000000 +0900
+++ node_modules_electron/node-addon-api/index.js 2017-10-08 22:32:13.000000000 +0900
diff -urN node_modules/node-addon-api/index.js node_modules_electron/node-addon-api/index.js
--- node_modules/node-addon-api/index.js 2017-11-22 20:11:18.000000000 +0900
+++ node_modules_electron/node-addon-api/index.js 2017-11-22 20:33:45.000000000 +0900
@@ -14,8 +14,7 @@
// We know which version of Node.js first shipped the incarnation of the API
// available in *this* package. So, if we find that the Node.js version is below
// that, we indicate that the API is missing from Node.js.
-var isNodeApiBuiltin =
- (versionArray[0] >= 8 && versionArray[1] >= 4 && versionArray[2] >= 0);
- (versionArray[0] > 8 || (versionArray[0] == 8 && versionArray[1] > 5));
+var isNodeApiBuiltin = false;

// So far it looks like even version 9 will need the flag. We need to adjust
// this for the version where the flag is dropped whenever that version lands.
// The flag is not needed when the Node version is not 8, nor if the API is
// built-in, because we removed the flag at the same time as creating the final

0 comments on commit d5b6578

Please sign in to comment.