@vue/compiler-core 3.3.1 → 3.3.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.
@@ -3079,6 +3079,7 @@ const TS_NODE_TYPES = [
3079
3079
  ];
3080
3080
 
3081
3081
  const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this");
3082
+ const constantBailRE = /\w\s*\(|\.[^\d]/;
3082
3083
  const transformExpression = (node, context) => {
3083
3084
  if (node.type === 5) {
3084
3085
  node.content = processExpression(
@@ -3168,7 +3169,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
3168
3169
  return `_ctx.${raw}`;
3169
3170
  };
3170
3171
  const rawExp = node.content;
3171
- const bailConstant = rawExp.indexOf(`(`) > -1 || rawExp.indexOf(".") > 0;
3172
+ const bailConstant = constantBailRE.test(rawExp);
3172
3173
  if (isSimpleIdentifier(rawExp)) {
3173
3174
  const isScopeVarReference = context.identifiers[rawExp];
3174
3175
  const isAllowedGlobal = shared.isGloballyWhitelisted(rawExp);
@@ -3008,6 +3008,7 @@ const TS_NODE_TYPES = [
3008
3008
  ];
3009
3009
 
3010
3010
  const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this");
3011
+ const constantBailRE = /\w\s*\(|\.[^\d]/;
3011
3012
  const transformExpression = (node, context) => {
3012
3013
  if (node.type === 5) {
3013
3014
  node.content = processExpression(
@@ -3097,7 +3098,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
3097
3098
  return `_ctx.${raw}`;
3098
3099
  };
3099
3100
  const rawExp = node.content;
3100
- const bailConstant = rawExp.indexOf(`(`) > -1 || rawExp.indexOf(".") > 0;
3101
+ const bailConstant = constantBailRE.test(rawExp);
3101
3102
  if (isSimpleIdentifier(rawExp)) {
3102
3103
  const isScopeVarReference = context.identifiers[rawExp];
3103
3104
  const isAllowedGlobal = shared.isGloballyWhitelisted(rawExp);
@@ -2832,8 +2832,7 @@ function processIf(node, dir, context, processCodegen) {
2832
2832
  while (i-- >= -1) {
2833
2833
  const sibling = siblings[i];
2834
2834
  if (sibling && sibling.type === 3) {
2835
- context.removeNode(sibling);
2836
- process.env.NODE_ENV !== "production" && comments.unshift(sibling);
2835
+ context.removeNode(sibling)(process.env.NODE_ENV !== "production") && comments.unshift(sibling);
2837
2836
  continue;
2838
2837
  }
2839
2838
  if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-core",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "description": "@vue/compiler-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/compiler-core.esm-bundler.js",
@@ -33,7 +33,7 @@
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
34
34
  "dependencies": {
35
35
  "@babel/parser": "^7.21.3",
36
- "@vue/shared": "3.3.1",
36
+ "@vue/shared": "3.3.3",
37
37
  "estree-walker": "^2.0.2",
38
38
  "source-map-js": "^1.0.2"
39
39
  },