@boost/translate
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -6,2 +6,14 @@ # Change Log | ||
### 2.2.1 - 2021-02-08 | ||
#### 🛠 Internals | ||
- Sort type hints and aliases. ([1c49e33](https://github.com/milesj/boost/commit/1c49e33)) | ||
**Note:** Version bump only for package @boost/translate | ||
## 2.2.0 - 2021-01-16 | ||
@@ -8,0 +20,0 @@ |
@@ -18,3 +18,3 @@ import { InitOptions } from 'i18next'; | ||
} | ||
export default function createTranslator(namespace: string | string[], resourcePath: PortablePath | PortablePath[], { autoDetect, debug: debugOpt, fallbackLocale, locale, lookupType, resourceFormat, }?: TranslatorOptions): Translator; | ||
export default function createTranslator(namespace: string[] | string, resourcePath: PortablePath | PortablePath[], { autoDetect, debug: debugOpt, fallbackLocale, locale, lookupType, resourceFormat, }?: TranslatorOptions): Translator; | ||
//# sourceMappingURL=createTranslator.d.ts.map |
@@ -20,3 +20,3 @@ import { i18n, InterpolationOptions } from 'i18next'; | ||
/** Post-processors to run on the translation. */ | ||
postProcess?: string | string[]; | ||
postProcess?: string[] | string; | ||
} | ||
@@ -27,5 +27,5 @@ export interface Translator { | ||
changeLocale: (locale: Locale) => Promise<void>; | ||
(key: string | string[], params?: InterpolationParams, options?: MessageOptions): string; | ||
(key: string[] | string, params?: InterpolationParams, options?: MessageOptions): string; | ||
i18n: i18n; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
@@ -0,1 +1,3 @@ | ||
// Generated with Packemon: https://packemon.dev | ||
// Platform: node, Support: stable, Format: lib | ||
'use strict'; | ||
@@ -21,5 +23,5 @@ | ||
var i18next__default = _interopDefaultLegacy(i18next); | ||
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next); | ||
var osLocale__default = _interopDefaultLegacy(osLocale); | ||
var osLocale__default = /*#__PURE__*/_interopDefaultLegacy(osLocale); | ||
@@ -48,3 +50,4 @@ var debug = internal.createInternalDebugger('translate'); | ||
init(services, options) { | ||
this.configure(options); | ||
this.configure(options); // Validate resource paths are directories | ||
this.options.paths.forEach(path => { | ||
@@ -66,6 +69,8 @@ if (path.exists() && !path.isDirectory()) { | ||
}; | ||
} // istanbul ignore next | ||
create() {// We don't need this but is required by the interface | ||
} | ||
create() {} | ||
read(locale, namespace, callback) { | ||
@@ -106,3 +111,4 @@ const { | ||
init() {} | ||
init() {// We don't need this but is required by the interface | ||
} | ||
@@ -143,3 +149,6 @@ cacheUserLanguage(locale) { | ||
} | ||
/* eslint-disable @typescript-eslint/no-floating-promises */ | ||
// istanbul ignore next | ||
function handleError(error) { | ||
@@ -146,0 +155,0 @@ if (error) { |
{ | ||
"name": "@boost/translate", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"release": "1594765247526", | ||
@@ -31,4 +31,4 @@ "description": "Package and application level translations made easy.", | ||
"dependencies": { | ||
"@boost/common": "^2.5.0", | ||
"@boost/internal": "^2.2.0", | ||
"@boost/common": "^2.5.1", | ||
"@boost/internal": "^2.2.1", | ||
"i18next": "^19.8.4", | ||
@@ -44,3 +44,3 @@ "os-locale": "^5.0.0" | ||
}, | ||
"gitHead": "e2c452ee0c15aa7db91d1945e23ac6951028e672" | ||
"gitHead": "3aa9bda270786e931a90e927375c33dddffed14d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25836
286
0
Updated@boost/common@^2.5.1
Updated@boost/internal@^2.2.1