Skip to content

Commit ef95880

Browse files
alexander-fenstersofisl
authored andcommitted
fix: remove eslint, update gax, fix generated protos, run the generator (#447)
Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint.
1 parent a7c0a49 commit ef95880

10 files changed

Lines changed: 44 additions & 38 deletions

File tree

packages/google-cloud-language/.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/language',

packages/google-cloud-language/.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,

packages/google-cloud-language/package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
],
3232
"scripts": {
3333
"docs": "jsdoc -c .jsdoc.js",
34-
"lint": "gts fix && eslint --fix samples/*.js",
34+
"lint": "gts fix",
3535
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
3636
"system-test": "mocha build/system-test",
3737
"test": "c8 mocha build/test",
@@ -42,22 +42,18 @@
4242
"compile-protos": "compileProtos src",
4343
"predocs-test": "npm run docs",
4444
"prepare": "npm run compile",
45-
"prelint": "cd samples; npm link ../; npm i"
45+
"prelint": "cd samples; npm link ../; npm install"
4646
},
4747
"dependencies": {
48-
"google-gax": "^2.0.1"
48+
"google-gax": "^2.1.0"
4949
},
5050
"devDependencies": {
5151
"@types/mocha": "^7.0.0",
5252
"@types/node": "^12.0.0",
5353
"@types/sinon": "^7.5.2",
5454
"c8": "^7.0.0",
5555
"codecov": "^3.0.2",
56-
"eslint": "^6.0.0",
57-
"eslint-config-prettier": "^6.0.0",
58-
"eslint-plugin-node": "^11.0.0",
59-
"eslint-plugin-prettier": "^3.0.0",
60-
"gts": "2.0.0",
56+
"gts": "^2.0.0",
6157
"jsdoc": "^3.5.5",
6258
"jsdoc-fresh": "^1.0.1",
6359
"jsdoc-region-tag": "^1.0.2",

packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ message Document {
137137
// The language of the document (if not specified, the language is
138138
// automatically detected). Both ISO and BCP-47 language codes are
139139
// accepted.<br>
140-
// [Language Support](/natural-language/docs/languages)
141-
// lists currently supported languages for each API method.
142-
// If the language (either specified by the caller or automatically detected)
143-
// is not supported by the called API method, an `INVALID_ARGUMENT` error
144-
// is returned.
140+
// [Language
141+
// Support](https://cloud.google.com/natural-language/docs/languages) lists
142+
// currently supported languages for each API method. If the language (either
143+
// specified by the caller or automatically detected) is not supported by the
144+
// called API method, an `INVALID_ARGUMENT` error is returned.
145145
string language = 4;
146146
}
147147

@@ -954,7 +954,7 @@ message TextSpan {
954954
// Represents a category returned from the text classifier.
955955
message ClassificationCategory {
956956
// The name of the category representing the document, from the [predefined
957-
// taxonomy](/natural-language/docs/categories).
957+
// taxonomy](https://cloud.google.com/natural-language/docs/categories).
958958
string name = 1;
959959

960960
// The classifier's confidence of the category. Number represents how certain

packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ message Document {
138138
// The language of the document (if not specified, the language is
139139
// automatically detected). Both ISO and BCP-47 language codes are
140140
// accepted.<br>
141-
// [Language Support](/natural-language/docs/languages)
142-
// lists currently supported languages for each API method.
143-
// If the language (either specified by the caller or automatically detected)
144-
// is not supported by the called API method, an `INVALID_ARGUMENT` error
145-
// is returned.
141+
// [Language
142+
// Support](https://cloud.google.com/natural-language/docs/languages) lists
143+
// currently supported languages for each API method. If the language (either
144+
// specified by the caller or automatically detected) is not supported by the
145+
// called API method, an `INVALID_ARGUMENT` error is returned.
146146
string language = 4;
147147
}
148148

@@ -961,7 +961,7 @@ message TextSpan {
961961
// Represents a category returned from the text classifier.
962962
message ClassificationCategory {
963963
// The name of the category representing the document, from the [predefined
964-
// taxonomy](/natural-language/docs/categories).
964+
// taxonomy](https://cloud.google.com/natural-language/docs/categories).
965965
string name = 1;
966966

967967
// The classifier's confidence of the category. Number represents how certain
@@ -1089,7 +1089,8 @@ message AnnotateTextRequest {
10891089

10901090
// Classify the full document into categories. If this is true,
10911091
// the API will use the default model which classifies into a
1092-
// [predefined taxonomy](/natural-language/docs/categories).
1092+
// [predefined
1093+
// taxonomy](https://cloud.google.com/natural-language/docs/categories).
10931094
bool classify_text = 6;
10941095
}
10951096

packages/google-cloud-language/protos/protos.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
2929

3030
// Exported root namespace
31-
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
31+
var $root = $protobuf.roots._google_cloud_language_3_8_0_protos || ($protobuf.roots._google_cloud_language_3_8_0_protos = {});
3232

3333
$root.google = (function() {
3434

packages/google-cloud-language/synth.metadata

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
2-
"updateTime": "2020-03-31T19:47:14.953977Z",
2+
"updateTime": "2020-04-11T00:27:32.512826Z",
3+
"sources": [
4+
{
5+
"git": {
6+
"name": "synthtool",
7+
"remote": "https://github.com/googleapis/synthtool.git",
8+
"sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5"
9+
}
10+
}
11+
],
312
"destinations": [
413
{
514
"client": {

packages/google-cloud-language/synth.py

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

3333
# Node.js specific cleanup
3434
subprocess.run(['npm', 'install'])
35-
subprocess.run(['npm', 'run', 'fix'])
35+
subprocess.run(['npm', 'run', 'lint'])
3636
subprocess.run(['npx', 'compileProtos', 'src'])

packages/google-cloud-language/test/gapic_language_service_v1.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('v1.LanguageServiceClient', () => {
212212
undefined,
213213
expectedError
214214
);
215-
assert.rejects(async () => {
215+
await assert.rejects(async () => {
216216
await client.analyzeSentiment(request);
217217
}, expectedError);
218218
assert(
@@ -302,7 +302,7 @@ describe('v1.LanguageServiceClient', () => {
302302
undefined,
303303
expectedError
304304
);
305-
assert.rejects(async () => {
305+
await assert.rejects(async () => {
306306
await client.analyzeEntities(request);
307307
}, expectedError);
308308
assert(
@@ -394,7 +394,7 @@ describe('v1.LanguageServiceClient', () => {
394394
undefined,
395395
expectedError
396396
);
397-
assert.rejects(async () => {
397+
await assert.rejects(async () => {
398398
await client.analyzeEntitySentiment(request);
399399
}, expectedError);
400400
assert(
@@ -484,7 +484,7 @@ describe('v1.LanguageServiceClient', () => {
484484
undefined,
485485
expectedError
486486
);
487-
assert.rejects(async () => {
487+
await assert.rejects(async () => {
488488
await client.analyzeSyntax(request);
489489
}, expectedError);
490490
assert(
@@ -574,7 +574,7 @@ describe('v1.LanguageServiceClient', () => {
574574
undefined,
575575
expectedError
576576
);
577-
assert.rejects(async () => {
577+
await assert.rejects(async () => {
578578
await client.classifyText(request);
579579
}, expectedError);
580580
assert(
@@ -664,7 +664,7 @@ describe('v1.LanguageServiceClient', () => {
664664
undefined,
665665
expectedError
666666
);
667-
assert.rejects(async () => {
667+
await assert.rejects(async () => {
668668
await client.annotateText(request);
669669
}, expectedError);
670670
assert(

packages/google-cloud-language/test/gapic_language_service_v1beta2.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('v1beta2.LanguageServiceClient', () => {
212212
undefined,
213213
expectedError
214214
);
215-
assert.rejects(async () => {
215+
await assert.rejects(async () => {
216216
await client.analyzeSentiment(request);
217217
}, expectedError);
218218
assert(
@@ -302,7 +302,7 @@ describe('v1beta2.LanguageServiceClient', () => {
302302
undefined,
303303
expectedError
304304
);
305-
assert.rejects(async () => {
305+
await assert.rejects(async () => {
306306
await client.analyzeEntities(request);
307307
}, expectedError);
308308
assert(
@@ -394,7 +394,7 @@ describe('v1beta2.LanguageServiceClient', () => {
394394
undefined,
395395
expectedError
396396
);
397-
assert.rejects(async () => {
397+
await assert.rejects(async () => {
398398
await client.analyzeEntitySentiment(request);
399399
}, expectedError);
400400
assert(
@@ -484,7 +484,7 @@ describe('v1beta2.LanguageServiceClient', () => {
484484
undefined,
485485
expectedError
486486
);
487-
assert.rejects(async () => {
487+
await assert.rejects(async () => {
488488
await client.analyzeSyntax(request);
489489
}, expectedError);
490490
assert(
@@ -574,7 +574,7 @@ describe('v1beta2.LanguageServiceClient', () => {
574574
undefined,
575575
expectedError
576576
);
577-
assert.rejects(async () => {
577+
await assert.rejects(async () => {
578578
await client.classifyText(request);
579579
}, expectedError);
580580
assert(
@@ -664,7 +664,7 @@ describe('v1beta2.LanguageServiceClient', () => {
664664
undefined,
665665
expectedError
666666
);
667-
assert.rejects(async () => {
667+
await assert.rejects(async () => {
668668
await client.annotateText(request);
669669
}, expectedError);
670670
assert(

0 commit comments

Comments
 (0)