intl-messageformat
Advanced tools
Comparing version 10.2.6 to 10.3.0
@@ -1,12 +0,5 @@ | ||
import { parse, MessageFormatElement } from '@formatjs/icu-messageformat-parser'; | ||
import { parse, MessageFormatElement, ParserOptions } from '@formatjs/icu-messageformat-parser'; | ||
import { Formatters, Formats, FormatXMLElementFn, PrimitiveType, MessageFormatPart } from './formatters'; | ||
export interface Options { | ||
export interface Options extends Omit<ParserOptions, 'locale'> { | ||
formatters?: Formatters; | ||
/** | ||
* Whether to treat HTML/XML tags as string literal | ||
* instead of parsing them as tag token. | ||
* When this is false we only allow simple tags without | ||
* any attributes | ||
*/ | ||
ignoreTag?: boolean; | ||
} | ||
@@ -13,0 +6,0 @@ export declare class IntlMessageFormat { |
@@ -6,4 +6,4 @@ /* | ||
*/ | ||
import { __assign, __spreadArray } from "tslib"; | ||
import { parse } from '@formatjs/icu-messageformat-parser'; | ||
import { __assign, __rest, __spreadArray } from "tslib"; | ||
import { parse, } from '@formatjs/icu-messageformat-parser'; | ||
import memoize, { strategies } from '@formatjs/fast-memoize'; | ||
@@ -136,7 +136,5 @@ import { formatToParts, PART_TYPE, } from './formatters'; | ||
} | ||
var _a = opts || {}, formatters = _a.formatters, parseOpts = __rest(_a, ["formatters"]); | ||
// Parse string messages into an AST. | ||
this.ast = IntlMessageFormat.__parse(message, { | ||
ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag, | ||
locale: this.resolvedLocale, | ||
}); | ||
this.ast = IntlMessageFormat.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale })); | ||
} | ||
@@ -143,0 +141,0 @@ else { |
{ | ||
"name": "intl-messageformat", | ||
"version": "10.2.6", | ||
"version": "10.3.0", | ||
"description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
"@formatjs/fast-memoize": "1.2.8", | ||
"@formatjs/icu-messageformat-parser": "2.1.14", | ||
"@formatjs/icu-messageformat-parser": "2.2.0", | ||
"tslib": "^2.4.0" | ||
@@ -39,0 +39,0 @@ }, |
@@ -1,12 +0,5 @@ | ||
import { parse, MessageFormatElement } from '@formatjs/icu-messageformat-parser'; | ||
import { parse, MessageFormatElement, ParserOptions } from '@formatjs/icu-messageformat-parser'; | ||
import { Formatters, Formats, FormatXMLElementFn, PrimitiveType, MessageFormatPart } from './formatters'; | ||
export interface Options { | ||
export interface Options extends Omit<ParserOptions, 'locale'> { | ||
formatters?: Formatters; | ||
/** | ||
* Whether to treat HTML/XML tags as string literal | ||
* instead of parsing them as tag token. | ||
* When this is false we only allow simple tags without | ||
* any attributes | ||
*/ | ||
ignoreTag?: boolean; | ||
} | ||
@@ -13,0 +6,0 @@ export declare class IntlMessageFormat { |
@@ -138,7 +138,5 @@ "use strict"; | ||
} | ||
var _a = opts || {}, formatters = _a.formatters, parseOpts = tslib_1.__rest(_a, ["formatters"]); | ||
// Parse string messages into an AST. | ||
this.ast = IntlMessageFormat.__parse(message, { | ||
ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag, | ||
locale: this.resolvedLocale, | ||
}); | ||
this.ast = IntlMessageFormat.__parse(message, tslib_1.__assign(tslib_1.__assign({}, parseOpts), { locale: this.resolvedLocale })); | ||
} | ||
@@ -145,0 +143,0 @@ else { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
261422
8414
+ Added@formatjs/icu-messageformat-parser@2.2.0(transitive)
- Removed@formatjs/icu-messageformat-parser@2.1.14(transitive)