Skip to content
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

Port to NAPI #644

Merged
merged 10 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 44 additions & 4 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,17 @@
'targets': [
{
'target_name': 'conpty',
'cflags!': [ '-fno-exceptions' ],
kkocdko marked this conversation as resolved.
Show resolved Hide resolved
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
},
'msvs_settings': {
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
},
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
'<!(node -p "require(\'node-addon-api\').include_dir")'
],
'sources' : [
'src/win/conpty.cc',
Expand All @@ -41,17 +50,35 @@
},
{
'target_name': 'conpty_console_list',
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
},
'msvs_settings': {
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
},
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
'<!(node -p "require(\'node-addon-api\').include_dir")'
],
'sources' : [
'src/win/conpty_console_list.cc'
],
},
{
'target_name': 'pty',
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
},
'msvs_settings': {
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
},
'include_dirs' : [
'<!(node -e "require(\'nan\')")',
'<!(node -p "require(\'node-addon-api\').include_dir")',
'deps/winpty/src/include',
],
# Disabled due to winpty
Expand All @@ -73,8 +100,17 @@
'targets': [
{
'target_name': 'pty',
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
},
'msvs_settings': {
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
},
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
'<!(node -p "require(\'node-addon-api\').include_dir")'
],
'sources': [
'src/unix/pty.cc',
Expand All @@ -93,7 +129,9 @@
]
}],
['OS=="mac"', {
"cflags+": ["-fvisibility=hidden"],
"xcode_settings": {
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES", # -fvisibility=hidden
"MACOSX_DEPLOYMENT_TARGET":"10.7"
}
}]
Expand All @@ -109,7 +147,9 @@
'sources': [
'src/unix/spawn-helper.cc',
],
"cflags+": ["-fvisibility=hidden"],
"xcode_settings": {
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES",
"MACOSX_DEPLOYMENT_TARGET":"10.7"
}
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"nan": "^2.17.0"
},
"devDependencies": {
"@types/mocha": "^7.0.2",
Expand All @@ -54,6 +53,8 @@
"eslint": "^6.8.0",
"mocha": "10",
"node-gyp": "^9.4.0",
"node-addon-api": "^7.0.0",
kkocdko marked this conversation as resolved.
Show resolved Hide resolved
"node-api-headers": "^1.1.0",
kkocdko marked this conversation as resolved.
Show resolved Hide resolved
"ps-list": "^6.0.0",
"typescript": "^3.8.3"
}
Expand Down
Loading