Skip to content

Commit

Permalink
fix(deps): update dependency google-gax to v1 (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and JustinBeckwith committed May 11, 2019
1 parent 2a7c3ab commit 547f1a1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@
"dependencies": {
"@google-cloud/projectify": "^1.0.0",
"@google-cloud/promisify": "^1.0.0",
"@grpc/grpc-js": "^0.4.0",
"@types/duplexify": "^3.6.0",
"@types/long": "^4.0.0",
"arrify": "^2.0.0",
"concat-stream": "^2.0.0",
"extend": "^3.0.1",
"google-auth-library": "^4.0.0",
"google-gax": "^0.26.0",
"google-gax": "^1.0.0",
"is": "^3.2.1",
"lodash.merge": "^4.6.1",
"split-array-stream": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import arrify = require('arrify');
import {GoogleAuth, GoogleAuthOptions} from 'google-auth-library';
import {GrpcClient} from 'google-gax';
import {ChannelCredentials} from 'grpc';
import {ChannelCredentials} from '@grpc/grpc-js';
import * as is from 'is';

import {entity} from './entity';
Expand Down
4 changes: 2 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const fakeGoogleGax = {
constructor(opts: gax.GrpcClientOptions) {
// super constructor must be called first!
super(opts);
this.grpc = {
this.grpc = ({
credentials: {
createInsecure() {
return (createInsecureOverride || (() => {})).apply(
Expand All @@ -86,7 +86,7 @@ const fakeGoogleGax = {
);
},
},
} as gax.GrpcModule;
} as {}) as gax.GrpcModule;
}
},
};
Expand Down
8 changes: 5 additions & 3 deletions test/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as pjy from '@google-cloud/projectify';
import * as pfy from '@google-cloud/promisify';
import * as assert from 'assert';
import * as extend from 'extend';
import {CallOptions} from 'grpc';
import {CallOptions} from '@grpc/grpc-js';
import * as is from 'is';
import * as proxyquire from 'proxyquire';
import * as sinon from 'sinon';
Expand Down Expand Up @@ -1649,7 +1649,8 @@ describe('Request', () => {
it('should send gaxOpts', done => {
request.datastore.clients_ = new Map();
request.datastore.clients_.set(CONFIG.client, {
[CONFIG.method](_: object, gaxO: CallOptions) {
// tslint:disable-next-line no-any
[CONFIG.method](_: object, gaxO: any) {
delete gaxO.headers;
assert.deepStrictEqual(gaxO, CONFIG.gaxOpts);
done();
Expand All @@ -1662,7 +1663,8 @@ describe('Request', () => {
it('should send google-cloud-resource-prefix', done => {
request.datastore.clients_ = new Map();
request.datastore.clients_.set(CONFIG.client, {
[CONFIG.method](_: object, gaxO: CallOptions) {
// tslint:disable-next-line no-any
[CONFIG.method](_: object, gaxO: any) {
assert.deepStrictEqual(gaxO.headers, {
'google-cloud-resource-prefix': 'projects/' + PROJECT_ID,
});
Expand Down

0 comments on commit 547f1a1

Please sign in to comment.