@formatjs/intl-locale 2.4.40 → 2.4.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/lib/index.js +2 -2
- package/package.json +2 -2
- package/polyfill.iife.js +16 -16
package/index.js
CHANGED
|
@@ -57,10 +57,10 @@ function applyUnicodeExtensionToTag(tag, options, relevantExtensionKeys) {
|
|
|
57
57
|
value = entry[1];
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
(0, ecma402_abstract_1.invariant)(key in options, key
|
|
60
|
+
(0, ecma402_abstract_1.invariant)(key in options, "".concat(key, " must be in options"));
|
|
61
61
|
var optionsValue = options[key];
|
|
62
62
|
if (optionsValue !== undefined) {
|
|
63
|
-
(0, ecma402_abstract_1.invariant)(typeof optionsValue === 'string', "Value for "
|
|
63
|
+
(0, ecma402_abstract_1.invariant)(typeof optionsValue === 'string', "Value for ".concat(key, " must be a string"));
|
|
64
64
|
value = optionsValue;
|
|
65
65
|
if (entry) {
|
|
66
66
|
entry[1] = value;
|
package/lib/index.js
CHANGED
|
@@ -54,10 +54,10 @@ function applyUnicodeExtensionToTag(tag, options, relevantExtensionKeys) {
|
|
|
54
54
|
value = entry[1];
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
invariant(key in options, key
|
|
57
|
+
invariant(key in options, "".concat(key, " must be in options"));
|
|
58
58
|
var optionsValue = options[key];
|
|
59
59
|
if (optionsValue !== undefined) {
|
|
60
|
-
invariant(typeof optionsValue === 'string', "Value for "
|
|
60
|
+
invariant(typeof optionsValue === 'string', "Value for ".concat(key, " must be a string"));
|
|
61
61
|
value = optionsValue;
|
|
62
62
|
if (entry) {
|
|
63
63
|
entry[1] = value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-locale",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.41",
|
|
4
4
|
"description": "Intl.Locale polyfill",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/formatjs/formatjs/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@formatjs/ecma402-abstract": "1.
|
|
27
|
+
"@formatjs/ecma402-abstract": "1.11.0",
|
|
28
28
|
"@formatjs/intl-getcanonicallocales": "1.8.0",
|
|
29
29
|
"tslib": "^2.1.0"
|
|
30
30
|
}
|
package/polyfill.iife.js
CHANGED
|
@@ -594,7 +594,7 @@
|
|
|
594
594
|
function UnicodeExtensionValue(extension, key) {
|
|
595
595
|
(0, utils_1.invariant)(key.length === 2, "key must have 2 elements");
|
|
596
596
|
var size = extension.length;
|
|
597
|
-
var searchValue = "-"
|
|
597
|
+
var searchValue = "-".concat(key, "-");
|
|
598
598
|
var pos = extension.indexOf(searchValue);
|
|
599
599
|
if (pos !== -1) {
|
|
600
600
|
var start = pos + 4;
|
|
@@ -621,7 +621,7 @@
|
|
|
621
621
|
}
|
|
622
622
|
return extension.slice(start, end);
|
|
623
623
|
}
|
|
624
|
-
searchValue = "-"
|
|
624
|
+
searchValue = "-".concat(key);
|
|
625
625
|
pos = extension.indexOf(searchValue);
|
|
626
626
|
if (pos !== -1 && pos + 3 === size) {
|
|
627
627
|
return "";
|
|
@@ -655,13 +655,13 @@
|
|
|
655
655
|
var supportedExtension = "-u";
|
|
656
656
|
for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
|
|
657
657
|
var key = relevantExtensionKeys_1[_i];
|
|
658
|
-
(0, utils_1.invariant)(foundLocale in localeData, "Missing locale data for "
|
|
658
|
+
(0, utils_1.invariant)(foundLocale in localeData, "Missing locale data for ".concat(foundLocale));
|
|
659
659
|
var foundLocaleData = localeData[foundLocale];
|
|
660
|
-
(0, utils_1.invariant)(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data "
|
|
660
|
+
(0, utils_1.invariant)(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data ".concat(key, " must be an object"));
|
|
661
661
|
var keyLocaleData = foundLocaleData[key];
|
|
662
|
-
(0, utils_1.invariant)(Array.isArray(keyLocaleData), "keyLocaleData for "
|
|
662
|
+
(0, utils_1.invariant)(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array"));
|
|
663
663
|
var value = keyLocaleData[0];
|
|
664
|
-
(0, utils_1.invariant)(typeof value === "string" || value === null, "value must be string or null but got "
|
|
664
|
+
(0, utils_1.invariant)(typeof value === "string" || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key));
|
|
665
665
|
var supportedExtensionAddition = "";
|
|
666
666
|
if (r.extension) {
|
|
667
667
|
var requestedValue = (0, UnicodeExtensionValue_1.UnicodeExtensionValue)(r.extension, key);
|
|
@@ -669,11 +669,11 @@
|
|
|
669
669
|
if (requestedValue !== "") {
|
|
670
670
|
if (~keyLocaleData.indexOf(requestedValue)) {
|
|
671
671
|
value = requestedValue;
|
|
672
|
-
supportedExtensionAddition = "-"
|
|
672
|
+
supportedExtensionAddition = "-".concat(key, "-").concat(value);
|
|
673
673
|
}
|
|
674
674
|
} else if (~requestedValue.indexOf("true")) {
|
|
675
675
|
value = "true";
|
|
676
|
-
supportedExtensionAddition = "-"
|
|
676
|
+
supportedExtensionAddition = "-".concat(key);
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
}
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
while (chunks.length && isUnicodeVariantSubtag(chunks[0])) {
|
|
833
833
|
var variant = chunks.shift();
|
|
834
834
|
if (variant in variants) {
|
|
835
|
-
throw new RangeError('Duplicate variant "'
|
|
835
|
+
throw new RangeError('Duplicate variant "'.concat(variant, '"'));
|
|
836
836
|
}
|
|
837
837
|
variants[variant] = 1;
|
|
838
838
|
}
|
|
@@ -903,7 +903,7 @@
|
|
|
903
903
|
value.push(chunks.shift());
|
|
904
904
|
}
|
|
905
905
|
if (!value.length) {
|
|
906
|
-
throw new RangeError('Missing tvalue for tkey "'
|
|
906
|
+
throw new RangeError('Missing tvalue for tkey "'.concat(key, '"'));
|
|
907
907
|
}
|
|
908
908
|
fields.push([key, value.join(exports.SEPARATOR)]);
|
|
909
909
|
}
|
|
@@ -980,7 +980,7 @@
|
|
|
980
980
|
throw new RangeError("Malformed extension type");
|
|
981
981
|
}
|
|
982
982
|
if (type in otherExtensionMap) {
|
|
983
|
-
throw new RangeError("There can only be 1 -"
|
|
983
|
+
throw new RangeError("There can only be 1 -".concat(type, "- extension"));
|
|
984
984
|
}
|
|
985
985
|
var extension = {
|
|
986
986
|
type: type,
|
|
@@ -4369,7 +4369,7 @@
|
|
|
4369
4369
|
if (values !== void 0 && !values.filter(function(val) {
|
|
4370
4370
|
return val == value;
|
|
4371
4371
|
}).length) {
|
|
4372
|
-
throw new RangeError(value
|
|
4372
|
+
throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
|
|
4373
4373
|
}
|
|
4374
4374
|
return value;
|
|
4375
4375
|
}
|
|
@@ -4441,8 +4441,8 @@
|
|
|
4441
4441
|
var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
|
|
4442
4442
|
|
|
4443
4443
|
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/format_to_parts.js
|
|
4444
|
-
var CARET_S_UNICODE_REGEX = new RegExp("^"
|
|
4445
|
-
var S_DOLLAR_UNICODE_REGEX = new RegExp(S_UNICODE_REGEX.source
|
|
4444
|
+
var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
|
|
4445
|
+
var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
|
|
4446
4446
|
|
|
4447
4447
|
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/InitializeNumberFormat.js
|
|
4448
4448
|
var import_intl_localematcher = __toModule(require_intl_localematcher());
|
|
@@ -4537,10 +4537,10 @@
|
|
|
4537
4537
|
value = entry[1];
|
|
4538
4538
|
}
|
|
4539
4539
|
}
|
|
4540
|
-
invariant(key in options, key
|
|
4540
|
+
invariant(key in options, "".concat(key, " must be in options"));
|
|
4541
4541
|
var optionsValue = options[key];
|
|
4542
4542
|
if (optionsValue !== void 0) {
|
|
4543
|
-
invariant(typeof optionsValue === "string", "Value for "
|
|
4543
|
+
invariant(typeof optionsValue === "string", "Value for ".concat(key, " must be a string"));
|
|
4544
4544
|
value = optionsValue;
|
|
4545
4545
|
if (entry) {
|
|
4546
4546
|
entry[1] = value;
|