From 0a8377a032846a93059fc8fce86b56da11580e9c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 10 Nov 2018 09:33:58 +0000 Subject: [PATCH 1/2] fix(deps): update dependency google-proto-files to ^0.18.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4540f59f0..e068bb7e3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@grpc/proto-loader": "^0.3.0", "duplexify": "^3.6.0", "google-auth-library": "^2.0.0", - "google-proto-files": "^0.17.0", + "google-proto-files": "^0.18.0", "grpc": "^1.15.1", "is-stream-ended": "^0.1.4", "lodash.at": "^4.6.0", From 9ed2ba61a07a82d582441f8bd1dcb41344c296cd Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 10 Nov 2018 11:10:57 -0800 Subject: [PATCH 2/2] fix build breaks --- src/grpc.ts | 5 ++--- src/operations_client.ts | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/grpc.ts b/src/grpc.ts index 7efeb3b96..36498508e 100644 --- a/src/grpc.ts +++ b/src/grpc.ts @@ -33,6 +33,7 @@ import * as grpcProtoLoaderTypes from '@grpc/proto-loader'; // for types only import * as fs from 'fs'; import {GoogleAuth, GoogleAuthOptions} from 'google-auth-library'; +import {getProtoPath} from 'google-proto-files'; import * as grpcTypes from 'grpc'; // for types only import {OutgoingHttpHeaders} from 'http'; import * as path from 'path'; @@ -42,9 +43,7 @@ import * as walk from 'walkdir'; import * as gax from './gax'; -let googleProtoFilesDir = require('google-proto-files')('..'); -googleProtoFilesDir = path.normalize(googleProtoFilesDir); - +const googleProtoFilesDir = path.normalize(getProtoPath('..')); // INCLUDE_DIRS is passed to @grpc/proto-loader const INCLUDE_DIRS: string[] = []; diff --git a/src/operations_client.ts b/src/operations_client.ts index f7d97bfc8..3f4f9c24d 100644 --- a/src/operations_client.ts +++ b/src/operations_client.ts @@ -24,6 +24,8 @@ * merge preserves those additions if the generated source changes. */ +import {getProtoPath} from 'google-proto-files'; + import * as apiCallable from './api_callable'; import * as gax from './gax'; import * as pagedIteration from './paged_iteration'; @@ -431,9 +433,10 @@ export class OperationsClient { return this['_deleteOperation'](request, options, callback); } } + export class OperationsClientBuilder { constructor(gaxGrpc) { - const protoFilesRoot = require('google-proto-files')('..'); + const protoFilesRoot = getProtoPath('..'); const operationsClient = gaxGrpc.loadProto( protoFilesRoot, 'google/longrunning/operations.proto'); Object.assign(this, operationsClient.google.longrunning);