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

fix: node 12 build errors for windows #331

Merged
merged 2 commits into from
Jul 6, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@ jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
node_8_x:
node_version: 8.x
node_9_x:
node_version: 9.x
node_10_x:
node_version: 10.x
node_11_x:
node_version: 11.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
npm i
Expand All @@ -25,10 +37,22 @@ jobs:
- job: macOS
pool:
vmImage: 'xcode9-macos10.13'
strategy:
matrix:
node_8_x:
node_version: 8.x
node_9_x:
node_version: 9.x
node_10_x:
node_version: 10.x
node_11_x:
node_version: 11.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
npm i
Expand All @@ -43,10 +67,22 @@ jobs:
- job: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
node_8_x:
node_version: 8.x
node_9_x:
node_version: 9.x
node_10_x:
node_version: 10.x
node_11_x:
node_version: 11.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
npm i
Expand Down
4 changes: 2 additions & 2 deletions src/win/conpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ static NAN_METHOD(PtyStartProcess) {
const std::wstring filename(path_util::to_wstring(Nan::Utf8String(info[0])));
const SHORT cols = info[1]->Uint32Value(Nan::GetCurrentContext()).FromJust();
const SHORT rows = info[2]->Uint32Value(Nan::GetCurrentContext()).FromJust();
const bool debug = info[3]->ToBoolean(Nan::GetCurrentContext()).ToLocalChecked()->IsTrue();
const bool debug = Nan::To<bool>(info[3]).FromJust();
const std::wstring pipeName(path_util::to_wstring(Nan::Utf8String(info[4])));
const bool inheritCursor = info[5]->ToBoolean(Nan::GetCurrentContext()).ToLocalChecked()->IsTrue();
const bool inheritCursor = Nan::To<bool>(info[5]).FromJust();

// use environment 'Path' variable to determine location of
// the relative path that we have recieved (e.g cmd.exe)
Expand Down
2 changes: 1 addition & 1 deletion src/win/winpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static NAN_METHOD(PtyStartProcess) {

int cols = info[4]->Int32Value(Nan::GetCurrentContext()).FromJust();
int rows = info[5]->Int32Value(Nan::GetCurrentContext()).FromJust();
bool debug = info[6]->ToBoolean(Nan::GetCurrentContext()).ToLocalChecked()->IsTrue();
bool debug = Nan::To<bool>(info[6]).FromJust();

// Enable/disable debugging
SetEnvironmentVariable(WINPTY_DBG_VARIABLE, debug ? "1" : NULL); // NULL = deletes variable
Expand Down