Skip to content
This repository was archived by the owner on Jul 13, 2023. It is now read-only.

Commit 21b09f5

Browse files
fix: remove eslint, update gax, fix generated protos, run the generator (#155)
Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint.
1 parent 1354e32 commit 21b09f5

7 files changed

+28
-39
lines changed

.jsdoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040
includePattern: '\\.js$'
4141
},
4242
templates: {
43-
copyright: 'Copyright 2019 Google, LLC.',
43+
copyright: 'Copyright 2020 Google LLC',
4444
includeDate: false,
4545
sourceFiles: false,
4646
systemName: '@google-cloud/recaptcha-enterprise',

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
66
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// https://www.apache.org/licenses/LICENSE-2.0
88
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,14 @@
2525
"reCAPTCHA Enterprise API"
2626
],
2727
"dependencies": {
28-
"google-gax": "^2.0.1"
28+
"google-gax": "^2.1.0"
2929
},
3030
"devDependencies": {
3131
"@types/mocha": "^7.0.0",
3232
"@types/node": "^12.0.0",
3333
"@types/sinon": "^9.0.0",
3434
"c8": "^7.0.0",
35-
"eslint": "^6.0.0",
36-
"eslint-config-prettier": "^6.0.0",
37-
"eslint-plugin-node": "^11.0.0",
38-
"eslint-plugin-prettier": "^3.0.0",
39-
"gts": "2.0.0",
35+
"gts": "^2.0.0",
4036
"jsdoc": "^3.6.2",
4137
"jsdoc-fresh": "^1.0.1",
4238
"jsdoc-region-tag": "^1.0.2",
@@ -52,7 +48,7 @@
5248
"webpack-cli": "^3.3.10"
5349
},
5450
"scripts": {
55-
"lint": "gts fix && eslint --fix samples/*.js",
51+
"lint": "gts fix",
5652
"fix": "gts fix",
5753
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
5854
"system-test": "mocha build/system-test",
@@ -64,7 +60,7 @@
6460
"compile-protos": "compileProtos src",
6561
"predocs-test": "npm run docs",
6662
"prepare": "npm run compile",
67-
"prelint": "cd samples; npm link ../; npm i"
63+
"prelint": "cd samples; npm link ../; npm install"
6864
},
6965
"license": "Apache-2.0",
7066
"engines": {

synth.metadata

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
{
2-
"updateTime": "2020-04-03T12:01:49.096475Z",
2+
"updateTime": "2020-04-11T00:42:58.646069Z",
33
"sources": [
4-
{
5-
"git": {
6-
"name": "googleapis",
7-
"remote": "https://github.com/googleapis/googleapis.git",
8-
"sha": "3d5d228a58bdf875e6147b228db3159010c735ee",
9-
"internalRef": "304500143"
10-
}
11-
},
124
{
135
"git": {
146
"name": "synthtool",
157
"remote": "https://github.com/googleapis/synthtool.git",
16-
"sha": "99820243d348191bc9c634f2b48ddf65096285ed"
8+
"sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5",
9+
"log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie <[email protected]>\n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie <[email protected]>\n"
1710
}
1811
}
1912
],

synth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@
4545

4646
# Node.js specific cleanup
4747
subprocess.run(['npm', 'install'])
48-
subprocess.run(['npm', 'run', 'fix'])
48+
subprocess.run(['npm', 'run', 'lint'])
4949
subprocess.run(['npx', 'compileProtos', 'src'])

test/gapic_recaptcha_enterprise_service_v1.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
318318
undefined,
319319
expectedError
320320
);
321-
assert.rejects(async () => {
321+
await assert.rejects(async () => {
322322
await client.createAssessment(request);
323323
}, expectedError);
324324
assert(
@@ -440,7 +440,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
440440
undefined,
441441
expectedError
442442
);
443-
assert.rejects(async () => {
443+
await assert.rejects(async () => {
444444
await client.annotateAssessment(request);
445445
}, expectedError);
446446
assert(
@@ -557,7 +557,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
557557
};
558558
const expectedError = new Error('expected');
559559
client.innerApiCalls.createKey = stubSimpleCall(undefined, expectedError);
560-
assert.rejects(async () => {
560+
await assert.rejects(async () => {
561561
await client.createKey(request);
562562
}, expectedError);
563563
assert(
@@ -674,7 +674,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
674674
};
675675
const expectedError = new Error('expected');
676676
client.innerApiCalls.getKey = stubSimpleCall(undefined, expectedError);
677-
assert.rejects(async () => {
677+
await assert.rejects(async () => {
678678
await client.getKey(request);
679679
}, expectedError);
680680
assert(
@@ -794,7 +794,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
794794
};
795795
const expectedError = new Error('expected');
796796
client.innerApiCalls.updateKey = stubSimpleCall(undefined, expectedError);
797-
assert.rejects(async () => {
797+
await assert.rejects(async () => {
798798
await client.updateKey(request);
799799
}, expectedError);
800800
assert(
@@ -911,7 +911,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
911911
};
912912
const expectedError = new Error('expected');
913913
client.innerApiCalls.deleteKey = stubSimpleCall(undefined, expectedError);
914-
assert.rejects(async () => {
914+
await assert.rejects(async () => {
915915
await client.deleteKey(request);
916916
}, expectedError);
917917
assert(
@@ -1044,7 +1044,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
10441044
};
10451045
const expectedError = new Error('expected');
10461046
client.innerApiCalls.listKeys = stubSimpleCall(undefined, expectedError);
1047-
assert.rejects(async () => {
1047+
await assert.rejects(async () => {
10481048
await client.listKeys(request);
10491049
}, expectedError);
10501050
assert(
@@ -1145,7 +1145,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
11451145
reject(err);
11461146
});
11471147
});
1148-
assert.rejects(async () => {
1148+
await assert.rejects(async () => {
11491149
await promise;
11501150
}, expectedError);
11511151
assert(
@@ -1224,7 +1224,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => {
12241224
expectedError
12251225
);
12261226
const iterable = client.listKeysAsync(request);
1227-
assert.rejects(async () => {
1227+
await assert.rejects(async () => {
12281228
const responses: protos.google.cloud.recaptchaenterprise.v1.IKey[] = [];
12291229
for await (const resource of iterable) {
12301230
responses.push(resource!);

test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
319319
undefined,
320320
expectedError
321321
);
322-
assert.rejects(async () => {
322+
await assert.rejects(async () => {
323323
await client.createAssessment(request);
324324
}, expectedError);
325325
assert(
@@ -441,7 +441,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
441441
undefined,
442442
expectedError
443443
);
444-
assert.rejects(async () => {
444+
await assert.rejects(async () => {
445445
await client.annotateAssessment(request);
446446
}, expectedError);
447447
assert(
@@ -558,7 +558,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
558558
};
559559
const expectedError = new Error('expected');
560560
client.innerApiCalls.createKey = stubSimpleCall(undefined, expectedError);
561-
assert.rejects(async () => {
561+
await assert.rejects(async () => {
562562
await client.createKey(request);
563563
}, expectedError);
564564
assert(
@@ -675,7 +675,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
675675
};
676676
const expectedError = new Error('expected');
677677
client.innerApiCalls.getKey = stubSimpleCall(undefined, expectedError);
678-
assert.rejects(async () => {
678+
await assert.rejects(async () => {
679679
await client.getKey(request);
680680
}, expectedError);
681681
assert(
@@ -795,7 +795,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
795795
};
796796
const expectedError = new Error('expected');
797797
client.innerApiCalls.updateKey = stubSimpleCall(undefined, expectedError);
798-
assert.rejects(async () => {
798+
await assert.rejects(async () => {
799799
await client.updateKey(request);
800800
}, expectedError);
801801
assert(
@@ -912,7 +912,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
912912
};
913913
const expectedError = new Error('expected');
914914
client.innerApiCalls.deleteKey = stubSimpleCall(undefined, expectedError);
915-
assert.rejects(async () => {
915+
await assert.rejects(async () => {
916916
await client.deleteKey(request);
917917
}, expectedError);
918918
assert(
@@ -1047,7 +1047,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
10471047
};
10481048
const expectedError = new Error('expected');
10491049
client.innerApiCalls.listKeys = stubSimpleCall(undefined, expectedError);
1050-
assert.rejects(async () => {
1050+
await assert.rejects(async () => {
10511051
await client.listKeys(request);
10521052
}, expectedError);
10531053
assert(
@@ -1148,7 +1148,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
11481148
reject(err);
11491149
});
11501150
});
1151-
assert.rejects(async () => {
1151+
await assert.rejects(async () => {
11521152
await promise;
11531153
}, expectedError);
11541154
assert(
@@ -1227,7 +1227,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => {
12271227
expectedError
12281228
);
12291229
const iterable = client.listKeysAsync(request);
1230-
assert.rejects(async () => {
1230+
await assert.rejects(async () => {
12311231
const responses: protos.google.cloud.recaptchaenterprise.v1beta1.IKey[] = [];
12321232
for await (const resource of iterable) {
12331233
responses.push(resource!);

0 commit comments

Comments
 (0)