New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

deepl-node

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepl-node - npm Package Compare versions

Comparing version 1.14.0 to 1.15.0

11

CHANGELOG.md

@@ -8,2 +8,12 @@ # Changelog

## [1.15.0] - 2024-11-15
### Added
* Added `modelType` option to `translateText()` to use models with higher
translation quality (available for some language pairs), or better latency.
Options are `'quality_optimized'`, `'latency_optimized'`, and `'prefer_quality_optimized'`
* Added the `modelTypeUsed` field to `translateText()` response, that
indicates the translation model used when the `modelType` option is
specified.
## [1.14.0] - 2024-09-17

@@ -259,2 +269,3 @@ ### Added

[1.15.0]: https://github.com/DeepLcom/deepl-node/compare/v1.14.0...v1.15.0
[1.14.0]: https://github.com/DeepLcom/deepl-node/compare/v1.13.1...v1.14.0

@@ -261,0 +272,0 @@ [1.13.1]: https://github.com/DeepLcom/deepl-node/compare/v1.13.0...v1.13.1

4

dist/index.d.ts

@@ -151,2 +151,6 @@ /// <reference types="node" />

readonly billedCharacters: number;
/**
* The translation model type used, if available.
*/
readonly modelTypeUsed?: string;
}

@@ -153,0 +157,0 @@ /**

5

dist/index.js

@@ -212,2 +212,5 @@ "use strict";

}
if (options.modelType !== undefined) {
data.append('model_type', options.modelType);
}
if (options.nonSplittingTags !== undefined) {

@@ -660,3 +663,3 @@ data.append('non_splitting_tags', joinTagList(options.nonSplittingTags));

constructUserAgentString(sendPlatformInfo, appInfo) {
let libraryInfoString = 'deepl-node/1.14.0';
let libraryInfoString = 'deepl-node/1.15.0';
if (sendPlatformInfo) {

@@ -663,0 +666,0 @@ const systemType = os.type();

@@ -159,2 +159,3 @@ "use strict";

billedCharacters: translation.billed_characters,
modelTypeUsed: translation.model_type_used,
};

@@ -161,0 +162,0 @@ });

@@ -66,2 +66,3 @@ /**

export type TagHandlingMode = 'html' | 'xml';
export type ModelType = 'quality_optimized' | 'latency_optimized' | 'prefer_quality_optimized';
export type GlossaryId = string;

@@ -118,2 +119,4 @@ export type TagList = string | string[];

context?: string;
/** Type of translation model to use. */
modelType?: ModelType;
/** List of XML tags that should be used to split text into sentences. */

@@ -120,0 +123,0 @@ splittingTags?: TagList;

{
"name": "deepl-node",
"description": "deepl-node is the official DeepL Node.js client library",
"version": "1.14.0",
"version": "1.15.0",
"author": "DeepL SE <open-source@deepl.com> (https://www.deepl.com)",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -130,2 +130,4 @@ # deepl-node

- `billedCharacters` is the number of characters billed for the text.
- `modelTypeUsed` indicates the translation model used, but is `undefined`
unless the `modelType` option is specified.

@@ -184,2 +186,10 @@ ```javascript

example usage.
- `modelType`: specifies the type of translation model to use, options are:
- `'quality_optimized'`: use a translation model that maximizes translation
quality, at the cost of response time. This option may be unavailable for
some language pairs.
- `'prefer_quality_optimized'`: use the highest-quality translation model
for the given language pair.
- `'latency_optimized'`: use a translation model that minimizes response
time, at the cost of translation quality.
- `tagHandling`: type of tags to parse before translation, options are `'html'`

@@ -186,0 +196,0 @@ and `'xml'`.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc