From b79229b96491931d911eac80e13308fc5ca251c7 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Aug 2019 11:39:01 -0700 Subject: [PATCH 01/15] Update native library to 1.23.0-pre1 --- packages/grpc-native-core/binding.gyp | 7 +++++-- packages/grpc-native-core/deps/grpc | 2 +- packages/grpc-native-core/package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 6dae2c5b..d50231f9 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -97,7 +97,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=1', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.22.0-pre1"', + 'GRPC_NODE_VERSION="1.23.0-pre1"', 'CARES_STATICLIB', 'CARES_SYMBOL_HIDING' ], @@ -691,7 +691,6 @@ 'deps/grpc/src/core/lib/gpr/env_linux.cc', 'deps/grpc/src/core/lib/gpr/env_posix.cc', 'deps/grpc/src/core/lib/gpr/env_windows.cc', - 'deps/grpc/src/core/lib/gpr/host_port.cc', 'deps/grpc/src/core/lib/gpr/log.cc', 'deps/grpc/src/core/lib/gpr/log_android.cc', 'deps/grpc/src/core/lib/gpr/log_linux.cc', @@ -718,6 +717,7 @@ 'deps/grpc/src/core/lib/gprpp/arena.cc', 'deps/grpc/src/core/lib/gprpp/fork.cc', 'deps/grpc/src/core/lib/gprpp/global_config_env.cc', + 'deps/grpc/src/core/lib/gprpp/host_port.cc', 'deps/grpc/src/core/lib/gprpp/thd_posix.cc', 'deps/grpc/src/core/lib/gprpp/thd_windows.cc', 'deps/grpc/src/core/lib/profiling/basic_timers.cc', @@ -782,6 +782,8 @@ 'deps/grpc/src/core/lib/iomgr/ev_windows.cc', 'deps/grpc/src/core/lib/iomgr/exec_ctx.cc', 'deps/grpc/src/core/lib/iomgr/executor.cc', + 'deps/grpc/src/core/lib/iomgr/executor/mpmcqueue.cc', + 'deps/grpc/src/core/lib/iomgr/executor/threadpool.cc', 'deps/grpc/src/core/lib/iomgr/fork_posix.cc', 'deps/grpc/src/core/lib/iomgr/fork_windows.cc', 'deps/grpc/src/core/lib/iomgr/gethostname_fallback.cc', @@ -1070,6 +1072,7 @@ 'deps/grpc/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc', 'deps/grpc/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc', 'deps/grpc/src/core/ext/filters/census/grpc_context.cc', + 'deps/grpc/src/core/ext/filters/client_idle/client_idle_filter.cc', 'deps/grpc/src/core/ext/filters/max_age/max_age_filter.cc', 'deps/grpc/src/core/ext/filters/message_size/message_size_filter.cc', 'deps/grpc/src/core/ext/filters/http/client_authority_filter.cc', diff --git a/packages/grpc-native-core/deps/grpc b/packages/grpc-native-core/deps/grpc index 35230ef8..2ae2bb7a 160000 --- a/packages/grpc-native-core/deps/grpc +++ b/packages/grpc-native-core/deps/grpc @@ -1 +1 @@ -Subproject commit 35230ef8cd70d62ab94bee661b7cd641adfa805b +Subproject commit 2ae2bb7abc9565ffed5f23eeb64fd4cd69c1e562 diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index ed360a39..39477913 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.22.0-pre1", + "version": "1.23.0-pre1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", From 43fa9398c7a0d707b5447e3b502fb492486dca93 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Aug 2019 17:24:31 -0700 Subject: [PATCH 02/15] Update submodule again --- packages/grpc-native-core/deps/grpc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grpc-native-core/deps/grpc b/packages/grpc-native-core/deps/grpc index 2ae2bb7a..ae91cd03 160000 --- a/packages/grpc-native-core/deps/grpc +++ b/packages/grpc-native-core/deps/grpc @@ -1 +1 @@ -Subproject commit 2ae2bb7abc9565ffed5f23eeb64fd4cd69c1e562 +Subproject commit ae91cd03818d6c4e7bc06efc261215338ce65475 From 96d9f2951c84b2b0849315cce5c4a006104be9c5 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 13 Aug 2019 10:13:17 -0700 Subject: [PATCH 03/15] Add Electron 6 to the artifact build list --- .../tools/run_tests/artifacts/build_artifact_electron.bat | 2 +- .../tools/run_tests/artifacts/build_artifact_electron.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.bat b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.bat index 89e38730..229d0f42 100644 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.bat +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.bat @@ -14,7 +14,7 @@ set arch_list=ia32 x64 -set electron_versions=1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0 +set electron_versions=1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0 6.0.0 set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.sh index 72c9b36f..a226a5a9 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.sh @@ -16,7 +16,7 @@ set -ex arch_list=( ia32 x64 ) -electron_versions=( 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0 ) +electron_versions=( 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0 6.0.0 ) umask 022 From 84d48a741544e17477f330772bd5b30cd46e2501 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 15 Aug 2019 14:30:20 -0700 Subject: [PATCH 04/15] Update version to 1.23.0 --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/deps/grpc | 2 +- packages/grpc-native-core/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index d50231f9..f60a6b1e 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -97,7 +97,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=1', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.23.0-pre1"', + 'GRPC_NODE_VERSION="1.23.0"', 'CARES_STATICLIB', 'CARES_SYMBOL_HIDING' ], diff --git a/packages/grpc-native-core/deps/grpc b/packages/grpc-native-core/deps/grpc index ae91cd03..7c076491 160000 --- a/packages/grpc-native-core/deps/grpc +++ b/packages/grpc-native-core/deps/grpc @@ -1 +1 @@ -Subproject commit ae91cd03818d6c4e7bc06efc261215338ce65475 +Subproject commit 7c0764918b9f33cab507ff483b4be849b0203ec4 diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 39477913..e44b68b9 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.23.0-pre1", + "version": "1.23.0", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", From 7c07d7615139413f34f8537ab934adceb7be8cd1 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 16 Aug 2019 13:02:59 -0700 Subject: [PATCH 05/15] Increase timeout for Windows Electron build --- test/kokoro/windows-build-electron.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/kokoro/windows-build-electron.cfg b/test/kokoro/windows-build-electron.cfg index 873b734a..7017d0ae 100644 --- a/test/kokoro/windows-build-electron.cfg +++ b/test/kokoro/windows-build-electron.cfg @@ -16,4 +16,4 @@ # Location of the continuous shell script in repository. build_file: "grpc-node/tools/release/kokoro-electron.bat" -timeout_mins: 60 +timeout_mins: 120 From 1bec9e2b5d9b3db5d44ffab5f08aa78e896d23d4 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 19 Aug 2019 12:46:46 -0700 Subject: [PATCH 06/15] Remove @types/protobufjs and bump to 1.23.1 --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/build.yaml | 1 + packages/grpc-native-core/package.json | 3 +-- packages/grpc-native-core/templates/package.json.template | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index f60a6b1e..1a8d2073 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -97,7 +97,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=1', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.23.0"', + 'GRPC_NODE_VERSION="1.23.1"', 'CARES_STATICLIB', 'CARES_SYMBOL_HIDING' ], diff --git a/packages/grpc-native-core/build.yaml b/packages/grpc-native-core/build.yaml index 49e36fdf..fa21241b 100644 --- a/packages/grpc-native-core/build.yaml +++ b/packages/grpc-native-core/build.yaml @@ -1,2 +1,3 @@ settings: '#': It's possible to have node_version here as a key to override the core's version. + node_version: 1.23.1 \ No newline at end of file diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index e44b68b9..816b2678 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.23.0", + "version": "1.23.1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", @@ -29,7 +29,6 @@ "node-pre-gyp" ], "dependencies": { - "@types/protobufjs": "^5.0.31", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", "nan": "^2.13.2", diff --git a/packages/grpc-native-core/templates/package.json.template b/packages/grpc-native-core/templates/package.json.template index 2d9bede7..080567c5 100644 --- a/packages/grpc-native-core/templates/package.json.template +++ b/packages/grpc-native-core/templates/package.json.template @@ -31,7 +31,6 @@ "node-pre-gyp" ], "dependencies": { - "@types/protobufjs": "^5.0.31", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", "nan": "^2.13.2", From f5294f7258a3222d114c7a23d993a84ba2e42d9b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 20 Aug 2019 10:11:49 -0700 Subject: [PATCH 07/15] Upmerge 1.22 into 1.23 --- packages/grpc-native-core/build.yaml | 2 +- packages/grpc-native-core/index.d.ts | 6 ++- packages/grpc-native-core/index.js | 4 +- packages/grpc-native-core/package.json | 2 + packages/grpc-native-core/src/client.js | 50 ++++++++++++++++++- packages/grpc-native-core/src/server.js | 3 +- .../templates/package.json.template | 2 + 7 files changed, 63 insertions(+), 6 deletions(-) diff --git a/packages/grpc-native-core/build.yaml b/packages/grpc-native-core/build.yaml index fa21241b..ce12f437 100644 --- a/packages/grpc-native-core/build.yaml +++ b/packages/grpc-native-core/build.yaml @@ -1,3 +1,3 @@ settings: '#': It's possible to have node_version here as a key to override the core's version. - node_version: 1.23.1 \ No newline at end of file + node_version: 1.23.1 diff --git a/packages/grpc-native-core/index.d.ts b/packages/grpc-native-core/index.d.ts index c7dab49d..f36b6e86 100644 --- a/packages/grpc-native-core/index.d.ts +++ b/packages/grpc-native-core/index.d.ts @@ -1,3 +1,5 @@ +import { EventEmitter } from "events"; + /* * Copyright 2019 gRPC authors. * @@ -341,7 +343,7 @@ declare module "grpc" { /** * An EventEmitter. Used for unary calls. */ - export class ServerUnaryCall { + export class ServerUnaryCall extends EventEmitter { /** * Indicates if the call has been cancelled */ @@ -1231,7 +1233,7 @@ declare module "grpc" { /** * An EventEmitter. Used for unary calls. */ - export class ClientUnaryCall { + export class ClientUnaryCall extends EventEmitter { private constructor(); /** diff --git a/packages/grpc-native-core/index.js b/packages/grpc-native-core/index.js index 9134667a..9534c7d4 100644 --- a/packages/grpc-native-core/index.js +++ b/packages/grpc-native-core/index.js @@ -312,7 +312,9 @@ exports.Client = client.Client; * @memberof grpc * @param {string} target The address of the server to connect to * @param {grpc.ChannelCredentials} credentials Channel credentials to use when connecting - * @param {grpc~ChannelOptions} options A map of channel options that will be passed to the core + * @param {grpc~ChannelOptions} options A map of channel options that will be passed to the core. + * The available options are listed in + * [this document]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}. */ exports.Channel = grpc.Channel; diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 816b2678..9edc2d96 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -75,6 +75,8 @@ "deps/grpc/third_party/nanopb/*.{c,cc,h}", "deps/grpc/third_party/upb/**/*.{c,h}", "deps/grpc/third_party/zlib/**/*.{c,cc,h}", + "deps/grpc/third_party/address_sorting/**/*.{c,h}", + "deps/grpc/third_party/cares/**/*.{c,h}", "binding.gyp" ], "main": "index.js", diff --git a/packages/grpc-native-core/src/client.js b/packages/grpc-native-core/src/client.js index 256f8d1c..faba6dec 100644 --- a/packages/grpc-native-core/src/client.js +++ b/packages/grpc-native-core/src/client.js @@ -353,6 +353,42 @@ ClientDuplexStream.prototype.getPeer = getPeer; * should be used to make this particular call. */ +/** + * Properties of a call, for use with a {@link grpc.Client~callInvocationTransformer}. + * @typedef {Object} grpc.Client~CallProperties + * @property {*} argument The call argument. Only preset if the method is unary or server streaming. + * @property {grpc.Metadata} metadata The request metadata + * @property {grpc~Call} call The call object that will be returned by the client method + * @property {grpc.Channel} channel The channel that will be used to make a request + * @property {grpc~MethodDefinition} methodDefinition The MethodDefinition object that describes this method + * @property {grpc.Client~CallOptions} options The call options passed when making this request + * @property {grpc.Client~requestCallback} callback The callback that will handle the response. + * Only present if this method is unary or client streaming. + */ + +/** + * Call invocation transformer. Has access to the full call properties before a + * call is processed and can modify most of those properties. Some modifications + * will have no effect or may cause problems. + * @name grpc.Client~callInvocationTransformer + * @function + * @param {grpc.Client~CallProperties} callProperties The original call properties + * @return {grpc.Client~CallProperties} The modified call properties. + */ + +/** + * A function that functionally replaces the Channel constructor. + * @name grpc.Client~channelFactory + * @function + * @param {string} target The address of the server to connect to + * @param {grpc.ChannelCredentials} credentials Channel credentials to use when connecting + * @param {grpc~ChannelOptions} options A map of channel options that will be passed to the core. + * The available options are listed in + * [this document]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}. + * @returns {grpc.Channel} This can either be an actual channel object, or an object with the + * same API. + */ + /** * A generic gRPC client. Primarily useful as a base class for generated clients * @memberof grpc @@ -360,7 +396,19 @@ ClientDuplexStream.prototype.getPeer = getPeer; * @param {string} address Server address to connect to * @param {grpc.credentials~ChannelCredentials} credentials Credentials to use * to connect to the server - * @param {Object} options Options to apply to channel creation + * @param {Object} options Options to apply to channel creation. Any of + * [the channel arguments]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html} + * can be used here in addition to specific client options. + * @param {grpc~Interceptor[]} [options.interceptors] Interceptors to apply to each request + * @param {grpc~InterceptorProvider[]} [options.interceptor_providers] Interceptor providers + * to apply interceptors to each request depending on the method definition. At most + * one of the interceptors and interceptor_providers options may be set. + * @param {grpc.Client~callInvocationTransformer=} options.callInvocationTransformer + * @param {grpc.Channel=} options.channelOverride Channel to use instead of constructing a new one. + * If set, the address, credentials, channel arguments options, and channelFactoryOverride + * option will all be ignored. + * @param {grpc.Client~channelFactory} options.channelFactoryOverride Function to use instead of + * the Channel constructor when creating the Client's channel. */ function Client(address, credentials, options) { var self = this; diff --git a/packages/grpc-native-core/src/server.js b/packages/grpc-native-core/src/server.js index b79ee6fc..f6ce0699 100644 --- a/packages/grpc-native-core/src/server.js +++ b/packages/grpc-native-core/src/server.js @@ -719,7 +719,8 @@ var streamHandlers = { * @memberof grpc * @constructor * @param {Object=} options Options that should be passed to the internal server - * implementation + * implementation. The available options are listed in + * [this document]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}. * @example * var server = new grpc.Server(); * server.addProtoService(protobuf_service_descriptor, service_implementation); diff --git a/packages/grpc-native-core/templates/package.json.template b/packages/grpc-native-core/templates/package.json.template index 080567c5..db054aa4 100644 --- a/packages/grpc-native-core/templates/package.json.template +++ b/packages/grpc-native-core/templates/package.json.template @@ -77,6 +77,8 @@ "deps/grpc/third_party/nanopb/*.{c,cc,h}", "deps/grpc/third_party/upb/**/*.{c,h}", "deps/grpc/third_party/zlib/**/*.{c,cc,h}", + "deps/grpc/third_party/address_sorting/**/*.{c,h}", + "deps/grpc/third_party/cares/**/*.{c,h}", "binding.gyp" ], "main": "index.js", From 42e9f6df61732bdd3d5accfc3cea2166f6f30ef2 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 20 Aug 2019 10:15:08 -0700 Subject: [PATCH 08/15] Bump to 1.23.2 --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/build.yaml | 2 +- packages/grpc-native-core/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 1a8d2073..894befd8 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -97,7 +97,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=1', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.23.1"', + 'GRPC_NODE_VERSION="1.23.2"', 'CARES_STATICLIB', 'CARES_SYMBOL_HIDING' ], diff --git a/packages/grpc-native-core/build.yaml b/packages/grpc-native-core/build.yaml index ce12f437..0197533d 100644 --- a/packages/grpc-native-core/build.yaml +++ b/packages/grpc-native-core/build.yaml @@ -1,3 +1,3 @@ settings: '#': It's possible to have node_version here as a key to override the core's version. - node_version: 1.23.1 + node_version: 1.23.2 diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 9edc2d96..519a8279 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.23.1", + "version": "1.23.2", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", From ccd8c628d96b4e01bfcf8fbc732ee7559d23486b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 20 Aug 2019 17:16:42 -0700 Subject: [PATCH 09/15] Install npm 6.10 on Windows --- tools/release/kokoro-electron.bat | 2 +- tools/release/kokoro-nodejs.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/release/kokoro-electron.bat b/tools/release/kokoro-electron.bat index 4bc1d0a2..c27db480 100644 --- a/tools/release/kokoro-electron.bat +++ b/tools/release/kokoro-electron.bat @@ -20,7 +20,7 @@ SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% call nvm install 10 call nvm use 10 -call npm install -g npm +call npm install -g npm@6.10.x @rem https://github.com/mapbox/node-pre-gyp/issues/362 call npm install -g node-gyp@3 diff --git a/tools/release/kokoro-nodejs.bat b/tools/release/kokoro-nodejs.bat index 0655d2df..faa6364a 100644 --- a/tools/release/kokoro-nodejs.bat +++ b/tools/release/kokoro-nodejs.bat @@ -20,7 +20,7 @@ SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% call nvm install 10 call nvm use 10 -call npm install -g npm +call npm install -g npm@6.10.x @rem https://github.com/mapbox/node-pre-gyp/issues/362 call npm install -g node-gyp@3 From 24a14d7f0469232df9e68a1ecbf3a8f8a60cc311 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 22 Aug 2019 11:35:22 -0700 Subject: [PATCH 10/15] Move EventEmitter inside declare module "grpc" --- packages/grpc-native-core/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grpc-native-core/index.d.ts b/packages/grpc-native-core/index.d.ts index f36b6e86..d1406efb 100644 --- a/packages/grpc-native-core/index.d.ts +++ b/packages/grpc-native-core/index.d.ts @@ -1,4 +1,3 @@ -import { EventEmitter } from "events"; /* * Copyright 2019 gRPC authors. @@ -19,6 +18,7 @@ import { EventEmitter } from "events"; declare module "grpc" { import { Message, Service as ProtobufService } from "protobufjs"; + import { EventEmitter } from "events"; import { Duplex, Readable, Writable } from "stream"; import { SecureContext } from "tls"; From d6866a837a898ce15a9a80e3e0beda01f0a21a36 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 22 Aug 2019 12:46:33 -0700 Subject: [PATCH 11/15] Add comment for future additions --- packages/grpc-native-core/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/grpc-native-core/index.d.ts b/packages/grpc-native-core/index.d.ts index d1406efb..7977c727 100644 --- a/packages/grpc-native-core/index.d.ts +++ b/packages/grpc-native-core/index.d.ts @@ -17,6 +17,7 @@ */ declare module "grpc" { + // add imports here, inside the "grpc" module, to keep it as an ambient module import { Message, Service as ProtobufService } from "protobufjs"; import { EventEmitter } from "events"; import { Duplex, Readable, Writable } from "stream"; From d434d132fc91b341f37c8199a15ff6f941d26644 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 22 Aug 2019 13:18:36 -0700 Subject: [PATCH 12/15] Duplicate relevant protobufjs type definition --- packages/grpc-native-core/index.d.ts | 41 ++++++++++++++++++- packages/grpc-native-core/package.json | 1 + .../templates/package.json.template | 1 + 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/packages/grpc-native-core/index.d.ts b/packages/grpc-native-core/index.d.ts index 7977c727..1f936311 100644 --- a/packages/grpc-native-core/index.d.ts +++ b/packages/grpc-native-core/index.d.ts @@ -16,13 +16,50 @@ * */ +/// + declare module "grpc" { // add imports here, inside the "grpc" module, to keep it as an ambient module - import { Message, Service as ProtobufService } from "protobufjs"; import { EventEmitter } from "events"; import { Duplex, Readable, Writable } from "stream"; import { SecureContext } from "tls"; + /* The Message interface is copied and slightly modified from @types/protobuf + * version 5.0.31, which was distributed under the following license: + * + * This project is licensed under the MIT license. + * Copyrights are respective of each contributor listed at the beginning of each definition file. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + export interface ProtobufMessage { + $add(key: string, value: any, noAssert?: boolean): ProtobufMessage; + $get(key: string): T; + $set(key: string | {[key: string]: any}, value?: any | boolean, noAssert?: boolean): void; + add(key: string, value: any, noAssert?: boolean): ProtobufMessage; + calculate(): number; + encode(buffer?: ByteBuffer | boolean, noVerify?: boolean): ByteBuffer; + encode64(): string; + encodeAB(): ArrayBuffer; + encodeNB(): Buffer; + encodeHex(): string; + encodeJSON(): string; + encodeDelimited(buffer?: ByteBuffer | boolean, noVerify?: boolean): ByteBuffer; + get(key: string, noAssert?: boolean): T; + set(key: string | {[key: string]: any}, value?: any | boolean, noAssert?: boolean): void; + toArrayBuffer(): ArrayBuffer; + toBase64(): string; + toBuffer(): Buffer; + toHex(): string; + toRaw(binaryAsBase64?: boolean, longsAsStrings?: boolean): {[key: string]: any}; + toString(): string; + [field: string]: any; + } + /** * Load a ProtoBuf.js object as a gRPC object. * @param value The ProtoBuf.js reflection object to load @@ -86,7 +123,7 @@ declare module "grpc" { * - Anything else becomes the relevant reflection object that ProtoBuf.js would create */ export interface GrpcObject { - [name: string]: GrpcObject | typeof Client | Message; + [name: string]: GrpcObject | typeof Client | ProtobufMessage; } /** diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 519a8279..3f691495 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -29,6 +29,7 @@ "node-pre-gyp" ], "dependencies": { + "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", "nan": "^2.13.2", diff --git a/packages/grpc-native-core/templates/package.json.template b/packages/grpc-native-core/templates/package.json.template index db054aa4..eaab7067 100644 --- a/packages/grpc-native-core/templates/package.json.template +++ b/packages/grpc-native-core/templates/package.json.template @@ -31,6 +31,7 @@ "node-pre-gyp" ], "dependencies": { + "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", "nan": "^2.13.2", From c12bebd979bf8ec0049f433c285f2a8567c6ec35 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 22 Aug 2019 13:23:38 -0700 Subject: [PATCH 13/15] Update to v1.23.3 --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/build.yaml | 2 +- packages/grpc-native-core/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 894befd8..2851af48 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -97,7 +97,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=1', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.23.2"', + 'GRPC_NODE_VERSION="1.23.3"', 'CARES_STATICLIB', 'CARES_SYMBOL_HIDING' ], diff --git a/packages/grpc-native-core/build.yaml b/packages/grpc-native-core/build.yaml index 0197533d..d6ebeea6 100644 --- a/packages/grpc-native-core/build.yaml +++ b/packages/grpc-native-core/build.yaml @@ -1,3 +1,3 @@ settings: '#': It's possible to have node_version here as a key to override the core's version. - node_version: 1.23.2 + node_version: 1.23.3 diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 519a8279..3fdac69a 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.23.2", + "version": "1.23.3", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", From 1e2a7cb2e3ba6bdeef71cc0e105821f8e68b49c6 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 1 Oct 2019 17:20:29 -0700 Subject: [PATCH 14/15] Bump submodule to 1.23.1 and library version to 1.23.4 --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/build.yaml | 2 +- packages/grpc-native-core/deps/grpc | 2 +- packages/grpc-native-core/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 2851af48..d058186a 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -97,7 +97,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=1', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.23.3"', + 'GRPC_NODE_VERSION="1.23.4"', 'CARES_STATICLIB', 'CARES_SYMBOL_HIDING' ], diff --git a/packages/grpc-native-core/build.yaml b/packages/grpc-native-core/build.yaml index d6ebeea6..7d06779b 100644 --- a/packages/grpc-native-core/build.yaml +++ b/packages/grpc-native-core/build.yaml @@ -1,3 +1,3 @@ settings: '#': It's possible to have node_version here as a key to override the core's version. - node_version: 1.23.3 + node_version: 1.23.4 diff --git a/packages/grpc-native-core/deps/grpc b/packages/grpc-native-core/deps/grpc index 7c076491..6a37b669 160000 --- a/packages/grpc-native-core/deps/grpc +++ b/packages/grpc-native-core/deps/grpc @@ -1 +1 @@ -Subproject commit 7c0764918b9f33cab507ff483b4be849b0203ec4 +Subproject commit 6a37b6696b359cb77d3ff13015234febdf9fd890 diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 74b5e77a..c0945a85 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.23.3", + "version": "1.23.4", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", From 029ecbe9b88c1aec1c8d2bbc82d23a04cc93825b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 21 Oct 2019 11:09:50 -0700 Subject: [PATCH 15/15] Bump submodule and version --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/build.yaml | 1 + packages/grpc-native-core/deps/grpc | 2 +- packages/grpc-native-core/package.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 0c814849..87dba780 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -91,7 +91,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=1', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.24.0"', + 'GRPC_NODE_VERSION="1.24.1"', 'CARES_STATICLIB', 'CARES_SYMBOL_HIDING' ], diff --git a/packages/grpc-native-core/build.yaml b/packages/grpc-native-core/build.yaml index 49e36fdf..52394dc8 100644 --- a/packages/grpc-native-core/build.yaml +++ b/packages/grpc-native-core/build.yaml @@ -1,2 +1,3 @@ settings: '#': It's possible to have node_version here as a key to override the core's version. + node_version: 1.24.1 \ No newline at end of file diff --git a/packages/grpc-native-core/deps/grpc b/packages/grpc-native-core/deps/grpc index 16fba7ba..85e22ef2 160000 --- a/packages/grpc-native-core/deps/grpc +++ b/packages/grpc-native-core/deps/grpc @@ -1 +1 @@ -Subproject commit 16fba7baa0a35d9028f1cd9827c907be7d97269e +Subproject commit 85e22ef28d55f27e8efb3d5e2e43ca6f59971065 diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index e41e46b2..63ce5cc8 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.24.0", + "version": "1.24.1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/",