intl-messageformat
Advanced tools
Comparing version 9.6.8 to 9.6.9
@@ -8,3 +8,3 @@ /* | ||
import { parse } from '@formatjs/icu-messageformat-parser'; | ||
import * as memoize from 'fast-memoize'; | ||
import memoize, { strategies } from '@formatjs/fast-memoize'; | ||
import { formatToParts, PART_TYPE, } from './formatters'; | ||
@@ -47,5 +47,2 @@ // -- MessageFormat -------------------------------------------------------- | ||
} | ||
// @ts-ignore this is to deal with rollup's default import shenanigans | ||
var _memoizeIntl = memoize.default || memoize; | ||
var memoizeIntl = _memoizeIntl; | ||
function createDefaultFormatters(cache) { | ||
@@ -58,3 +55,3 @@ if (cache === void 0) { cache = { | ||
return { | ||
getNumberFormat: memoizeIntl(function () { | ||
getNumberFormat: memoize(function () { | ||
var _a; | ||
@@ -68,5 +65,5 @@ var args = []; | ||
cache: createFastMemoizeCache(cache.number), | ||
strategy: memoizeIntl.strategies.variadic, | ||
strategy: strategies.variadic, | ||
}), | ||
getDateTimeFormat: memoizeIntl(function () { | ||
getDateTimeFormat: memoize(function () { | ||
var _a; | ||
@@ -80,5 +77,5 @@ var args = []; | ||
cache: createFastMemoizeCache(cache.dateTime), | ||
strategy: memoizeIntl.strategies.variadic, | ||
strategy: strategies.variadic, | ||
}), | ||
getPluralRules: memoizeIntl(function () { | ||
getPluralRules: memoize(function () { | ||
var _a; | ||
@@ -92,3 +89,3 @@ var args = []; | ||
cache: createFastMemoizeCache(cache.pluralRules), | ||
strategy: memoizeIntl.strategies.variadic, | ||
strategy: strategies.variadic, | ||
}), | ||
@@ -95,0 +92,0 @@ }; |
{ | ||
"name": "intl-messageformat", | ||
"version": "9.6.8", | ||
"version": "9.6.9", | ||
"description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.", | ||
@@ -34,4 +34,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@formatjs/icu-messageformat-parser": "1.1.6", | ||
"fast-memoize": "^2.5.2", | ||
"@formatjs/fast-memoize": "1.1.0", | ||
"@formatjs/icu-messageformat-parser": "1.2.0", | ||
"tslib": "^2.1.0" | ||
@@ -38,0 +38,0 @@ }, |
@@ -11,3 +11,3 @@ "use strict"; | ||
var icu_messageformat_parser_1 = require("@formatjs/icu-messageformat-parser"); | ||
var memoize = tslib_1.__importStar(require("fast-memoize")); | ||
var fast_memoize_1 = tslib_1.__importStar(require("@formatjs/fast-memoize")); | ||
var formatters_1 = require("./formatters"); | ||
@@ -50,5 +50,2 @@ // -- MessageFormat -------------------------------------------------------- | ||
} | ||
// @ts-ignore this is to deal with rollup's default import shenanigans | ||
var _memoizeIntl = memoize.default || memoize; | ||
var memoizeIntl = _memoizeIntl; | ||
function createDefaultFormatters(cache) { | ||
@@ -61,3 +58,3 @@ if (cache === void 0) { cache = { | ||
return { | ||
getNumberFormat: memoizeIntl(function () { | ||
getNumberFormat: fast_memoize_1.default(function () { | ||
var _a; | ||
@@ -71,5 +68,5 @@ var args = []; | ||
cache: createFastMemoizeCache(cache.number), | ||
strategy: memoizeIntl.strategies.variadic, | ||
strategy: fast_memoize_1.strategies.variadic, | ||
}), | ||
getDateTimeFormat: memoizeIntl(function () { | ||
getDateTimeFormat: fast_memoize_1.default(function () { | ||
var _a; | ||
@@ -83,5 +80,5 @@ var args = []; | ||
cache: createFastMemoizeCache(cache.dateTime), | ||
strategy: memoizeIntl.strategies.variadic, | ||
strategy: fast_memoize_1.strategies.variadic, | ||
}), | ||
getPluralRules: memoizeIntl(function () { | ||
getPluralRules: fast_memoize_1.default(function () { | ||
var _a; | ||
@@ -95,3 +92,3 @@ var args = []; | ||
cache: createFastMemoizeCache(cache.pluralRules), | ||
strategy: memoizeIntl.strategies.variadic, | ||
strategy: fast_memoize_1.strategies.variadic, | ||
}), | ||
@@ -98,0 +95,0 @@ }; |
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
127673
2962
+ Added@formatjs/fast-memoize@1.1.0
+ Added@formatjs/fast-memoize@1.1.0(transitive)
+ Added@formatjs/icu-messageformat-parser@1.2.0(transitive)
+ Added@formatjs/icu-skeleton-parser@1.2.0(transitive)
- Removedfast-memoize@^2.5.2
- Removed@formatjs/icu-messageformat-parser@1.1.6(transitive)
- Removed@formatjs/icu-skeleton-parser@1.1.2(transitive)
- Removedfast-memoize@2.5.2(transitive)