Skip to content

Commit d5b6578

Browse files
authored
Fix a build error during build_electron (#199)
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
1 parent b1de6d1 commit d5b6578

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
--- node_modules/node-addon-api/index.js 2017-08-26 03:40:40.000000000 +0900
2-
+++ node_modules_electron/node-addon-api/index.js 2017-10-08 22:32:13.000000000 +0900
1+
diff -urN node_modules/node-addon-api/index.js node_modules_electron/node-addon-api/index.js
2+
--- node_modules/node-addon-api/index.js 2017-11-22 20:11:18.000000000 +0900
3+
+++ node_modules_electron/node-addon-api/index.js 2017-11-22 20:33:45.000000000 +0900
34
@@ -14,8 +14,7 @@
45
// We know which version of Node.js first shipped the incarnation of the API
56
// available in *this* package. So, if we find that the Node.js version is below
67
// that, we indicate that the API is missing from Node.js.
78
-var isNodeApiBuiltin =
8-
- (versionArray[0] >= 8 && versionArray[1] >= 4 && versionArray[2] >= 0);
9+
- (versionArray[0] > 8 || (versionArray[0] == 8 && versionArray[1] > 5));
910
+var isNodeApiBuiltin = false;
1011

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

0 commit comments

Comments
 (0)