diff --git a/packages/grpc-native-core/ext/channel.cc b/packages/grpc-native-core/ext/channel.cc index f23dbd58..14293abd 100644 --- a/packages/grpc-native-core/ext/channel.cc +++ b/packages/grpc-native-core/ext/channel.cc @@ -289,7 +289,7 @@ NAN_METHOD(Channel::GetConnectivityState) { return Nan::ThrowError( "Cannot call getConnectivityState on a closed Channel"); } - int try_to_connect = (int)info[0]->Equals(Nan::True()); + int try_to_connect = (int)info[0]->StrictEquals(Nan::True()); info.GetReturnValue().Set(grpc_channel_check_connectivity_state( channel->wrapped_channel, try_to_connect)); } diff --git a/packages/grpc-native-core/ext/channel_credentials.cc b/packages/grpc-native-core/ext/channel_credentials.cc index a586b3e6..60184b2b 100644 --- a/packages/grpc-native-core/ext/channel_credentials.cc +++ b/packages/grpc-native-core/ext/channel_credentials.cc @@ -194,7 +194,7 @@ NAN_METHOD(ChannelCredentials::CreateSsl) { if (!info[3]->IsObject()) { return Nan::ThrowTypeError("createSsl's fourth argument must be an object"); } - Local object = info[3]->ToObject(); + Local object = Nan::To(info[3]).ToLocalChecked(); Local checkServerIdentityValue = Nan::Get(object, Nan::New("checkServerIdentity").ToLocalChecked()).ToLocalChecked(); diff --git a/packages/grpc-native-core/ext/server_credentials.cc b/packages/grpc-native-core/ext/server_credentials.cc index 1ce86632..fe26e3a9 100644 --- a/packages/grpc-native-core/ext/server_credentials.cc +++ b/packages/grpc-native-core/ext/server_credentials.cc @@ -66,7 +66,7 @@ void ServerCredentials::Init(Local exports) { Local tpl = Nan::New(New); tpl->SetClassName(Nan::New("ServerCredentials").ToLocalChecked()); tpl->InstanceTemplate()->SetInternalFieldCount(1); - Local ctr = tpl->GetFunction(); + Local ctr = Nan::GetFunction(tpl).ToLocalChecked(); Nan::Set( ctr, Nan::New("createSsl").ToLocalChecked(), Nan::GetFunction(Nan::New(CreateSsl)).ToLocalChecked()); diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 30c7f05b..4e9bcab3 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -31,7 +31,7 @@ "dependencies": { "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", - "nan": "^2.0.0", + "nan": "^2.13.2", "node-pre-gyp": "^0.12.0", "protobufjs": "^5.0.3" },