Skip to content

Commit

Permalink
Update Node.js dependencies and fix annoyances (googleforgames#1415)
Browse files Browse the repository at this point in the history
* Fix health stream not closing properly. Update dependencies
* Fix Buffer deprecation warning
* Update test for fix
  • Loading branch information
steven-supersolid authored and ilkercelikyilmaz committed Oct 23, 2020
1 parent 9001be8 commit 02058e1
Show file tree
Hide file tree
Showing 6 changed files with 1,007 additions and 757 deletions.
2 changes: 1 addition & 1 deletion build/build-sdk-images/node/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ googleapis=/go/src/agones.dev/agones/proto/googleapis

cd /go/src/agones.dev/agones

protoc -I ${googleapis} -I ${sdk} --grpc_out=./sdks/nodejs/lib --plugin=protoc-gen-grpc=`which grpc_node_plugin` sdk.proto
protoc -I ${googleapis} -I ${sdk} --grpc_out=minimum_node_version=12:./sdks/nodejs/lib --plugin=protoc-gen-grpc=`which grpc_node_plugin` sdk.proto
protoc -I ${googleapis} -I ${sdk} --js_out=import_style=commonjs,binary:./sdks/nodejs/lib sdk.proto ${googleapis}/google/api/annotations.proto ${googleapis}/google/api/http.proto

header ./sdks/nodejs/lib/sdk_pb.js
Expand Down
8 changes: 4 additions & 4 deletions sdks/nodejs/lib/sdk_grpc_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function serialize_agones_dev_sdk_Duration(arg) {
if (!(arg instanceof sdk_pb.Duration)) {
throw new Error('Expected argument of type agones.dev.sdk.Duration');
}
return new Buffer(arg.serializeBinary());
return Buffer.from(arg.serializeBinary());
}

function deserialize_agones_dev_sdk_Duration(buffer_arg) {
Expand All @@ -35,7 +35,7 @@ function serialize_agones_dev_sdk_Empty(arg) {
if (!(arg instanceof sdk_pb.Empty)) {
throw new Error('Expected argument of type agones.dev.sdk.Empty');
}
return new Buffer(arg.serializeBinary());
return Buffer.from(arg.serializeBinary());
}

function deserialize_agones_dev_sdk_Empty(buffer_arg) {
Expand All @@ -46,7 +46,7 @@ function serialize_agones_dev_sdk_GameServer(arg) {
if (!(arg instanceof sdk_pb.GameServer)) {
throw new Error('Expected argument of type agones.dev.sdk.GameServer');
}
return new Buffer(arg.serializeBinary());
return Buffer.from(arg.serializeBinary());
}

function deserialize_agones_dev_sdk_GameServer(buffer_arg) {
Expand All @@ -57,7 +57,7 @@ function serialize_agones_dev_sdk_KeyValue(arg) {
if (!(arg instanceof sdk_pb.KeyValue)) {
throw new Error('Expected argument of type agones.dev.sdk.KeyValue');
}
return new Buffer(arg.serializeBinary());
return Buffer.from(arg.serializeBinary());
}

function deserialize_agones_dev_sdk_KeyValue(buffer_arg) {
Expand Down
Loading

0 comments on commit 02058e1

Please sign in to comment.