Skip to content

Commit aa028d0

Browse files
update dependency (#294)
1 parent c2cb80b commit aa028d0

19 files changed

+79
-96
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts"
3+
}

packages/google-cloud-asset/.eslintrc.yml

-15
This file was deleted.

packages/google-cloud-asset/.prettierrc

-8
This file was deleted.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
module.exports = {
16+
...require('gts/.prettierrc.json')
17+
}

packages/google-cloud-asset/package.json

+17-22
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "Apache-2.0",
66
"author": "Google LLC",
77
"engines": {
8-
"node": ">=8.10.0"
8+
"node": ">=10.0.0"
99
},
1010
"repository": "googleapis/nodejs-asset",
1111
"main": "build/src/index.js",
@@ -43,30 +43,25 @@
4343
"prelint": "cd samples; npm link ../; npm i"
4444
},
4545
"dependencies": {
46-
"google-gax": "^1.14.1",
47-
"protobufjs": "^6.8.0"
46+
"google-gax": "^1.15.1",
47+
"protobufjs": "^6.8.9"
4848
},
4949
"devDependencies": {
50-
"@types/mocha": "^7.0.0",
51-
"@types/node": "^12.0.0",
52-
"c8": "^7.0.1",
53-
"codecov": "^3.0.4",
54-
"eslint": "^6.0.0",
55-
"eslint-config-prettier": "^6.0.0",
56-
"eslint-plugin-node": "^11.0.0",
57-
"eslint-plugin-prettier": "^3.0.0",
58-
"gts": "^1.0.0",
59-
"jsdoc": "^3.6.2",
60-
"jsdoc-fresh": "^1.0.1",
61-
"jsdoc-region-tag": "^1.0.2",
62-
"linkinator": "^2.0.0",
63-
"mocha": "^7.0.0",
50+
"@types/mocha": "^7.0.2",
51+
"@types/node": "^13.9.3",
52+
"c8": "^7.1.0",
53+
"codecov": "^3.6.5",
54+
"gts": "^2.0.0-alpha.5",
55+
"jsdoc": "^3.6.3",
56+
"jsdoc-fresh": "^1.0.2",
57+
"jsdoc-region-tag": "^1.0.4",
58+
"linkinator": "^2.0.4",
59+
"mocha": "^7.1.1",
6460
"null-loader": "^3.0.0",
6561
"pack-n-play": "^1.0.0-2",
66-
"prettier": "^1.13.7",
67-
"ts-loader": "^6.2.1",
68-
"typescript": "~3.6.4",
69-
"webpack": "^4.41.2",
70-
"webpack-cli": "^3.3.10"
62+
"ts-loader": "^6.2.2",
63+
"typescript": "~3.8.3",
64+
"webpack": "^4.42.0",
65+
"webpack-cli": "^3.3.11"
7166
}
7267
}

packages/google-cloud-asset/src/v1/asset_service_client.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export class AssetServiceClient {
163163
// rather than holding a request open.
164164
const protoFilesRoot = opts.fallback
165165
? this._gaxModule.protobuf.Root.fromJSON(
166+
/* eslint-disable @typescript-eslint/no-var-requires */
166167
require('../../protos/protos.json')
167168
)
168169
: this._gaxModule.protobuf.loadSync(nodejsProtoPath);
@@ -227,6 +228,7 @@ export class AssetServiceClient {
227228
'google.cloud.asset.v1.AssetService'
228229
)
229230
: // tslint:disable-next-line no-any
231+
/* eslint-disable @typescript-eslint/no-explicit-any */
230232
(this._protos as any).google.cloud.asset.v1.AssetService,
231233
this._opts
232234
) as Promise<{[method: string]: Function}>;
@@ -249,7 +251,8 @@ export class AssetServiceClient {
249251
if (this._terminated) {
250252
return Promise.reject('The client has already been closed.');
251253
}
252-
return stub[methodName].apply(stub, args);
254+
const func = stub[methodName];
255+
return func.apply(stub, args);
253256
},
254257
(err: Error | null | undefined) => () => {
255258
throw err;

packages/google-cloud-asset/src/v1beta1/asset_service_client.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export class AssetServiceClient {
147147
// rather than holding a request open.
148148
const protoFilesRoot = opts.fallback
149149
? this._gaxModule.protobuf.Root.fromJSON(
150+
/* eslint-disable @typescript-eslint/no-var-requires */
150151
require('../../protos/protos.json')
151152
)
152153
: this._gaxModule.protobuf.loadSync(nodejsProtoPath);
@@ -211,6 +212,7 @@ export class AssetServiceClient {
211212
'google.cloud.asset.v1beta1.AssetService'
212213
)
213214
: // tslint:disable-next-line no-any
215+
/* eslint-disable @typescript-eslint/no-explicit-any */
214216
(this._protos as any).google.cloud.asset.v1beta1.AssetService,
215217
this._opts
216218
) as Promise<{[method: string]: Function}>;
@@ -225,7 +227,8 @@ export class AssetServiceClient {
225227
if (this._terminated) {
226228
return Promise.reject('The client has already been closed.');
227229
}
228-
return stub[methodName].apply(stub, args);
230+
const func = stub[methodName];
231+
return func.apply(stub, args);
229232
},
230233
(err: Error | null | undefined) => () => {
231234
throw err;

packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import {
2323
CallOptions,
2424
Descriptors,
2525
ClientOptions,
26-
PaginationCallback,
27-
PaginationResponse,
2826
} from 'google-gax';
2927
import * as path from 'path';
3028

@@ -198,6 +196,7 @@ export class AssetServiceClient {
198196
'google.cloud.asset.v1p1beta1.AssetService'
199197
)
200198
: // tslint:disable-next-line no-any
199+
/* eslint-disable @typescript-eslint/no-explicit-any */
201200
(this._protos as any).google.cloud.asset.v1p1beta1.AssetService,
202201
this._opts
203202
) as Promise<{[method: string]: Function}>;
@@ -215,7 +214,8 @@ export class AssetServiceClient {
215214
if (this._terminated) {
216215
return Promise.reject('The client has already been closed.');
217216
}
218-
return stub[methodName].apply(stub, args);
217+
const func = stub[methodName];
218+
return func.apply(stub, args);
219219
},
220220
(err: Error | null | undefined) => () => {
221221
throw err;

packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ export class AssetServiceClient {
195195
'google.cloud.asset.v1p2beta1.AssetService'
196196
)
197197
: // tslint:disable-next-line no-any
198+
/* eslint-disable @typescript-eslint/no-explicit-any */
198199
(this._protos as any).google.cloud.asset.v1p2beta1.AssetService,
199200
this._opts
200201
) as Promise<{[method: string]: Function}>;
@@ -215,7 +216,8 @@ export class AssetServiceClient {
215216
if (this._terminated) {
216217
return Promise.reject('The client has already been closed.');
217218
}
218-
return stub[methodName].apply(stub, args);
219+
const func = stub[methodName];
220+
return func.apply(stub, args);
219221
},
220222
(err: Error | null | undefined) => () => {
221223
throw err;

packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export class AssetServiceClient {
147147
// rather than holding a request open.
148148
const protoFilesRoot = opts.fallback
149149
? this._gaxModule.protobuf.Root.fromJSON(
150+
/* eslint-disable @typescript-eslint/no-var-requires */
150151
require('../../protos/protos.json')
151152
)
152153
: this._gaxModule.protobuf.loadSync(nodejsProtoPath);
@@ -215,6 +216,7 @@ export class AssetServiceClient {
215216
'google.cloud.asset.v1p4beta1.AssetService'
216217
)
217218
: // tslint:disable-next-line no-any
219+
/* eslint-disable @typescript-eslint/no-explicit-any */
218220
(this._protos as any).google.cloud.asset.v1p4beta1.AssetService,
219221
this._opts
220222
) as Promise<{[method: string]: Function}>;
@@ -232,7 +234,8 @@ export class AssetServiceClient {
232234
if (this._terminated) {
233235
return Promise.reject('The client has already been closed.');
234236
}
235-
return stub[methodName].apply(stub, args);
237+
const func = stub[methodName];
238+
return func.apply(stub, args);
236239
},
237240
(err: Error | null | undefined) => () => {
238241
throw err;

packages/google-cloud-asset/system-test/fixtures/sample/src/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// ** https://github.com/googleapis/gapic-generator-typescript **
1717
// ** All changes to this file may be overwritten. **
1818

19-
2019
/* eslint-disable node/no-missing-require, no-unused-vars */
2120
const asset = require('@google-cloud/asset');
2221

packages/google-cloud-asset/system-test/fixtures/sample/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import {AssetServiceClient} from '@google-cloud/asset';
2020

2121
function main() {
22-
const assetServiceClient = new AssetServiceClient();
22+
new AssetServiceClient();
2323
}
2424

2525
main();

packages/google-cloud-asset/system-test/install.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {readFileSync} from 'fs';
2121
import {describe, it} from 'mocha';
2222

2323
describe('typescript consumer tests', () => {
24-
it('should have correct type signature for typescript users', async function() {
24+
it('should have correct type signature for typescript users', async function () {
2525
this.timeout(300000);
2626
const options = {
2727
packageDir: process.cwd(), // path to your module.
@@ -35,7 +35,7 @@ describe('typescript consumer tests', () => {
3535
await packNTest(options); // will throw upon error.
3636
});
3737

38-
it('should have correct type signature for javascript users', async function() {
38+
it('should have correct type signature for javascript users', async function () {
3939
this.timeout(300000);
4040
const options = {
4141
packageDir: process.cwd(), // path to your module.

packages/google-cloud-asset/test/gapic-asset_service-v1.ts

+3-14
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import * as protosTypes from '../protos/protos';
2020
import * as assert from 'assert';
2121
import {describe, it} from 'mocha';
22+
/* eslint-disable @typescript-eslint/no-var-requires */
2223
const assetserviceModule = require('../src');
2324

2425
const FAKE_STATUS_CODE = 1;
@@ -38,7 +39,9 @@ export interface Callback {
3839
}
3940

4041
export class Operation {
42+
/* eslint-disable @typescript-eslint/no-empty-function */
4143
constructor() {}
44+
/* eslint-disable @typescript-eslint/no-empty-function */
4245
promise() {}
4346
}
4447
function mockSimpleGrpcMethod(
@@ -154,8 +157,6 @@ describe('v1.AssetServiceClient', () => {
154157
// Mock request
155158
const request: protosTypes.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest = {};
156159
request.parent = '';
157-
// Mock response
158-
const expectedResponse = {};
159160
// Mock gRPC layer
160161
client._innerApiCalls.batchGetAssetsHistory = mockSimpleGrpcMethod(
161162
request,
@@ -206,8 +207,6 @@ describe('v1.AssetServiceClient', () => {
206207
// Mock request
207208
const request: protosTypes.google.cloud.asset.v1.ICreateFeedRequest = {};
208209
request.parent = '';
209-
// Mock response
210-
const expectedResponse = {};
211210
// Mock gRPC layer
212211
client._innerApiCalls.createFeed = mockSimpleGrpcMethod(
213212
request,
@@ -258,8 +257,6 @@ describe('v1.AssetServiceClient', () => {
258257
// Mock request
259258
const request: protosTypes.google.cloud.asset.v1.IGetFeedRequest = {};
260259
request.name = '';
261-
// Mock response
262-
const expectedResponse = {};
263260
// Mock gRPC layer
264261
client._innerApiCalls.getFeed = mockSimpleGrpcMethod(
265262
request,
@@ -310,8 +307,6 @@ describe('v1.AssetServiceClient', () => {
310307
// Mock request
311308
const request: protosTypes.google.cloud.asset.v1.IListFeedsRequest = {};
312309
request.parent = '';
313-
// Mock response
314-
const expectedResponse = {};
315310
// Mock gRPC layer
316311
client._innerApiCalls.listFeeds = mockSimpleGrpcMethod(
317312
request,
@@ -364,8 +359,6 @@ describe('v1.AssetServiceClient', () => {
364359
const request: protosTypes.google.cloud.asset.v1.IUpdateFeedRequest = {};
365360
request.feed = {};
366361
request.feed.name = '';
367-
// Mock response
368-
const expectedResponse = {};
369362
// Mock gRPC layer
370363
client._innerApiCalls.updateFeed = mockSimpleGrpcMethod(
371364
request,
@@ -416,8 +409,6 @@ describe('v1.AssetServiceClient', () => {
416409
// Mock request
417410
const request: protosTypes.google.cloud.asset.v1.IDeleteFeedRequest = {};
418411
request.name = '';
419-
// Mock response
420-
const expectedResponse = {};
421412
// Mock gRPC layer
422413
client._innerApiCalls.deleteFeed = mockSimpleGrpcMethod(
423414
request,
@@ -475,8 +466,6 @@ describe('v1.AssetServiceClient', () => {
475466
// Mock request
476467
const request: protosTypes.google.cloud.asset.v1.IExportAssetsRequest = {};
477468
request.parent = '';
478-
// Mock response
479-
const expectedResponse = {};
480469
// Mock gRPC layer
481470
client._innerApiCalls.exportAssets = mockLongRunningGrpcMethod(
482471
request,

packages/google-cloud-asset/test/gapic-asset_service-v1beta1.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import * as protosTypes from '../protos/protos';
2020
import * as assert from 'assert';
2121
import {describe, it} from 'mocha';
22+
/* eslint-disable @typescript-eslint/no-var-requires */
2223
const assetserviceModule = require('../src');
2324

2425
const FAKE_STATUS_CODE = 1;
@@ -38,7 +39,9 @@ export interface Callback {
3839
}
3940

4041
export class Operation {
42+
/* eslint-disable @typescript-eslint/no-empty-function */
4143
constructor() {}
44+
/* eslint-disable @typescript-eslint/no-empty-function */
4245
promise() {}
4346
}
4447
function mockSimpleGrpcMethod(
@@ -156,8 +159,6 @@ describe('v1beta1.AssetServiceClient', () => {
156159
// Mock request
157160
const request: protosTypes.google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest = {};
158161
request.parent = '';
159-
// Mock response
160-
const expectedResponse = {};
161162
// Mock gRPC layer
162163
client._innerApiCalls.batchGetAssetsHistory = mockSimpleGrpcMethod(
163164
request,
@@ -215,8 +216,6 @@ describe('v1beta1.AssetServiceClient', () => {
215216
// Mock request
216217
const request: protosTypes.google.cloud.asset.v1beta1.IExportAssetsRequest = {};
217218
request.parent = '';
218-
// Mock response
219-
const expectedResponse = {};
220219
// Mock gRPC layer
221220
client._innerApiCalls.exportAssets = mockLongRunningGrpcMethod(
222221
request,

0 commit comments

Comments
 (0)