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 13 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"
}
5 changes: 5 additions & 0 deletions baselines/bigquery-storage/.prettierignore.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules
**/.coverage
build/
docs/
protos/
17 changes: 17 additions & 0 deletions baselines/bigquery-storage/.prettierrc.js.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

module.exports = {
...require('gts/.prettierrc.json')
}
6 changes: 5 additions & 1 deletion baselines/bigquery-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.30",
"c8": "^7.1.0",
"gts": "^1.1.2",
"gts": "next",
"eslint": "^6.8.0",
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.0",
"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 @@ -186,6 +186,7 @@ export class BigQueryStorageClient {
this._opts.fallback ?
(this._protos as protobuf.Root).lookupService('google.cloud.bigquery.storage.v1beta1.BigQueryStorage') :
// tslint:disable-next-line no-any
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved
/* 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"
}
5 changes: 5 additions & 0 deletions baselines/disable-packing-test/.prettierignore.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules
**/.coverage
build/
docs/
protos/
17 changes: 17 additions & 0 deletions baselines/disable-packing-test/.prettierrc.js.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

module.exports = {
...require('gts/.prettierrc.json')
}
6 changes: 5 additions & 1 deletion baselines/disable-packing-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.30",
"c8": "^7.1.0",
"gts": "^1.1.2",
"gts": "next",
"eslint": "^6.8.0",
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.0",
"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 @@ -238,6 +239,7 @@ export class EchoClient {
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 @@ -202,6 +202,7 @@ export class IdentityClient {
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 @@ -239,6 +240,7 @@ export class MessagingClient {
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 @@ -205,6 +205,7 @@ export class TestingClient {
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