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

feat(deps): update gts dependency for generate client library #343

Merged
merged 32 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d65122e
update package.json
xiaozhenliu-gg5 Mar 19, 2020
d7d9657
add templates
xiaozhenliu-gg5 Mar 19, 2020
d345bef
Merge branch 'master' into update-gts-template
xiaozhenliu-gg5 Mar 20, 2020
c2cdb7e
lint
xiaozhenliu-gg5 Mar 20, 2020
edef8b5
Merge branch 'update-gts-template' of github.com:googleapis/gapic-gen…
xiaozhenliu-gg5 Mar 20, 2020
9b5c217
fix gts lint
xiaozhenliu-gg5 Mar 20, 2020
f5b5f43
prefer-spread
xiaozhenliu-gg5 Mar 20, 2020
8aff580
Merge branch 'master' into update-gts-template
xiaozhenliu-gg5 Mar 20, 2020
8e3c9cb
remove global rules
xiaozhenliu-gg5 Mar 23, 2020
5c9212d
remove pagination import
xiaozhenliu-gg5 Mar 24, 2020
26741c1
Merge branch 'update-gts-template' of github.com:googleapis/gapic-gen…
xiaozhenliu-gg5 Mar 24, 2020
5fb9e32
template change for new gts
xiaozhenliu-gg5 Mar 24, 2020
2e70b2b
Merge branch 'master' into update-gts-template
xiaozhenliu-gg5 Mar 24, 2020
4b3b311
remove tslint no-any
xiaozhenliu-gg5 Mar 24, 2020
df79361
Merge branch 'update-gts-template' of github.com:googleapis/gapic-gen…
xiaozhenliu-gg5 Mar 24, 2020
8b9c59f
Merge branch 'master' into update-gts-template
xiaozhenliu-gg5 Mar 24, 2020
4ec7a3c
test
xiaozhenliu-gg5 Mar 24, 2020
ad38cd8
use paginationCallback & response, remove empty-function check
xiaozhenliu-gg5 Mar 25, 2020
92a27bc
update gts to latest
xiaozhenliu-gg5 Mar 25, 2020
d0f9727
test
xiaozhenliu-gg5 Mar 25, 2020
8a3f17e
test
xiaozhenliu-gg5 Mar 25, 2020
f18194a
test
xiaozhenliu-gg5 Mar 25, 2020
f75d0ad
change back
xiaozhenliu-gg5 Mar 25, 2020
69aad40
test
xiaozhenliu-gg5 Mar 25, 2020
05ae7ff
test
xiaozhenliu-gg5 Mar 25, 2020
a8265e2
test
xiaozhenliu-gg5 Mar 25, 2020
008006b
test
xiaozhenliu-gg5 Mar 25, 2020
6f8bf6d
test
xiaozhenliu-gg5 Mar 25, 2020
b1b5f6a
test
xiaozhenliu-gg5 Mar 25, 2020
5ffdd76
try this
alexander-fenster Mar 25, 2020
f7ba3d7
and finally
alexander-fenster Mar 25, 2020
688d877
work!
xiaozhenliu-gg5 Mar 26, 2020
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
6 changes: 6 additions & 0 deletions baselines/bigquery-storage/.eslintignore.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/node_modules
**/.coverage
build/
docs/
protos/
system-test/
3 changes: 3 additions & 0 deletions baselines/bigquery-storage/.eslintrc.json.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
2 changes: 1 addition & 1 deletion baselines/bigquery-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.30",
"c8": "^7.1.0",
"gts": "^1.1.2",
"gts": "next",
"jsdoc": "^3.6.3",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export class BigQueryStorageClient {
this.bigQueryStorageStub = this._gaxGrpc.createStub(
this._opts.fallback ?
(this._protos as protobuf.Root).lookupService('google.cloud.bigquery.storage.v1beta1.BigQueryStorage') :
// tslint:disable-next-line no-any
/* eslint-disable @typescript-eslint/no-explicit-any */
(this._protos as any).google.cloud.bigquery.storage.v1beta1.BigQueryStorage,
this._opts) as Promise<{[method: string]: Function}>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import * as protosTypes from '../protos/protos';
import * as assert from 'assert';
import { describe, it } from 'mocha';
/* eslint-disable @typescript-eslint/no-var-requires */
const bigquerystorageModule = require('../src');
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved

import {PassThrough} from 'stream';
Expand All @@ -41,7 +42,9 @@ export interface Callback {
}

export class Operation{
/* eslint-disable @typescript-eslint/no-empty-function */
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved
constructor(){};
/* eslint-disable @typescript-eslint/no-empty-function */
promise() {};
}
function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) {
Expand Down Expand Up @@ -155,8 +158,6 @@ describe('v1beta1.BigQueryStorageClient', () => {
request.tableReference.projectId = '';
request.tableReference = {};
request.tableReference.datasetId = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.createReadSession = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -209,8 +210,6 @@ describe('v1beta1.BigQueryStorageClient', () => {
const request: protosTypes.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest = {};
request.session = {};
request.session.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.batchCreateReadSessionStreams = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -263,8 +262,6 @@ describe('v1beta1.BigQueryStorageClient', () => {
const request: protosTypes.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest = {};
request.stream = {};
request.stream.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.finalizeStream = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -317,8 +314,6 @@ describe('v1beta1.BigQueryStorageClient', () => {
const request: protosTypes.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest = {};
request.originalStream = {};
request.originalStream.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.splitReadStream = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -372,8 +367,6 @@ describe('v1beta1.BigQueryStorageClient', () => {
request.readPosition = {};
request.readPosition.stream = {};
request.readPosition.stream.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.readRows = mockServerStreamingGrpcMethod(request, null, error);
const stream = client.readRows(request);
Expand Down
6 changes: 6 additions & 0 deletions baselines/disable-packing-test/.eslintignore.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/node_modules
**/.coverage
build/
docs/
protos/
system-test/
3 changes: 3 additions & 0 deletions baselines/disable-packing-test/.eslintrc.json.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
2 changes: 1 addition & 1 deletion baselines/disable-packing-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.30",
"c8": "^7.1.0",
"gts": "^1.1.2",
"gts": "next",
"jsdoc": "^3.6.3",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// ** All changes to this file may be overwritten. **

import * as gax from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax';
import * as path from 'path';

import { Transform } from 'stream';
Expand Down Expand Up @@ -185,6 +185,7 @@ export class EchoClient {
// an Operation object that allows for tracking of the operation,
// rather than holding a request open.
const protoFilesRoot = opts.fallback?
/* eslint-disable @typescript-eslint/no-var-requires */
this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) :
this._gaxModule.protobuf.loadSync(nodejsProtoPath);

Expand Down Expand Up @@ -237,7 +238,7 @@ export class EchoClient {
this.echoStub = this._gaxGrpc.createStub(
this._opts.fallback ?
(this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') :
// tslint:disable-next-line no-any
/* eslint-disable @typescript-eslint/no-explicit-any */
(this._protos as any).google.showcase.v1beta1.Echo,
this._opts) as Promise<{[method: string]: Function}>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// ** All changes to this file may be overwritten. **

import * as gax from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax';
import * as path from 'path';

import { Transform } from 'stream';
Expand Down Expand Up @@ -201,7 +201,7 @@ export class IdentityClient {
this.identityStub = this._gaxGrpc.createStub(
this._opts.fallback ?
(this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') :
// tslint:disable-next-line no-any
/* eslint-disable @typescript-eslint/no-explicit-any */
(this._protos as any).google.showcase.v1beta1.Identity,
this._opts) as Promise<{[method: string]: Function}>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// ** All changes to this file may be overwritten. **

import * as gax from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax';
import * as path from 'path';

import { Transform } from 'stream';
Expand Down Expand Up @@ -186,6 +186,7 @@ export class MessagingClient {
// an Operation object that allows for tracking of the operation,
// rather than holding a request open.
const protoFilesRoot = opts.fallback?
/* eslint-disable @typescript-eslint/no-var-requires */
this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) :
this._gaxModule.protobuf.loadSync(nodejsProtoPath);

Expand Down Expand Up @@ -238,7 +239,7 @@ export class MessagingClient {
this.messagingStub = this._gaxGrpc.createStub(
this._opts.fallback ?
(this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') :
// tslint:disable-next-line no-any
/* eslint-disable @typescript-eslint/no-explicit-any */
(this._protos as any).google.showcase.v1beta1.Messaging,
this._opts) as Promise<{[method: string]: Function}>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// ** All changes to this file may be overwritten. **

import * as gax from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax';
import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax';
import * as path from 'path';

import { Transform } from 'stream';
Expand Down Expand Up @@ -204,7 +204,7 @@ export class TestingClient {
this.testingStub = this._gaxGrpc.createStub(
this._opts.fallback ?
(this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') :
// tslint:disable-next-line no-any
/* eslint-disable @typescript-eslint/no-explicit-any */
(this._protos as any).google.showcase.v1beta1.Testing,
this._opts) as Promise<{[method: string]: Function}>;

Expand Down
13 changes: 3 additions & 10 deletions baselines/disable-packing-test/test/gapic-echo-v1beta1.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import * as protosTypes from '../protos/protos';
import * as assert from 'assert';
import { describe, it } from 'mocha';
/* eslint-disable @typescript-eslint/no-var-requires */
const echoModule = require('../src');

import {PassThrough} from 'stream';
Expand All @@ -41,7 +42,9 @@ export interface Callback {
}

export class Operation{
/* eslint-disable @typescript-eslint/no-empty-function */
constructor(){};
/* eslint-disable @typescript-eslint/no-empty-function */
promise() {};
}
function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) {
Expand Down Expand Up @@ -182,8 +185,6 @@ describe('v1beta1.EchoClient', () => {
client.initialize();
// Mock request
const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.echo = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -232,8 +233,6 @@ describe('v1beta1.EchoClient', () => {
client.initialize();
// Mock request
const request: protosTypes.google.showcase.v1beta1.IBlockRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.block = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -285,8 +284,6 @@ describe('v1beta1.EchoClient', () => {
client.initialize();
// Mock request
const request: protosTypes.google.showcase.v1beta1.IWaitRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.wait = mockLongRunningGrpcMethod(
request,
Expand Down Expand Up @@ -338,8 +335,6 @@ describe('v1beta1.EchoClient', () => {
client.initialize();
// Mock request
const request: protosTypes.google.showcase.v1beta1.IExpandRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.expand = mockServerStreamingGrpcMethod(request, null, error);
const stream = client.expand(request);
Expand Down Expand Up @@ -385,8 +380,6 @@ describe('v1beta1.EchoClient', () => {
client.initialize();
// Mock request
const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.chat = mockBidiStreamingGrpcMethod(request, null, error);
const stream = client.chat().on('data', () =>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import * as protosTypes from '../protos/protos';
import * as assert from 'assert';
import { describe, it } from 'mocha';
/* eslint-disable @typescript-eslint/no-var-requires */
const identityModule = require('../src');


Expand All @@ -39,7 +40,9 @@ export interface Callback {
}

export class Operation{
/* eslint-disable @typescript-eslint/no-empty-function */
constructor(){};
/* eslint-disable @typescript-eslint/no-empty-function */
promise() {};
}
function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) {
Expand Down Expand Up @@ -128,8 +131,6 @@ describe('v1beta1.IdentityClient', () => {
client.initialize();
// Mock request
const request: protosTypes.google.showcase.v1beta1.ICreateUserRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.createUser = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -180,8 +181,6 @@ describe('v1beta1.IdentityClient', () => {
// Mock request
const request: protosTypes.google.showcase.v1beta1.IGetUserRequest = {};
request.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.getUser = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -234,8 +233,6 @@ describe('v1beta1.IdentityClient', () => {
const request: protosTypes.google.showcase.v1beta1.IUpdateUserRequest = {};
request.user = {};
request.user.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.updateUser = mockSimpleGrpcMethod(
request,
Expand Down Expand Up @@ -286,8 +283,6 @@ describe('v1beta1.IdentityClient', () => {
// Mock request
const request: protosTypes.google.showcase.v1beta1.IDeleteUserRequest = {};
request.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
client._innerApiCalls.deleteUser = mockSimpleGrpcMethod(
request,
Expand Down
Loading