deepl-node
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -8,2 +8,11 @@ # Changelog | ||
## [1.7.1] - 2022-10-12 | ||
### Fixed | ||
* Prefer `for .. of` loops to `for .. in` loops, to handle cases where array | ||
prototype has been modified. | ||
* Issue [#10](https://github.com/DeepLcom/deepl-node/issues/10) thanks to | ||
[LorenzoJokhan](https://github.com/LorenzoJokhan) | ||
* Node 18 is supported, this is now explicitly documented. | ||
## [1.7.0] - 2022-09-30 | ||
@@ -126,2 +135,3 @@ ### Added | ||
[1.7.1]: https://github.com/DeepLcom/deepl-node/compare/v1.7.0...v1.7.1 | ||
[1.7.0]: https://github.com/DeepLcom/deepl-node/compare/v1.6.0...v1.7.0 | ||
@@ -128,0 +138,0 @@ [1.6.0]: https://github.com/DeepLcom/deepl-node/compare/v1.5.0...v1.6.0 |
@@ -163,6 +163,5 @@ "use strict"; | ||
else { | ||
for (const textsKey in texts) { | ||
const text = texts[textsKey]; | ||
for (const text of texts) { | ||
if (!(0, utils_1.isString)(text) || text.length === 0) { | ||
throw new errors_1.DeepLError('texts parameter must not be a non-empty string or array of non-empty strings'); | ||
throw new errors_1.DeepLError('texts parameter must be a non-empty string or array of non-empty strings'); | ||
} | ||
@@ -300,3 +299,3 @@ data.append('text', text); | ||
Authorization: `DeepL-Auth-Key ${authKey}`, | ||
'User-Agent': 'deepl-node/1.7.0', | ||
'User-Agent': 'deepl-node/1.7.1', | ||
...((_a = options === null || options === void 0 ? void 0 : options.headers) !== null && _a !== void 0 ? _a : {}), | ||
@@ -303,0 +302,0 @@ }; |
{ | ||
"name": "deepl-node", | ||
"description": "deepl-node is the official DeepL Node.js client library", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"author": "DeepL SE <open-source@deepl.com> (https://www.deepl.com)", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -32,3 +32,3 @@ # deepl-node | ||
The package officially supports Node.js version 12, 14, 16, and 17. | ||
The package officially supports Node.js version 12, 14, 16, 17, and 18. | ||
@@ -35,0 +35,0 @@ ## Usage |
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
114698
1920