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 all 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
39 changes: 23 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,37 @@ jobs:
command: |
npm run lint
- run:
name: copy protos to generated client library
name: copy protos to generated client library & move .test-out-* to project/out/
command: |
for dir in .test-out-* ; do
cp -r test-fixtures/protos $dir
done
- run:
name: move test out folders to a separate folder
command: |
mkdir /home/circleci/project/baselines
cp -r .test-out-* /home/circleci/project/baselines
- persist_to_workspace:
root: /home/circleci/project
paths:
- gapic-generator-typescript
- baselines
showcaseTestApplications:
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- attach_workspace:
at: workspace
at: /home/circleci/workspace
- run:
name: Run showcase test for Typescript users
working_directory: /home/circleci/project/workspace/gapic-generator-typescript
working_directory: /home/circleci/workspace/gapic-generator-typescript
command: npm run ts-test-application
environment:
NPM_CONFIG_PREFIX: /tmp/.npm-global
- run:
name: Run showcase test for JavaScript users
working_directory: /home/circleci/project/workspace/gapic-generator-typescript
working_directory: /home/circleci/workspace/gapic-generator-typescript
command: npm run js-test-application
environment:
NPM_CONFIG_PREFIX: /tmp/.npm-global
Expand All @@ -63,11 +69,12 @@ jobs:
steps:
- checkout
- attach_workspace:
at: workspace
at: /home/circleci/workspace
- run:
name: Run unit tests, system tests, jsdoc generation, and gts fix of the generated Showcase library
working_directory: /home/circleci/project/workspace/gapic-generator-typescript/.test-out-showcase
working_directory: /home/circleci/workspace/baselines/.test-out-showcase
command: &alltests |
pwd
npm install
npm test
npm run fix
Expand All @@ -80,54 +87,54 @@ jobs:
steps:
- checkout
- attach_workspace:
at: workspace
at: /home/circleci/workspace
- run:
name: Run unit tests, system tests, jsdoc generation, and gts fix of the generated KMS library
working_directory: /home/circleci/project/workspace/gapic-generator-typescript/.test-out-kms
working_directory: /home/circleci/workspace/baselines/.test-out-kms
command: *alltests
translateLibTest:
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- attach_workspace:
at: workspace
at: /home/circleci/workspace
- run:
name: Run unit tests, system tests, jsdoc generation, and gts fix of the generated Translate library
working_directory: /home/circleci/project/workspace/gapic-generator-typescript/.test-out-translate
working_directory: /home/circleci/workspace/baselines/.test-out-translate
command: *alltests
monitoringLibTest:
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- attach_workspace:
at: workspace
at: /home/circleci/workspace
- run:
name: Run unit tests, system tests, jsdoc generation, and gts fix of the generated Monitoring library
working_directory: /home/circleci/project/workspace/gapic-generator-typescript/.test-out-monitoring
working_directory: /home/circleci/workspace/baselines/.test-out-monitoring
command: *alltests
dlpLibTest:
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- attach_workspace:
at: workspace
at: /home/circleci/workspace
- run:
name: Run unit tests, system tests, jsdoc generation, and gts fix of the generated DLP library
working_directory: /home/circleci/project/workspace/gapic-generator-typescript/.test-out-dlp
working_directory: /home/circleci/workspace/baselines/.test-out-dlp
command: *alltests
ttsLibTest:
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- attach_workspace:
at: workspace
at: /home/circleci/workspace
- run:
name: Run unit tests, system tests, jsdoc generation, and gts fix of the generated Text-to-Speech library
working_directory: /home/circleci/project/workspace/gapic-generator-typescript/.test-out-texttospeech
working_directory: /home/circleci/workspace/baselines/.test-out-texttospeech
command: *alltests
workflows:
version: 2
Expand Down
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": "2.0.0-alpha.6",
"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 Down Expand Up @@ -155,8 +156,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 +208,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 +260,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 +312,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 +365,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": "2.0.0-alpha.6",
"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, PaginationCallback} 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 Expand Up @@ -596,7 +597,7 @@ export class EchoClient {
pagedExpand(
request: protosTypes.google.showcase.v1beta1.IPagedExpandRequest,
options: gax.CallOptions,
callback: Callback<
callback: PaginationCallback<
protosTypes.google.showcase.v1beta1.IEchoResponse[],
protosTypes.google.showcase.v1beta1.IPagedExpandRequest|null,
protosTypes.google.showcase.v1beta1.IPagedExpandResponse>): void;
Expand Down Expand Up @@ -632,11 +633,11 @@ export class EchoClient {
*/
pagedExpand(
request: protosTypes.google.showcase.v1beta1.IPagedExpandRequest,
optionsOrCallback?: gax.CallOptions|Callback<
optionsOrCallback?: gax.CallOptions|PaginationCallback<
protosTypes.google.showcase.v1beta1.IEchoResponse[],
protosTypes.google.showcase.v1beta1.IPagedExpandRequest|null,
protosTypes.google.showcase.v1beta1.IPagedExpandResponse>,
callback?: Callback<
callback?: PaginationCallback<
protosTypes.google.showcase.v1beta1.IEchoResponse[],
protosTypes.google.showcase.v1beta1.IPagedExpandRequest|null,
protosTypes.google.showcase.v1beta1.IPagedExpandResponse>):
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, PaginationCallback} 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 Expand Up @@ -540,7 +540,7 @@ export class IdentityClient {
listUsers(
request: protosTypes.google.showcase.v1beta1.IListUsersRequest,
options: gax.CallOptions,
callback: Callback<
callback: PaginationCallback<
protosTypes.google.showcase.v1beta1.IUser[],
protosTypes.google.showcase.v1beta1.IListUsersRequest|null,
protosTypes.google.showcase.v1beta1.IListUsersResponse>): void;
Expand Down Expand Up @@ -576,11 +576,11 @@ export class IdentityClient {
*/
listUsers(
request: protosTypes.google.showcase.v1beta1.IListUsersRequest,
optionsOrCallback?: gax.CallOptions|Callback<
optionsOrCallback?: gax.CallOptions|PaginationCallback<
protosTypes.google.showcase.v1beta1.IUser[],
protosTypes.google.showcase.v1beta1.IListUsersRequest|null,
protosTypes.google.showcase.v1beta1.IListUsersResponse>,
callback?: Callback<
callback?: PaginationCallback<
protosTypes.google.showcase.v1beta1.IUser[],
protosTypes.google.showcase.v1beta1.IListUsersRequest|null,
protosTypes.google.showcase.v1beta1.IListUsersResponse>):
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, PaginationCallback} 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 Expand Up @@ -989,7 +990,7 @@ export class MessagingClient {
listRooms(
request: protosTypes.google.showcase.v1beta1.IListRoomsRequest,
options: gax.CallOptions,
callback: Callback<
callback: PaginationCallback<
protosTypes.google.showcase.v1beta1.IRoom[],
protosTypes.google.showcase.v1beta1.IListRoomsRequest|null,
protosTypes.google.showcase.v1beta1.IListRoomsResponse>): void;
Expand Down Expand Up @@ -1025,11 +1026,11 @@ export class MessagingClient {
*/
listRooms(
request: protosTypes.google.showcase.v1beta1.IListRoomsRequest,
optionsOrCallback?: gax.CallOptions|Callback<
optionsOrCallback?: gax.CallOptions|PaginationCallback<
protosTypes.google.showcase.v1beta1.IRoom[],
protosTypes.google.showcase.v1beta1.IListRoomsRequest|null,
protosTypes.google.showcase.v1beta1.IListRoomsResponse>,
callback?: Callback<
callback?: PaginationCallback<
protosTypes.google.showcase.v1beta1.IRoom[],
protosTypes.google.showcase.v1beta1.IListRoomsRequest|null,
protosTypes.google.showcase.v1beta1.IListRoomsResponse>):
Expand Down Expand Up @@ -1104,7 +1105,7 @@ export class MessagingClient {
listBlurbs(
request: protosTypes.google.showcase.v1beta1.IListBlurbsRequest,
options: gax.CallOptions,
callback: Callback<
callback: PaginationCallback<
protosTypes.google.showcase.v1beta1.IBlurb[],
protosTypes.google.showcase.v1beta1.IListBlurbsRequest|null,
protosTypes.google.showcase.v1beta1.IListBlurbsResponse>): void;
Expand Down Expand Up @@ -1144,11 +1145,11 @@ export class MessagingClient {
*/
listBlurbs(
request: protosTypes.google.showcase.v1beta1.IListBlurbsRequest,
optionsOrCallback?: gax.CallOptions|Callback<
optionsOrCallback?: gax.CallOptions|PaginationCallback<
protosTypes.google.showcase.v1beta1.IBlurb[],
protosTypes.google.showcase.v1beta1.IListBlurbsRequest|null,
protosTypes.google.showcase.v1beta1.IListBlurbsResponse>,
callback?: Callback<
callback?: PaginationCallback<
protosTypes.google.showcase.v1beta1.IBlurb[],
protosTypes.google.showcase.v1beta1.IListBlurbsRequest|null,
protosTypes.google.showcase.v1beta1.IListBlurbsResponse>):
Expand Down
Loading