Skip to content

Commit 3c3eea4

Browse files
committed
use napi
1 parent bb5354e commit 3c3eea4

File tree

4 files changed

+131
-147
lines changed

4 files changed

+131
-147
lines changed

binding.gyp

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,27 @@
2525
"defines": [
2626
"_IS_NEED_DIR_DIFF_PATCH=0",
2727
"_7ZIP_ST",
28-
"_IS_USED_MULTITHREAD=0"
28+
"_IS_USED_MULTITHREAD=0",
29+
"NAPI_VERSION=8"
2930
],
3031
"include_dirs" : [
31-
"<!(node -e \"require('nan')\")"
32+
"<!@(node -p \"require('node-addon-api').include\")"
3233
],
33-
'cflags!': [ '-fno-exceptions' ],
34-
'cflags_cc!': [ '-fno-exceptions' ],
35-
'conditions': [
36-
['OS=="mac"', {
37-
'xcode_settings': {
38-
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
34+
"cflags!": [ "-fno-exceptions" ],
35+
"cflags_cc!": [ "-fno-exceptions" ],
36+
"conditions": [
37+
["OS==\"mac\"", {
38+
"xcode_settings": {
39+
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
40+
"CLANG_CXX_LIBRARY": "libc++",
41+
"MACOSX_DEPLOYMENT_TARGET": "10.15"
42+
}
43+
}],
44+
["OS==\"win\"", {
45+
"msvs_settings": {
46+
"VCCLCompilerTool": {
47+
"ExceptionHandling": 1
48+
}
3949
}
4050
}]
4151
]

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-hdiffpatch",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "hdiffpatch port to node.js",
55
"main": "index.js",
66
"scripts": {
@@ -9,10 +9,10 @@
99
"prepack": "git submodule update --init --recursive"
1010
},
1111
"gypfile": true,
12-
"author": "housisong",
12+
"author": "housisong, sunnylqm",
1313
"license": "MIT",
1414
"dependencies": {
15-
"nan": "^2.24.0"
15+
"node-addon-api": "^8.5.0"
1616
},
1717
"devDependencies": {
1818
"md5": "^2.3.0"

0 commit comments

Comments
 (0)