diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index a9e74d68ae0..413c188891d 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2019 Google, LLC.', + copyright: 'Copyright 2020 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/language', diff --git a/packages/google-cloud-language/.prettierrc.js b/packages/google-cloud-language/.prettierrc.js index 08cba3775be..d1b95106f4c 100644 --- a/packages/google-cloud-language/.prettierrc.js +++ b/packages/google-cloud-language/.prettierrc.js @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 88b07d849a0..e76b000101d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -31,7 +31,7 @@ ], "scripts": { "docs": "jsdoc -c .jsdoc.js", - "lint": "gts fix && eslint --fix samples/*.js", + "lint": "gts fix", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", "system-test": "mocha build/system-test", "test": "c8 mocha build/test", @@ -42,10 +42,10 @@ "compile-protos": "compileProtos src", "predocs-test": "npm run docs", "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm install" }, "dependencies": { - "google-gax": "^2.0.1" + "google-gax": "^2.1.0" }, "devDependencies": { "@types/mocha": "^7.0.0", @@ -53,11 +53,7 @@ "@types/sinon": "^7.5.2", "c8": "^7.0.0", "codecov": "^3.0.2", - "eslint": "^6.0.0", - "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.0.0", - "gts": "2.0.0", + "gts": "^2.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 41d92f344c7..e8e4fd8d005 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -137,11 +137,11 @@ message Document { // The language of the document (if not specified, the language is // automatically detected). Both ISO and BCP-47 language codes are // accepted.
- // [Language Support](/natural-language/docs/languages) - // lists currently supported languages for each API method. - // If the language (either specified by the caller or automatically detected) - // is not supported by the called API method, an `INVALID_ARGUMENT` error - // is returned. + // [Language + // Support](https://cloud.google.com/natural-language/docs/languages) lists + // currently supported languages for each API method. If the language (either + // specified by the caller or automatically detected) is not supported by the + // called API method, an `INVALID_ARGUMENT` error is returned. string language = 4; } @@ -954,7 +954,7 @@ message TextSpan { // Represents a category returned from the text classifier. message ClassificationCategory { // The name of the category representing the document, from the [predefined - // taxonomy](/natural-language/docs/categories). + // taxonomy](https://cloud.google.com/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index 384cdf91923..afca1205cb9 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -138,11 +138,11 @@ message Document { // The language of the document (if not specified, the language is // automatically detected). Both ISO and BCP-47 language codes are // accepted.
- // [Language Support](/natural-language/docs/languages) - // lists currently supported languages for each API method. - // If the language (either specified by the caller or automatically detected) - // is not supported by the called API method, an `INVALID_ARGUMENT` error - // is returned. + // [Language + // Support](https://cloud.google.com/natural-language/docs/languages) lists + // currently supported languages for each API method. If the language (either + // specified by the caller or automatically detected) is not supported by the + // called API method, an `INVALID_ARGUMENT` error is returned. string language = 4; } @@ -961,7 +961,7 @@ message TextSpan { // Represents a category returned from the text classifier. message ClassificationCategory { // The name of the category representing the document, from the [predefined - // taxonomy](/natural-language/docs/categories). + // taxonomy](https://cloud.google.com/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain @@ -1089,7 +1089,8 @@ message AnnotateTextRequest { // Classify the full document into categories. If this is true, // the API will use the default model which classifies into a - // [predefined taxonomy](/natural-language/docs/categories). + // [predefined + // taxonomy](https://cloud.google.com/natural-language/docs/categories). bool classify_text = 6; } diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index f41182c5b22..d083c20a387 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + var $root = $protobuf.roots._google_cloud_language_3_8_0_protos || ($protobuf.roots._google_cloud_language_3_8_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 9efc07f8a8b..c25e86cf054 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,14 @@ { - "updateTime": "2020-03-31T19:47:14.953977Z", + "updateTime": "2020-04-11T00:27:32.512826Z", + "sources": [ + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" + } + } + ], "destinations": [ { "client": { diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index ecd49e1940d..9a2d6538d14 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -32,5 +32,5 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npm', 'run', 'lint']) subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index e8d0c1e2cd7..c9b4dda10af 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -212,7 +212,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); assert( @@ -302,7 +302,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); assert( @@ -394,7 +394,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); assert( @@ -484,7 +484,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); assert( @@ -574,7 +574,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.classifyText(request); }, expectedError); assert( @@ -664,7 +664,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.annotateText(request); }, expectedError); assert( diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 3818651db69..94377b9223e 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -212,7 +212,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); assert( @@ -302,7 +302,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); assert( @@ -394,7 +394,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); assert( @@ -484,7 +484,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); assert( @@ -574,7 +574,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.classifyText(request); }, expectedError); assert( @@ -664,7 +664,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.annotateText(request); }, expectedError); assert(