@lingui/core
Advanced tools
Comparing version 4.0.0-next.8 to 4.0.0
@@ -60,2 +60,10 @@ import { CompiledMessage } from '@lingui/message-utils/compileMessage'; | ||
}; | ||
type LoadAndActivateOptions = { | ||
/** initial active locale */ | ||
locale: Locale; | ||
/** list of alternative locales (BCP 47 language tags) which are used for number and date formatting */ | ||
locales?: Locales; | ||
/** compiled message catalog */ | ||
messages: Messages; | ||
}; | ||
declare class I18n extends EventEmitter<Events> { | ||
@@ -88,10 +96,5 @@ private _locale; | ||
/** | ||
* @param locales one locale or array of locales. | ||
* If array of locales is passed they would be used as fallback | ||
* locales for date and number formatting | ||
* @param messages compiled message catalog | ||
* @param notify Should emit `change` event for all subscribers. | ||
* This is useful for integration with frameworks as NextJS to avoid race-conditions during initialization. | ||
* @param options {@link LoadAndActivateOptions} | ||
*/ | ||
loadAndActivate(locales: Locale | Locales, messages: Messages, notify?: boolean): void; | ||
loadAndActivate({ locale, locales, messages }: LoadAndActivateOptions): void; | ||
activate(locale: Locale, locales?: Locales): void; | ||
@@ -98,0 +101,0 @@ _(descriptor: MessageDescriptor): string; |
{ | ||
"name": "@lingui/core", | ||
"version": "4.0.0-next.8", | ||
"version": "4.0.0", | ||
"sideEffects": false, | ||
@@ -56,9 +56,9 @@ "description": "I18n tools for javascript", | ||
"@babel/runtime": "^7.20.13", | ||
"@lingui/message-utils": "^4.0.0-next.8" | ||
"@lingui/message-utils": "4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@lingui/jest-mocks": "^3.0.3", | ||
"@lingui/jest-mocks": "*", | ||
"unbuild": "^1.1.2" | ||
}, | ||
"gitHead": "c9104b3227327030db3f1c684acba65ea2c0d03f" | ||
"gitHead": "998996381f5e5a458c2eccf650f949d8c5d8ac89" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
33770
935
+ Added@lingui/message-utils@4.0.0(transitive)
- Removed@lingui/message-utils@4.11.4(transitive)
- Removedjs-sha256@0.10.1(transitive)
Updated@lingui/message-utils@4.0.0