@google-cloud/translate
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -78,11 +78,14 @@ "use strict"; | ||
opts.port = opts.port || port; | ||
// users can override the config from client side, like retry codes name. | ||
// The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 | ||
// The way to override client config for Showcase API: | ||
// | ||
// const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} | ||
// const showcaseClient = new showcaseClient({ projectId, customConfig }); | ||
opts.clientConfig = opts.clientConfig || {}; | ||
const isBrowser = typeof window !== 'undefined'; | ||
if (isBrowser) { | ||
opts.fallback = true; | ||
} | ||
// If we are in browser, we are already using fallback because of the | ||
// "browser" field in package.json. | ||
// But if we were explicitly requested to use fallback, let's do it now. | ||
this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; | ||
// If we're running in browser, it's OK to omit `fallback` since | ||
// google-gax has `browser` field in its `package.json`. | ||
// For Electron (which does not respect `browser` field), | ||
// pass `{fallback: true}` to the TranslationServiceClient constructor. | ||
this._gaxModule = opts.fallback ? gax.fallback : gax; | ||
// Create a `gaxGrpc` object, with any grpc-specific options | ||
@@ -89,0 +92,0 @@ // sent to the client. |
@@ -78,11 +78,14 @@ "use strict"; | ||
opts.port = opts.port || port; | ||
// users can override the config from client side, like retry codes name. | ||
// The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 | ||
// The way to override client config for Showcase API: | ||
// | ||
// const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} | ||
// const showcaseClient = new showcaseClient({ projectId, customConfig }); | ||
opts.clientConfig = opts.clientConfig || {}; | ||
const isBrowser = typeof window !== 'undefined'; | ||
if (isBrowser) { | ||
opts.fallback = true; | ||
} | ||
// If we are in browser, we are already using fallback because of the | ||
// "browser" field in package.json. | ||
// But if we were explicitly requested to use fallback, let's do it now. | ||
this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; | ||
// If we're running in browser, it's OK to omit `fallback` since | ||
// google-gax has `browser` field in its `package.json`. | ||
// For Electron (which does not respect `browser` field), | ||
// pass `{fallback: true}` to the TranslationServiceClient constructor. | ||
this._gaxModule = opts.fallback ? gax.fallback : gax; | ||
// Create a `gaxGrpc` object, with any grpc-specific options | ||
@@ -89,0 +92,0 @@ // sent to the client. |
@@ -7,2 +7,13 @@ # Changelog | ||
### [6.0.1](https://www.github.com/googleapis/nodejs-translate/compare/v6.0.0...v6.0.1) (2020-06-29) | ||
### Bug Fixes | ||
* handle fallback option properly ([#547](https://www.github.com/googleapis/nodejs-translate/issues/547)) ([9146de2](https://www.github.com/googleapis/nodejs-translate/commit/9146de2a08565418dc118d1c8f3034f90ef9778e)) | ||
* **deps:** update dependency @google-cloud/text-to-speech to v3 ([#538](https://www.github.com/googleapis/nodejs-translate/issues/538)) ([423dba3](https://www.github.com/googleapis/nodejs-translate/commit/423dba36a2c82ac6335c279edb1d246add55b754)) | ||
* **deps:** update dependency @google-cloud/vision to v2 ([#539](https://www.github.com/googleapis/nodejs-translate/issues/539)) ([5dbeac4](https://www.github.com/googleapis/nodejs-translate/commit/5dbeac4e9a3133a6008cd8fb882046fe4a9946bc)) | ||
* **samples:** typo in CLI invocation ([9755e2d](https://www.github.com/googleapis/nodejs-translate/commit/9755e2deff080d8a250ecbd251c7810288cd92d9)) | ||
* update node issue template ([#551](https://www.github.com/googleapis/nodejs-translate/issues/551)) ([548d1e5](https://www.github.com/googleapis/nodejs-translate/commit/548d1e5219141b293631087723ee111382a8e857)) | ||
## [6.0.0](https://www.github.com/googleapis/nodejs-translate/compare/v5.3.0...v6.0.0) (2020-06-03) | ||
@@ -9,0 +20,0 @@ |
{ | ||
"name": "@google-cloud/translate", | ||
"description": "Cloud Translation API Client Library for Node.js", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"license": "Apache-2.0", | ||
@@ -68,3 +68,3 @@ "author": "Google Inc.", | ||
"gts": "^2.0.0", | ||
"http2spy": "^1.1.0", | ||
"http2spy": "^2.0.0", | ||
"jsdoc": "^3.6.2", | ||
@@ -74,3 +74,3 @@ "jsdoc-fresh": "^1.0.1", | ||
"linkinator": "^2.0.0", | ||
"mocha": "^7.0.0", | ||
"mocha": "^8.0.0", | ||
"pack-n-play": "^1.0.0-2", | ||
@@ -77,0 +77,0 @@ "proxyquire": "^2.0.1", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2696290
42790