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 all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions azure-pipelines.yml
Expand Up @@ -42,6 +42,9 @@ jobs:
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
python3 -m pip install setuptools
displayName: Install setuptools (macOS)
- script: |
npm i
displayName: 'Install dependencies and build'
Expand All @@ -54,7 +57,7 @@ jobs:

- job: Windows
pool:
vmImage: 'windows-2019'
vmImage: 'windows-latest'
strategy:
matrix:
node_16_x:
Expand Down Expand Up @@ -87,7 +90,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
versionSpec: '18.x'
displayName: 'Install Node.js'
- script: |
npm i
Expand Down
19 changes: 4 additions & 15 deletions binding.gyp
@@ -1,5 +1,8 @@
{
'target_defaults': {
'dependencies': [
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
],
'conditions': [
['OS=="win"', {
'msvs_configuration_attributes': {
Expand Down Expand Up @@ -28,9 +31,6 @@
'targets': [
{
'target_name': 'conpty',
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
],
'sources' : [
'src/win/conpty.cc',
'src/win/path_util.cc'
Expand All @@ -41,17 +41,14 @@
},
{
'target_name': 'conpty_console_list',
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
],
'sources' : [
'src/win/conpty_console_list.cc'
],
},
{
'target_name': 'pty',
'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,9 +70,6 @@
'targets': [
{
'target_name': 'pty',
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
],
'sources': [
'src/unix/pty.cc',
],
Expand All @@ -91,11 +85,6 @@
'libraries!': [
'-lutil'
]
}],
['OS=="mac"', {
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET":"10.7"
}
}]
]
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -43,7 +43,7 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"nan": "^2.17.0"
"node-addon-api": "^7.1.0"
},
"devDependencies": {
"@types/mocha": "^7.0.2",
Expand Down