Skip to content

Commit 547f1a1

Browse files
renovate[bot]JustinBeckwith
authored andcommitted
fix(deps): update dependency google-gax to v1 (#402)
1 parent 2a7c3ab commit 547f1a1

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@
4848
"dependencies": {
4949
"@google-cloud/projectify": "^1.0.0",
5050
"@google-cloud/promisify": "^1.0.0",
51+
"@grpc/grpc-js": "^0.4.0",
5152
"@types/duplexify": "^3.6.0",
5253
"@types/long": "^4.0.0",
5354
"arrify": "^2.0.0",
5455
"concat-stream": "^2.0.0",
5556
"extend": "^3.0.1",
5657
"google-auth-library": "^4.0.0",
57-
"google-gax": "^0.26.0",
58+
"google-gax": "^1.0.0",
5859
"is": "^3.2.1",
5960
"lodash.merge": "^4.6.1",
6061
"split-array-stream": "^2.0.0",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import arrify = require('arrify');
2828
import {GoogleAuth, GoogleAuthOptions} from 'google-auth-library';
2929
import {GrpcClient} from 'google-gax';
30-
import {ChannelCredentials} from 'grpc';
30+
import {ChannelCredentials} from '@grpc/grpc-js';
3131
import * as is from 'is';
3232

3333
import {entity} from './entity';

test/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const fakeGoogleGax = {
7777
constructor(opts: gax.GrpcClientOptions) {
7878
// super constructor must be called first!
7979
super(opts);
80-
this.grpc = {
80+
this.grpc = ({
8181
credentials: {
8282
createInsecure() {
8383
return (createInsecureOverride || (() => {})).apply(
@@ -86,7 +86,7 @@ const fakeGoogleGax = {
8686
);
8787
},
8888
},
89-
} as gax.GrpcModule;
89+
} as {}) as gax.GrpcModule;
9090
}
9191
},
9292
};

test/request.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import * as pjy from '@google-cloud/projectify';
1818
import * as pfy from '@google-cloud/promisify';
1919
import * as assert from 'assert';
2020
import * as extend from 'extend';
21-
import {CallOptions} from 'grpc';
21+
import {CallOptions} from '@grpc/grpc-js';
2222
import * as is from 'is';
2323
import * as proxyquire from 'proxyquire';
2424
import * as sinon from 'sinon';
@@ -1649,7 +1649,8 @@ describe('Request', () => {
16491649
it('should send gaxOpts', done => {
16501650
request.datastore.clients_ = new Map();
16511651
request.datastore.clients_.set(CONFIG.client, {
1652-
[CONFIG.method](_: object, gaxO: CallOptions) {
1652+
// tslint:disable-next-line no-any
1653+
[CONFIG.method](_: object, gaxO: any) {
16531654
delete gaxO.headers;
16541655
assert.deepStrictEqual(gaxO, CONFIG.gaxOpts);
16551656
done();
@@ -1662,7 +1663,8 @@ describe('Request', () => {
16621663
it('should send google-cloud-resource-prefix', done => {
16631664
request.datastore.clients_ = new Map();
16641665
request.datastore.clients_.set(CONFIG.client, {
1665-
[CONFIG.method](_: object, gaxO: CallOptions) {
1666+
// tslint:disable-next-line no-any
1667+
[CONFIG.method](_: object, gaxO: any) {
16661668
assert.deepStrictEqual(gaxO.headers, {
16671669
'google-cloud-resource-prefix': 'projects/' + PROJECT_ID,
16681670
});

0 commit comments

Comments
 (0)