@formatjs/intl-listformat 7.7.9 → 7.7.11

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.
Files changed (2) hide show
  1. package/package.json +20 -25
  2. package/polyfill.iife.js +36 -24
package/package.json CHANGED
@@ -1,35 +1,30 @@
1
1
  {
2
2
  "name": "@formatjs/intl-listformat",
3
- "version": "7.7.9",
4
3
  "description": "Formats JS list in a i18n-safe way",
5
- "keywords": [
6
- "intl",
7
- "i18n",
8
- "list",
9
- "format",
10
- "formatjs",
11
- "listformat"
12
- ],
4
+ "version": "7.7.11",
5
+ "license": "MIT",
13
6
  "author": "Long Ho <holevietlong@gmail.com>",
14
- "bugs": {
15
- "url": "https://github.com/formatjs/formatjs/issues"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "git@github.com:formatjs/formatjs.git"
20
- },
7
+ "types": "index.d.ts",
21
8
  "dependencies": {
22
- "tslib": "2",
23
- "@formatjs/ecma402-abstract": "2.3.2",
24
- "@formatjs/intl-localematcher": "0.5.10"
9
+ "tslib": "^2.8.0",
10
+ "@formatjs/ecma402-abstract": "2.3.4",
11
+ "@formatjs/intl-localematcher": "0.6.1"
25
12
  },
26
13
  "devDependencies": {
27
- "@formatjs/intl-getcanonicallocales": "2.5.4",
28
- "@formatjs/intl-locale": "4.2.9"
14
+ "@formatjs/intl-getcanonicallocales": "2.5.5",
15
+ "@formatjs/intl-locale": "4.2.11"
29
16
  },
30
- "main": "index.js",
31
- "types": "index.d.ts",
17
+ "bugs": "https://github.com/formatjs/formatjs/issues",
18
+ "gitHead": "a7842673d8ad205171ad7c8cb8bb2f318b427c0c",
32
19
  "homepage": "https://github.com/formatjs/formatjs",
33
- "license": "MIT",
34
- "gitHead": "a7842673d8ad205171ad7c8cb8bb2f318b427c0c"
20
+ "keywords": [
21
+ "format",
22
+ "formatjs",
23
+ "i18n",
24
+ "intl",
25
+ "list",
26
+ "listformat"
27
+ ],
28
+ "main": "index.js",
29
+ "repository": "git@github.com:formatjs/formatjs.git"
35
30
  }
package/polyfill.iife.js CHANGED
@@ -25,7 +25,7 @@
25
25
  return Intl.getCanonicalLocales(locales);
26
26
  }
27
27
 
28
- // node_modules/.aspect_rules_js/decimal.js@10.4.3/node_modules/decimal.js/decimal.mjs
28
+ // node_modules/.aspect_rules_js/decimal.js@10.5.0/node_modules/decimal.js/decimal.mjs
29
29
  var EXP_LIMIT = 9e15;
30
30
  var MAX_DIGITS = 1e9;
31
31
  var NUMERALS = "0123456789abcdef";
@@ -317,7 +317,7 @@
317
317
  return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
318
318
  };
319
319
  P.inverseCosine = P.acos = function() {
320
- var halfPi, x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
320
+ var x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
321
321
  if (k !== -1) {
322
322
  return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
323
323
  }
@@ -325,11 +325,10 @@
325
325
  return getPi(Ctor, pr + 4, rm).times(0.5);
326
326
  Ctor.precision = pr + 6;
327
327
  Ctor.rounding = 1;
328
- x = x.asin();
329
- halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
328
+ x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();
330
329
  Ctor.precision = pr;
331
330
  Ctor.rounding = rm;
332
- return halfPi.minus(x);
331
+ return x.times(2);
333
332
  };
334
333
  P.inverseHyperbolicCosine = P.acosh = function() {
335
334
  var pr, rm, x = this, Ctor = x.constructor;
@@ -1541,14 +1540,16 @@
1541
1540
  function isOdd(n) {
1542
1541
  return n.d[n.d.length - 1] & 1;
1543
1542
  }
1544
- function maxOrMin(Ctor, args, ltgt) {
1545
- var y, x = new Ctor(args[0]), i = 0;
1543
+ function maxOrMin(Ctor, args, n) {
1544
+ var k, y, x = new Ctor(args[0]), i = 0;
1546
1545
  for (; ++i < args.length; ) {
1547
1546
  y = new Ctor(args[i]);
1548
1547
  if (!y.s) {
1549
1548
  x = y;
1550
1549
  break;
1551
- } else if (x[ltgt](y)) {
1550
+ }
1551
+ k = x.cmp(y);
1552
+ if (k === n || k === 0 && x.s === n) {
1552
1553
  x = y;
1553
1554
  }
1554
1555
  }
@@ -2130,7 +2131,8 @@
2130
2131
  x.d = [v];
2131
2132
  }
2132
2133
  return;
2133
- } else if (v * 0 !== 0) {
2134
+ }
2135
+ if (v * 0 !== 0) {
2134
2136
  if (!v)
2135
2137
  x.s = NaN;
2136
2138
  x.e = NaN;
@@ -2138,18 +2140,28 @@
2138
2140
  return;
2139
2141
  }
2140
2142
  return parseDecimal(x, v.toString());
2141
- } else if (t !== "string") {
2142
- throw Error(invalidArgument + v);
2143
2143
  }
2144
- if ((i2 = v.charCodeAt(0)) === 45) {
2145
- v = v.slice(1);
2146
- x.s = -1;
2147
- } else {
2148
- if (i2 === 43)
2144
+ if (t === "string") {
2145
+ if ((i2 = v.charCodeAt(0)) === 45) {
2149
2146
  v = v.slice(1);
2150
- x.s = 1;
2147
+ x.s = -1;
2148
+ } else {
2149
+ if (i2 === 43)
2150
+ v = v.slice(1);
2151
+ x.s = 1;
2152
+ }
2153
+ return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
2151
2154
  }
2152
- return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
2155
+ if (t === "bigint") {
2156
+ if (v < 0) {
2157
+ v = -v;
2158
+ x.s = -1;
2159
+ } else {
2160
+ x.s = 1;
2161
+ }
2162
+ return parseDecimal(x, v.toString());
2163
+ }
2164
+ throw Error(invalidArgument + v);
2153
2165
  }
2154
2166
  Decimal2.prototype = P;
2155
2167
  Decimal2.ROUND_UP = 0;
@@ -2259,10 +2271,10 @@
2259
2271
  return new this(x).log(10);
2260
2272
  }
2261
2273
  function max() {
2262
- return maxOrMin(this, arguments, "lt");
2274
+ return maxOrMin(this, arguments, -1);
2263
2275
  }
2264
2276
  function min() {
2265
- return maxOrMin(this, arguments, "gt");
2277
+ return maxOrMin(this, arguments, 1);
2266
2278
  }
2267
2279
  function mod(x, y) {
2268
2280
  return new this(x).mod(y);
@@ -6712,7 +6724,7 @@
6712
6724
  }).reduce(function(all, list) {
6713
6725
  return __spreadArray(__spreadArray([], all, true), list, true);
6714
6726
  }, []);
6715
- matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
6727
+ matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > -1 != shouldInclude));
6716
6728
  } else {
6717
6729
  matches && (matches = locale.region ? region === "*" || region === locale.region : true);
6718
6730
  }
@@ -6773,7 +6785,7 @@
6773
6785
  region: ""
6774
6786
  }, {
6775
6787
  language: supportedLocale.language,
6776
- script: desiredLSR.script,
6788
+ script: supportedLSR.script,
6777
6789
  region: ""
6778
6790
  }, data2);
6779
6791
  }
@@ -7415,10 +7427,10 @@
7415
7427
 
7416
7428
  decimal.js/decimal.mjs:
7417
7429
  (*!
7418
- * decimal.js v10.4.3
7430
+ * decimal.js v10.5.0
7419
7431
  * An arbitrary-precision Decimal type for JavaScript.
7420
7432
  * https://github.com/MikeMcl/decimal.js
7421
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
7433
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
7422
7434
  * MIT Licence
7423
7435
  *)
7424
7436
  */