@formatjs/intl-relativetimeformat 11.2.8 → 11.2.10

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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 FormatJS
3
+ Copyright (c) 2023 FormatJS
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormatRelativeTime = void 0;
4
- var PartitionRelativeTimePattern_1 = require("./PartitionRelativeTimePattern");
5
- function FormatRelativeTime(rtf, value, unit, implDetails) {
6
- var parts = (0, PartitionRelativeTimePattern_1.PartitionRelativeTimePattern)(rtf, value, unit, implDetails);
1
+ import { PartitionRelativeTimePattern } from './PartitionRelativeTimePattern';
2
+ export function FormatRelativeTime(rtf, value, unit, implDetails) {
3
+ var parts = PartitionRelativeTimePattern(rtf, value, unit, implDetails);
7
4
  var result = '';
8
5
  for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
9
6
  var part = parts_1[_i];
@@ -11,4 +8,3 @@ function FormatRelativeTime(rtf, value, unit, implDetails) {
11
8
  }
12
9
  return result;
13
10
  }
14
- exports.FormatRelativeTime = FormatRelativeTime;
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormatRelativeTimeToParts = void 0;
4
- var PartitionRelativeTimePattern_1 = require("./PartitionRelativeTimePattern");
5
- function FormatRelativeTimeToParts(rtf, value, unit, implDetails) {
6
- return (0, PartitionRelativeTimePattern_1.PartitionRelativeTimePattern)(rtf, value, unit, implDetails);
1
+ import { PartitionRelativeTimePattern } from './PartitionRelativeTimePattern';
2
+ export function FormatRelativeTimeToParts(rtf, value, unit, implDetails) {
3
+ return PartitionRelativeTimePattern(rtf, value, unit, implDetails);
7
4
  }
8
- exports.FormatRelativeTimeToParts = FormatRelativeTimeToParts;
@@ -1,19 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InitializeRelativeTimeFormat = void 0;
4
- var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
5
- var intl_localematcher_1 = require("@formatjs/intl-localematcher");
1
+ import { CanonicalizeLocaleList, CoerceOptionsToObject, GetOption, invariant, } from '@formatjs/ecma402-abstract';
2
+ import { ResolveLocale } from '@formatjs/intl-localematcher';
6
3
  var NUMBERING_SYSTEM_REGEX = /^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i;
7
- function InitializeRelativeTimeFormat(rtf, locales, options, _a) {
4
+ export function InitializeRelativeTimeFormat(rtf, locales, options, _a) {
8
5
  var getInternalSlots = _a.getInternalSlots, availableLocales = _a.availableLocales, relevantExtensionKeys = _a.relevantExtensionKeys, localeData = _a.localeData, getDefaultLocale = _a.getDefaultLocale;
9
6
  var internalSlots = getInternalSlots(rtf);
10
7
  internalSlots.initializedRelativeTimeFormat = true;
11
- var requestedLocales = (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales);
8
+ var requestedLocales = CanonicalizeLocaleList(locales);
12
9
  var opt = Object.create(null);
13
- var opts = (0, ecma402_abstract_1.CoerceOptionsToObject)(options);
14
- var matcher = (0, ecma402_abstract_1.GetOption)(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit');
10
+ var opts = CoerceOptionsToObject(options);
11
+ var matcher = GetOption(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit');
15
12
  opt.localeMatcher = matcher;
16
- var numberingSystem = (0, ecma402_abstract_1.GetOption)(opts,
13
+ var numberingSystem = GetOption(opts,
17
14
  // @ts-expect-error TS option is wack
18
15
  'numberingSystem', 'string', undefined, undefined);
19
16
  if (numberingSystem !== undefined) {
@@ -22,17 +19,16 @@ function InitializeRelativeTimeFormat(rtf, locales, options, _a) {
22
19
  }
23
20
  }
24
21
  opt.nu = numberingSystem;
25
- var r = (0, intl_localematcher_1.ResolveLocale)(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);
22
+ var r = ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);
26
23
  var locale = r.locale, nu = r.nu;
27
24
  internalSlots.locale = locale;
28
- internalSlots.style = (0, ecma402_abstract_1.GetOption)(opts, 'style', 'string', ['long', 'narrow', 'short'], 'long');
29
- internalSlots.numeric = (0, ecma402_abstract_1.GetOption)(opts, 'numeric', 'string', ['always', 'auto'], 'always');
25
+ internalSlots.style = GetOption(opts, 'style', 'string', ['long', 'narrow', 'short'], 'long');
26
+ internalSlots.numeric = GetOption(opts, 'numeric', 'string', ['always', 'auto'], 'always');
30
27
  var fields = localeData[r.dataLocale];
31
- (0, ecma402_abstract_1.invariant)(!!fields, "Missing locale data for ".concat(r.dataLocale));
28
+ invariant(!!fields, "Missing locale data for ".concat(r.dataLocale));
32
29
  internalSlots.fields = fields;
33
30
  internalSlots.numberFormat = new Intl.NumberFormat(locales);
34
31
  internalSlots.pluralRules = new Intl.PluralRules(locales);
35
32
  internalSlots.numberingSystem = nu;
36
33
  return rtf;
37
34
  }
38
- exports.InitializeRelativeTimeFormat = InitializeRelativeTimeFormat;
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MakePartsList = void 0;
4
- var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
5
- function MakePartsList(pattern, unit, parts) {
6
- var patternParts = (0, ecma402_abstract_1.PartitionPattern)(pattern);
1
+ import { invariant, PartitionPattern } from '@formatjs/ecma402-abstract';
2
+ export function MakePartsList(pattern, unit, parts) {
3
+ var patternParts = PartitionPattern(pattern);
7
4
  var result = [];
8
5
  for (var _i = 0, patternParts_1 = patternParts; _i < patternParts_1.length; _i++) {
9
6
  var patternPart = patternParts_1[_i];
@@ -14,7 +11,7 @@ function MakePartsList(pattern, unit, parts) {
14
11
  });
15
12
  }
16
13
  else {
17
- (0, ecma402_abstract_1.invariant)(patternPart.type === '0', "Malformed pattern ".concat(pattern));
14
+ invariant(patternPart.type === '0', "Malformed pattern ".concat(pattern));
18
15
  for (var _a = 0, parts_1 = parts; _a < parts_1.length; _a++) {
19
16
  var part = parts_1[_a];
20
17
  result.push({
@@ -27,4 +24,3 @@ function MakePartsList(pattern, unit, parts) {
27
24
  }
28
25
  return result;
29
26
  }
30
- exports.MakePartsList = MakePartsList;
@@ -1,17 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PartitionRelativeTimePattern = void 0;
4
- var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
5
- var SingularRelativeTimeUnit_1 = require("./SingularRelativeTimeUnit");
6
- var MakePartsList_1 = require("./MakePartsList");
7
- function PartitionRelativeTimePattern(rtf, value, unit, _a) {
1
+ import { invariant, SameValue, ToString, Type, } from '@formatjs/ecma402-abstract';
2
+ import { SingularRelativeTimeUnit } from './SingularRelativeTimeUnit';
3
+ import { MakePartsList } from './MakePartsList';
4
+ export function PartitionRelativeTimePattern(rtf, value, unit, _a) {
8
5
  var getInternalSlots = _a.getInternalSlots;
9
- (0, ecma402_abstract_1.invariant)((0, ecma402_abstract_1.Type)(value) === 'Number', "value must be number, instead got ".concat(typeof value), TypeError);
10
- (0, ecma402_abstract_1.invariant)((0, ecma402_abstract_1.Type)(unit) === 'String', "unit must be number, instead got ".concat(typeof value), TypeError);
6
+ invariant(Type(value) === 'Number', "value must be number, instead got ".concat(typeof value), TypeError);
7
+ invariant(Type(unit) === 'String', "unit must be number, instead got ".concat(typeof value), TypeError);
11
8
  if (isNaN(value) || !isFinite(value)) {
12
9
  throw new RangeError("Invalid value ".concat(value));
13
10
  }
14
- var resolvedUnit = (0, SingularRelativeTimeUnit_1.SingularRelativeTimeUnit)(unit);
11
+ var resolvedUnit = SingularRelativeTimeUnit(unit);
15
12
  var _b = getInternalSlots(rtf), fields = _b.fields, style = _b.style, numeric = _b.numeric, pluralRules = _b.pluralRules, numberFormat = _b.numberFormat;
16
13
  var entry = resolvedUnit;
17
14
  if (style === 'short') {
@@ -25,17 +22,17 @@ function PartitionRelativeTimePattern(rtf, value, unit, _a) {
25
22
  }
26
23
  var patterns = fields[entry];
27
24
  if (numeric === 'auto') {
28
- if ((0, ecma402_abstract_1.ToString)(value) in patterns) {
25
+ if (ToString(value) in patterns) {
29
26
  return [
30
27
  {
31
28
  type: 'literal',
32
- value: patterns[(0, ecma402_abstract_1.ToString)(value)],
29
+ value: patterns[ToString(value)],
33
30
  },
34
31
  ];
35
32
  }
36
33
  }
37
34
  var tl = 'future';
38
- if ((0, ecma402_abstract_1.SameValue)(value, -0) || value < 0) {
35
+ if (SameValue(value, -0) || value < 0) {
39
36
  tl = 'past';
40
37
  }
41
38
  var po = patterns[tl];
@@ -52,6 +49,5 @@ function PartitionRelativeTimePattern(rtf, value, unit, _a) {
52
49
  ];
53
50
  var pr = pluralRules.select(value);
54
51
  var pattern = po[pr];
55
- return (0, MakePartsList_1.MakePartsList)(pattern, resolvedUnit, fv);
52
+ return MakePartsList(pattern, resolvedUnit, fv);
56
53
  }
57
- exports.PartitionRelativeTimePattern = PartitionRelativeTimePattern;
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SingularRelativeTimeUnit = void 0;
4
- var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
1
+ import { invariant, Type, } from '@formatjs/ecma402-abstract';
5
2
  /**
6
3
  * https://tc39.es/proposal-intl-relative-time/#sec-singularrelativetimeunit
7
4
  * @param unit
8
5
  */
9
- function SingularRelativeTimeUnit(unit) {
10
- (0, ecma402_abstract_1.invariant)((0, ecma402_abstract_1.Type)(unit) === 'String', 'unit must be a string');
6
+ export function SingularRelativeTimeUnit(unit) {
7
+ invariant(Type(unit) === 'String', 'unit must be a string');
11
8
  if (unit === 'seconds')
12
9
  return 'second';
13
10
  if (unit === 'minutes')
@@ -36,4 +33,3 @@ function SingularRelativeTimeUnit(unit) {
36
33
  }
37
34
  return unit;
38
35
  }
39
- exports.SingularRelativeTimeUnit = SingularRelativeTimeUnit;
@@ -1,9 +1,7 @@
1
- "use strict";
2
1
  // Type-only circular import
3
2
  // eslint-disable-next-line import/no-cycle
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
3
  var internalSlotMap = new WeakMap();
6
- function getInternalSlots(x) {
4
+ export default function getInternalSlots(x) {
7
5
  var internalSlots = internalSlotMap.get(x);
8
6
  if (!internalSlots) {
9
7
  internalSlots = Object.create(null);
@@ -11,4 +9,3 @@ function getInternalSlots(x) {
11
9
  }
12
10
  return internalSlots;
13
11
  }
14
- exports.default = getInternalSlots;
package/lib/index.js CHANGED
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
5
- var InitializeRelativeTimeFormat_1 = require("./abstract/InitializeRelativeTimeFormat");
6
- var PartitionRelativeTimePattern_1 = require("./abstract/PartitionRelativeTimePattern");
7
- var get_internal_slots_1 = tslib_1.__importDefault(require("./get_internal_slots"));
1
+ import { CanonicalizeLocaleList, SupportedLocales, ToString, } from '@formatjs/ecma402-abstract';
2
+ import { InitializeRelativeTimeFormat } from './abstract/InitializeRelativeTimeFormat';
3
+ import { PartitionRelativeTimePattern } from './abstract/PartitionRelativeTimePattern';
4
+ import getInternalSlots from './get_internal_slots';
8
5
  var RelativeTimeFormat = /** @class */ (function () {
9
6
  function RelativeTimeFormat(locales, options) {
10
7
  // test262/test/intl402/RelativeTimeFormat/constructor/constructor/newtarget-undefined.js
@@ -13,8 +10,8 @@ var RelativeTimeFormat = /** @class */ (function () {
13
10
  if (!newTarget) {
14
11
  throw new TypeError("Intl.RelativeTimeFormat must be called with 'new'");
15
12
  }
16
- return (0, InitializeRelativeTimeFormat_1.InitializeRelativeTimeFormat)(this, locales, options, {
17
- getInternalSlots: get_internal_slots_1.default,
13
+ return InitializeRelativeTimeFormat(this, locales, options, {
14
+ getInternalSlots: getInternalSlots,
18
15
  availableLocales: RelativeTimeFormat.availableLocales,
19
16
  relevantExtensionKeys: RelativeTimeFormat.relevantExtensionKeys,
20
17
  localeData: RelativeTimeFormat.localeData,
@@ -25,12 +22,12 @@ var RelativeTimeFormat = /** @class */ (function () {
25
22
  if (typeof this !== 'object') {
26
23
  throw new TypeError('format was called on a non-object');
27
24
  }
28
- var internalSlots = (0, get_internal_slots_1.default)(this);
25
+ var internalSlots = getInternalSlots(this);
29
26
  if (!internalSlots.initializedRelativeTimeFormat) {
30
27
  throw new TypeError('format was called on a invalid context');
31
28
  }
32
- return (0, PartitionRelativeTimePattern_1.PartitionRelativeTimePattern)(this, Number(value), (0, ecma402_abstract_1.ToString)(unit), {
33
- getInternalSlots: get_internal_slots_1.default,
29
+ return PartitionRelativeTimePattern(this, Number(value), ToString(unit), {
30
+ getInternalSlots: getInternalSlots,
34
31
  })
35
32
  .map(function (el) { return el.value; })
36
33
  .join('');
@@ -39,17 +36,17 @@ var RelativeTimeFormat = /** @class */ (function () {
39
36
  if (typeof this !== 'object') {
40
37
  throw new TypeError('formatToParts was called on a non-object');
41
38
  }
42
- var internalSlots = (0, get_internal_slots_1.default)(this);
39
+ var internalSlots = getInternalSlots(this);
43
40
  if (!internalSlots.initializedRelativeTimeFormat) {
44
41
  throw new TypeError('formatToParts was called on a invalid context');
45
42
  }
46
- return (0, PartitionRelativeTimePattern_1.PartitionRelativeTimePattern)(this, Number(value), (0, ecma402_abstract_1.ToString)(unit), { getInternalSlots: get_internal_slots_1.default });
43
+ return PartitionRelativeTimePattern(this, Number(value), ToString(unit), { getInternalSlots: getInternalSlots });
47
44
  };
48
45
  RelativeTimeFormat.prototype.resolvedOptions = function () {
49
46
  if (typeof this !== 'object') {
50
47
  throw new TypeError('resolvedOptions was called on a non-object');
51
48
  }
52
- var internalSlots = (0, get_internal_slots_1.default)(this);
49
+ var internalSlots = getInternalSlots(this);
53
50
  if (!internalSlots.initializedRelativeTimeFormat) {
54
51
  throw new TypeError('resolvedOptions was called on a invalid context');
55
52
  }
@@ -62,7 +59,7 @@ var RelativeTimeFormat = /** @class */ (function () {
62
59
  };
63
60
  };
64
61
  RelativeTimeFormat.supportedLocalesOf = function (locales, options) {
65
- return (0, ecma402_abstract_1.SupportedLocales)(RelativeTimeFormat.availableLocales, (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales), options);
62
+ return SupportedLocales(RelativeTimeFormat.availableLocales, CanonicalizeLocaleList(locales), options);
66
63
  };
67
64
  RelativeTimeFormat.__addLocaleData = function () {
68
65
  var data = [];
@@ -92,7 +89,7 @@ var RelativeTimeFormat = /** @class */ (function () {
92
89
  RelativeTimeFormat.polyfilled = true;
93
90
  return RelativeTimeFormat;
94
91
  }());
95
- exports.default = RelativeTimeFormat;
92
+ export default RelativeTimeFormat;
96
93
  try {
97
94
  // IE11 does not have Symbol
98
95
  if (typeof Symbol !== 'undefined') {
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var _1 = tslib_1.__importDefault(require("./"));
1
+ import RelativeTimeFormat from './';
5
2
  Object.defineProperty(Intl, 'RelativeTimeFormat', {
6
- value: _1.default,
3
+ value: RelativeTimeFormat,
7
4
  writable: true,
8
5
  enumerable: false,
9
6
  configurable: true,
package/lib/polyfill.js CHANGED
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var _1 = tslib_1.__importDefault(require("./"));
5
- var should_polyfill_1 = require("./should-polyfill");
6
- if ((0, should_polyfill_1.shouldPolyfill)()) {
1
+ import RelativeTimeFormat from './';
2
+ import { shouldPolyfill } from './should-polyfill';
3
+ if (shouldPolyfill()) {
7
4
  Object.defineProperty(Intl, 'RelativeTimeFormat', {
8
- value: _1.default,
5
+ value: RelativeTimeFormat,
9
6
  writable: true,
10
7
  enumerable: false,
11
8
  configurable: true,
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shouldPolyfill = void 0;
4
- var intl_localematcher_1 = require("@formatjs/intl-localematcher");
5
- var supported_locales_generated_1 = require("./supported-locales.generated");
1
+ import { match } from '@formatjs/intl-localematcher';
2
+ import { supportedLocales } from './supported-locales.generated';
6
3
  function supportedLocalesOf(locale) {
7
4
  if (!locale) {
8
5
  return true;
@@ -22,12 +19,11 @@ function hasResolvedOptionsNumberingSystem(locale) {
22
19
  return false;
23
20
  }
24
21
  }
25
- function shouldPolyfill(locale) {
22
+ export function shouldPolyfill(locale) {
26
23
  if (locale === void 0) { locale = 'en'; }
27
24
  if (!('RelativeTimeFormat' in Intl) ||
28
25
  !supportedLocalesOf(locale) ||
29
26
  !hasResolvedOptionsNumberingSystem(locale)) {
30
- return (0, intl_localematcher_1.match)([locale], supported_locales_generated_1.supportedLocales, 'en');
27
+ return match([locale], supportedLocales, 'en');
31
28
  }
32
29
  }
33
- exports.shouldPolyfill = shouldPolyfill;
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supportedLocales = void 0;
4
- exports.supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
1
+ export var supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-relativetimeformat",
3
- "version": "11.2.8",
3
+ "version": "11.2.10",
4
4
  "description": "Formats JavaScript dates to relative time strings.",
5
5
  "keywords": [
6
6
  "intl",
@@ -21,13 +21,13 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "tslib": "^2.4.0",
24
- "@formatjs/ecma402-abstract": "1.17.3",
25
- "@formatjs/intl-localematcher": "0.5.0"
24
+ "@formatjs/ecma402-abstract": "1.18.0",
25
+ "@formatjs/intl-localematcher": "0.5.2"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@formatjs/intl-getcanonicallocales": "2.3.0",
29
- "@formatjs/intl-pluralrules": "5.2.8",
30
- "@formatjs/intl-locale": "3.4.1"
29
+ "@formatjs/intl-pluralrules": "5.2.10",
30
+ "@formatjs/intl-locale": "3.4.3"
31
31
  },
32
32
  "main": "index.js",
33
33
  "types": "index.d.ts",