@formatjs/cli 6.1.1 → 6.1.3

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 +11 -9
  2. package/package.json +2 -2
package/bin/formatjs CHANGED
@@ -192754,18 +192754,15 @@ function walk(node, visitor) {
192754
192754
  if (typeof node !== "object") {
192755
192755
  return;
192756
192756
  }
192757
- if (node.type !== 1 && node.type !== 8 && node.type !== 5) {
192757
+ if (node.type !== ELEMENT && node.type !== COMPOUND_EXPRESSION && node.type !== INTERPOLATION) {
192758
192758
  return;
192759
192759
  }
192760
192760
  visitor(node);
192761
- if (node.type === 5) {
192761
+ if (node.type === INTERPOLATION) {
192762
192762
  visitor(node.content);
192763
- } else if (node.type === 1) {
192763
+ } else if (node.type === ELEMENT) {
192764
192764
  node.children.forEach((n) => walk(n, visitor));
192765
- node.props.filter(
192766
- (prop) => prop.type === 7
192767
- /* NodeTypes.DIRECTIVE */
192768
- ).filter((prop) => !!prop.exp).forEach((prop) => visitor(prop.exp));
192765
+ node.props.filter((prop) => prop.type === DIRECTIVE).filter((prop) => !!prop.exp).forEach((prop) => visitor(prop.exp));
192769
192766
  } else {
192770
192767
  node.children.forEach((n) => walk(n, visitor));
192771
192768
  }
@@ -192775,7 +192772,7 @@ function templateSimpleExpressionNodeVisitor(parseScriptFn) {
192775
192772
  if (typeof n !== "object") {
192776
192773
  return;
192777
192774
  }
192778
- if (n.type !== 4) {
192775
+ if (n.type !== SIMPLE_EXPRESSION) {
192779
192776
  return;
192780
192777
  }
192781
192778
  const { content } = n;
@@ -192800,11 +192797,16 @@ function parseFile(source, filename, parseScriptFn) {
192800
192797
  parseScriptFn(scriptSetup.content);
192801
192798
  }
192802
192799
  }
192803
- var import_compiler_sfc;
192800
+ var import_compiler_sfc, ELEMENT, SIMPLE_EXPRESSION, INTERPOLATION, DIRECTIVE, COMPOUND_EXPRESSION;
192804
192801
  var init_vue_extractor = __esm({
192805
192802
  "../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/vue_extractor.js"() {
192806
192803
  "use strict";
192807
192804
  import_compiler_sfc = require("@vue/compiler-sfc");
192805
+ ELEMENT = 1;
192806
+ SIMPLE_EXPRESSION = 4;
192807
+ INTERPOLATION = 5;
192808
+ DIRECTIVE = 7;
192809
+ COMPOUND_EXPRESSION = 8;
192808
192810
  }
192809
192811
  });
192810
192812
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/cli",
3
- "version": "6.1.1",
3
+ "version": "6.1.3",
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": "6.1.1"
36
+ "@formatjs/cli-lib": "6.1.3"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@vue/compiler-sfc": "^3.2.34"