@formatjs/icu-messageformat-parser 2.5.0 → 2.6.1

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/lib/parser.js CHANGED
@@ -12,7 +12,7 @@ function createLocation(start, end) {
12
12
  }
13
13
  // #region Ponyfills
14
14
  // Consolidate these variables up top for easier toggling during debugging
15
- var hasNativeStartsWith = !!String.prototype.startsWith;
15
+ var hasNativeStartsWith = !!String.prototype.startsWith && '_a'.startsWith('a', 1);
16
16
  var hasNativeFromCodePoint = !!String.fromCodePoint;
17
17
  var hasNativeFromEntries = !!Object.fromEntries;
18
18
  var hasNativeCodePointAt = !!String.prototype.codePointAt;
package/package.json CHANGED
@@ -1,32 +1,9 @@
1
1
  {
2
2
  "name": "@formatjs/icu-messageformat-parser",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "main": "index.js",
5
5
  "module": "lib/index.js",
6
6
  "types": "index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./index.d.ts",
10
- "import": "./lib/index.js",
11
- "default": "./index.js"
12
- },
13
- "./no-parser": {
14
- "types": "./no-parser.d.ts",
15
- "import": "./lib/no-parser.js",
16
- "default": "./no-parser.js"
17
- },
18
- "./printer": {
19
- "types": "./printer.d.ts",
20
- "import": "./lib/printer.js",
21
- "default": "./printer.js"
22
- },
23
- "./manipulator": {
24
- "types": "./manipulator.d.ts",
25
- "import": "./lib/manipulator.js",
26
- "default": "./manipulator.js"
27
- },
28
- "./package.json": "./package.json"
29
- },
30
7
  "license": "MIT",
31
8
  "repository": {
32
9
  "type": "git",
@@ -34,8 +11,8 @@
34
11
  "directory": "packages/icu-messageformat-parser"
35
12
  },
36
13
  "dependencies": {
37
- "@formatjs/ecma402-abstract": "1.16.0",
38
- "@formatjs/icu-skeleton-parser": "1.5.0",
14
+ "@formatjs/ecma402-abstract": "1.17.1",
15
+ "@formatjs/icu-skeleton-parser": "1.6.1",
39
16
  "tslib": "^2.4.0"
40
17
  }
41
18
  }
package/parser.js CHANGED
@@ -15,7 +15,7 @@ function createLocation(start, end) {
15
15
  }
16
16
  // #region Ponyfills
17
17
  // Consolidate these variables up top for easier toggling during debugging
18
- var hasNativeStartsWith = !!String.prototype.startsWith;
18
+ var hasNativeStartsWith = !!String.prototype.startsWith && '_a'.startsWith('a', 1);
19
19
  var hasNativeFromCodePoint = !!String.fromCodePoint;
20
20
  var hasNativeFromEntries = !!Object.fromEntries;
21
21
  var hasNativeCodePointAt = !!String.prototype.codePointAt;