@formatjs/cli 5.1.1 → 5.1.2

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/bin/formatjs +2 -2
  2. package/package.json +2 -2
package/bin/formatjs CHANGED
@@ -150564,7 +150564,7 @@ var require_interpolate_name = __commonJS({
150564
150564
  }
150565
150565
  let url = filename;
150566
150566
  if (content) {
150567
- url = url.replace(/\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi, (_, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
150567
+ url = url.replace(/\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*[a-z]*))?(?::(\d+))?\]/gi, (_, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
150568
150568
  }
150569
150569
  url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename2).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
150570
150570
  if (regExp && loaderContext.resourcePath) {
@@ -154636,7 +154636,7 @@ var require_manipulator = __commonJS({
154636
154636
  if (Array.isArray(obj)) {
154637
154637
  return tslib_1.__spreadArray([], obj.map(cloneDeep), true);
154638
154638
  }
154639
- if (typeof obj === "object") {
154639
+ if (obj !== null && typeof obj === "object") {
154640
154640
  return Object.keys(obj).reduce(function(cloned, k) {
154641
154641
  cloned[k] = cloneDeep(obj[k]);
154642
154642
  return cloned;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/cli",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "A CLI for formatjs.",
5
5
  "keywords": [
6
6
  "intl",
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/formatjs/formatjs/issues"
34
34
  },
35
35
  "devDependencies": {
36
- "@formatjs/cli-lib": "5.1.1"
36
+ "@formatjs/cli-lib": "5.1.2"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@vue/compiler-sfc": "^3.2.34"