@formatjs/ts-transformer 3.10.1 → 3.11.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/ts-transformer",
3
- "version": "3.10.1",
3
+ "version": "3.11.0",
4
4
  "description": "TS Compiler transformer for formatjs",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "react-intl"
18
18
  ],
19
19
  "dependencies": {
20
- "@formatjs/icu-messageformat-parser": "2.1.8",
20
+ "@formatjs/icu-messageformat-parser": "2.1.9",
21
21
  "@types/json-stable-stringify": "^1.0.32",
22
22
  "@types/node": "14 || 16 || 17",
23
23
  "chalk": "^4.0.0",
@@ -66,7 +66,7 @@ function interpolateName(loaderContext, name, options) {
66
66
  url = url
67
67
  // `hash` and `contenthash` are same in `loader-utils` context
68
68
  // let's keep `hash` for backward compatibility
69
- .replace(/\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi, (_, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
69
+ .replace(/\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*[a-z]*))?(?::(\d+))?\]/gi, (_, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
70
70
  }
71
71
  url = url
72
72
  .replace(/\[ext\]/gi, () => ext)