Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency google-gax to v1 #402

Merged
merged 2 commits into from
May 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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