@vue/compiler-core 3.3.3 → 3.3.4

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.
@@ -5,10 +5,10 @@ function defaultOnError(error) {
5
5
  throw error;
6
6
  }
7
7
  function defaultOnWarn(msg) {
8
- process.env.NODE_ENV !== "production" && console.warn(`[Vue warn] ${msg.message}`);
8
+ !!(process.env.NODE_ENV !== "production") && console.warn(`[Vue warn] ${msg.message}`);
9
9
  }
10
10
  function createCompilerError(code, loc, messages, additionalMessage) {
11
- const msg = process.env.NODE_ENV !== "production" || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : code;
11
+ const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : code;
12
12
  const error = new SyntaxError(String(msg));
13
13
  error.code = code;
14
14
  error.loc = loc;
@@ -78,47 +78,47 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
78
78
  [53]: ``
79
79
  };
80
80
 
81
- const FRAGMENT = Symbol(process.env.NODE_ENV !== "production" ? `Fragment` : ``);
82
- const TELEPORT = Symbol(process.env.NODE_ENV !== "production" ? `Teleport` : ``);
83
- const SUSPENSE = Symbol(process.env.NODE_ENV !== "production" ? `Suspense` : ``);
84
- const KEEP_ALIVE = Symbol(process.env.NODE_ENV !== "production" ? `KeepAlive` : ``);
85
- const BASE_TRANSITION = Symbol(process.env.NODE_ENV !== "production" ? `BaseTransition` : ``);
86
- const OPEN_BLOCK = Symbol(process.env.NODE_ENV !== "production" ? `openBlock` : ``);
87
- const CREATE_BLOCK = Symbol(process.env.NODE_ENV !== "production" ? `createBlock` : ``);
88
- const CREATE_ELEMENT_BLOCK = Symbol(process.env.NODE_ENV !== "production" ? `createElementBlock` : ``);
89
- const CREATE_VNODE = Symbol(process.env.NODE_ENV !== "production" ? `createVNode` : ``);
90
- const CREATE_ELEMENT_VNODE = Symbol(process.env.NODE_ENV !== "production" ? `createElementVNode` : ``);
91
- const CREATE_COMMENT = Symbol(process.env.NODE_ENV !== "production" ? `createCommentVNode` : ``);
92
- const CREATE_TEXT = Symbol(process.env.NODE_ENV !== "production" ? `createTextVNode` : ``);
93
- const CREATE_STATIC = Symbol(process.env.NODE_ENV !== "production" ? `createStaticVNode` : ``);
94
- const RESOLVE_COMPONENT = Symbol(process.env.NODE_ENV !== "production" ? `resolveComponent` : ``);
81
+ const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``);
82
+ const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``);
83
+ const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``);
84
+ const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``);
85
+ const BASE_TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `BaseTransition` : ``);
86
+ const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``);
87
+ const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``);
88
+ const CREATE_ELEMENT_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createElementBlock` : ``);
89
+ const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``);
90
+ const CREATE_ELEMENT_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createElementVNode` : ``);
91
+ const CREATE_COMMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : ``);
92
+ const CREATE_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `createTextVNode` : ``);
93
+ const CREATE_STATIC = Symbol(!!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : ``);
94
+ const RESOLVE_COMPONENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `resolveComponent` : ``);
95
95
  const RESOLVE_DYNAMIC_COMPONENT = Symbol(
96
- process.env.NODE_ENV !== "production" ? `resolveDynamicComponent` : ``
96
+ !!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : ``
97
97
  );
98
- const RESOLVE_DIRECTIVE = Symbol(process.env.NODE_ENV !== "production" ? `resolveDirective` : ``);
99
- const RESOLVE_FILTER = Symbol(process.env.NODE_ENV !== "production" ? `resolveFilter` : ``);
100
- const WITH_DIRECTIVES = Symbol(process.env.NODE_ENV !== "production" ? `withDirectives` : ``);
101
- const RENDER_LIST = Symbol(process.env.NODE_ENV !== "production" ? `renderList` : ``);
102
- const RENDER_SLOT = Symbol(process.env.NODE_ENV !== "production" ? `renderSlot` : ``);
103
- const CREATE_SLOTS = Symbol(process.env.NODE_ENV !== "production" ? `createSlots` : ``);
104
- const TO_DISPLAY_STRING = Symbol(process.env.NODE_ENV !== "production" ? `toDisplayString` : ``);
105
- const MERGE_PROPS = Symbol(process.env.NODE_ENV !== "production" ? `mergeProps` : ``);
106
- const NORMALIZE_CLASS = Symbol(process.env.NODE_ENV !== "production" ? `normalizeClass` : ``);
107
- const NORMALIZE_STYLE = Symbol(process.env.NODE_ENV !== "production" ? `normalizeStyle` : ``);
108
- const NORMALIZE_PROPS = Symbol(process.env.NODE_ENV !== "production" ? `normalizeProps` : ``);
109
- const GUARD_REACTIVE_PROPS = Symbol(process.env.NODE_ENV !== "production" ? `guardReactiveProps` : ``);
110
- const TO_HANDLERS = Symbol(process.env.NODE_ENV !== "production" ? `toHandlers` : ``);
111
- const CAMELIZE = Symbol(process.env.NODE_ENV !== "production" ? `camelize` : ``);
112
- const CAPITALIZE = Symbol(process.env.NODE_ENV !== "production" ? `capitalize` : ``);
113
- const TO_HANDLER_KEY = Symbol(process.env.NODE_ENV !== "production" ? `toHandlerKey` : ``);
114
- const SET_BLOCK_TRACKING = Symbol(process.env.NODE_ENV !== "production" ? `setBlockTracking` : ``);
115
- const PUSH_SCOPE_ID = Symbol(process.env.NODE_ENV !== "production" ? `pushScopeId` : ``);
116
- const POP_SCOPE_ID = Symbol(process.env.NODE_ENV !== "production" ? `popScopeId` : ``);
117
- const WITH_CTX = Symbol(process.env.NODE_ENV !== "production" ? `withCtx` : ``);
118
- const UNREF = Symbol(process.env.NODE_ENV !== "production" ? `unref` : ``);
119
- const IS_REF = Symbol(process.env.NODE_ENV !== "production" ? `isRef` : ``);
120
- const WITH_MEMO = Symbol(process.env.NODE_ENV !== "production" ? `withMemo` : ``);
121
- const IS_MEMO_SAME = Symbol(process.env.NODE_ENV !== "production" ? `isMemoSame` : ``);
98
+ const RESOLVE_DIRECTIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `resolveDirective` : ``);
99
+ const RESOLVE_FILTER = Symbol(!!(process.env.NODE_ENV !== "production") ? `resolveFilter` : ``);
100
+ const WITH_DIRECTIVES = Symbol(!!(process.env.NODE_ENV !== "production") ? `withDirectives` : ``);
101
+ const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``);
102
+ const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``);
103
+ const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``);
104
+ const TO_DISPLAY_STRING = Symbol(!!(process.env.NODE_ENV !== "production") ? `toDisplayString` : ``);
105
+ const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``);
106
+ const NORMALIZE_CLASS = Symbol(!!(process.env.NODE_ENV !== "production") ? `normalizeClass` : ``);
107
+ const NORMALIZE_STYLE = Symbol(!!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : ``);
108
+ const NORMALIZE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `normalizeProps` : ``);
109
+ const GUARD_REACTIVE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : ``);
110
+ const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``);
111
+ const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``);
112
+ const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``);
113
+ const TO_HANDLER_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : ``);
114
+ const SET_BLOCK_TRACKING = Symbol(!!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : ``);
115
+ const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``);
116
+ const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``);
117
+ const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``);
118
+ const UNREF = Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``);
119
+ const IS_REF = Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``);
120
+ const WITH_MEMO = Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``);
121
+ const IS_MEMO_SAME = Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``);
122
122
  const helperNameMap = {
123
123
  [FRAGMENT]: `Fragment`,
124
124
  [TELEPORT]: `Teleport`,
@@ -645,7 +645,7 @@ function hasScopeRef(node, ids) {
645
645
  case 3:
646
646
  return false;
647
647
  default:
648
- if (process.env.NODE_ENV !== "production") ;
648
+ if (!!(process.env.NODE_ENV !== "production")) ;
649
649
  return false;
650
650
  }
651
651
  }
@@ -709,7 +709,7 @@ function isCompatEnabled(key, context) {
709
709
  }
710
710
  function checkCompatEnabled(key, context, loc, ...args) {
711
711
  const enabled = isCompatEnabled(key, context);
712
- if (process.env.NODE_ENV !== "production" && enabled) {
712
+ if (!!(process.env.NODE_ENV !== "production") && enabled) {
713
713
  warnDeprecation(key, context, loc, ...args);
714
714
  }
715
715
  return enabled;
@@ -747,7 +747,7 @@ const defaultParserOptions = {
747
747
  decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]),
748
748
  onError: defaultOnError,
749
749
  onWarn: defaultOnWarn,
750
- comments: process.env.NODE_ENV !== "production"
750
+ comments: !!(process.env.NODE_ENV !== "production")
751
751
  };
752
752
  function baseParse(content, options = {}) {
753
753
  const context = createParserContext(content, options);
@@ -831,7 +831,7 @@ function parseChildren(context, mode, ancestors) {
831
831
  ) && node && node.tag === "template" && !node.props.some(
832
832
  (p) => p.type === 7 && isSpecialTemplateDirective(p.name)
833
833
  )) {
834
- process.env.NODE_ENV !== "production" && warnDeprecation(
834
+ !!(process.env.NODE_ENV !== "production") && warnDeprecation(
835
835
  "COMPILER_NATIVE_TEMPLATE",
836
836
  context,
837
837
  node.loc
@@ -1068,7 +1068,7 @@ function parseTag(context, type, parent) {
1068
1068
  if (type === 1 /* End */) {
1069
1069
  return;
1070
1070
  }
1071
- if (process.env.NODE_ENV !== "production" && isCompatEnabled(
1071
+ if (!!(process.env.NODE_ENV !== "production") && isCompatEnabled(
1072
1072
  "COMPILER_V_IF_V_FOR_PRECEDENCE",
1073
1073
  context
1074
1074
  )) {
@@ -1286,7 +1286,7 @@ function parseAttribute(context, nameSet) {
1286
1286
  dirName = "model";
1287
1287
  modifiers.splice(modifiers.indexOf("sync"), 1);
1288
1288
  }
1289
- if (process.env.NODE_ENV !== "production" && modifiers.includes("prop")) {
1289
+ if (!!(process.env.NODE_ENV !== "production") && modifiers.includes("prop")) {
1290
1290
  checkCompatEnabled(
1291
1291
  "COMPILER_V_BIND_PROP",
1292
1292
  context,
@@ -1529,7 +1529,7 @@ function walk(node, context, doNotHoistNode = false) {
1529
1529
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
1530
1530
  if (constantType > 0) {
1531
1531
  if (constantType >= 2) {
1532
- child.codegenNode.patchFlag = -1 + (process.env.NODE_ENV !== "production" ? ` /* HOISTED */` : ``);
1532
+ child.codegenNode.patchFlag = -1 + (!!(process.env.NODE_ENV !== "production") ? ` /* HOISTED */` : ``);
1533
1533
  child.codegenNode = context.hoist(child.codegenNode);
1534
1534
  hoistedCount++;
1535
1535
  continue;
@@ -1683,7 +1683,7 @@ function getConstantType(node, context) {
1683
1683
  }
1684
1684
  return returnType;
1685
1685
  default:
1686
- if (process.env.NODE_ENV !== "production") ;
1686
+ if (!!(process.env.NODE_ENV !== "production")) ;
1687
1687
  return 0;
1688
1688
  }
1689
1689
  }
@@ -1836,7 +1836,7 @@ function createTransformContext(root, {
1836
1836
  return `_${helperNameMap[context.helper(name)]}`;
1837
1837
  },
1838
1838
  replaceNode(node) {
1839
- if (process.env.NODE_ENV !== "production") {
1839
+ if (!!(process.env.NODE_ENV !== "production")) {
1840
1840
  if (!context.currentNode) {
1841
1841
  throw new Error(`Node being replaced is already removed.`);
1842
1842
  }
@@ -1847,12 +1847,12 @@ function createTransformContext(root, {
1847
1847
  context.parent.children[context.childIndex] = context.currentNode = node;
1848
1848
  },
1849
1849
  removeNode(node) {
1850
- if (process.env.NODE_ENV !== "production" && !context.parent) {
1850
+ if (!!(process.env.NODE_ENV !== "production") && !context.parent) {
1851
1851
  throw new Error(`Cannot remove root node.`);
1852
1852
  }
1853
1853
  const list = context.parent.children;
1854
1854
  const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1;
1855
- if (process.env.NODE_ENV !== "production" && removalIndex < 0) {
1855
+ if (!!(process.env.NODE_ENV !== "production") && removalIndex < 0) {
1856
1856
  throw new Error(`node being removed is not a child of current parent`);
1857
1857
  }
1858
1858
  if (!node || node === context.currentNode) {
@@ -1931,7 +1931,7 @@ function createRootCodegen(root, context) {
1931
1931
  } else if (children.length > 1) {
1932
1932
  let patchFlag = 64;
1933
1933
  let patchFlagText = PatchFlagNames[64];
1934
- if (process.env.NODE_ENV !== "production" && children.filter((c) => c.type !== 3).length === 1) {
1934
+ if (!!(process.env.NODE_ENV !== "production") && children.filter((c) => c.type !== 3).length === 1) {
1935
1935
  patchFlag |= 2048;
1936
1936
  patchFlagText += `, ${PatchFlagNames[2048]}`;
1937
1937
  }
@@ -1940,7 +1940,7 @@ function createRootCodegen(root, context) {
1940
1940
  helper(FRAGMENT),
1941
1941
  void 0,
1942
1942
  root.children,
1943
- patchFlag + (process.env.NODE_ENV !== "production" ? ` /* ${patchFlagText} */` : ``),
1943
+ patchFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${patchFlagText} */` : ``),
1944
1944
  void 0,
1945
1945
  void 0,
1946
1946
  true,
@@ -2262,7 +2262,7 @@ function isText(n) {
2262
2262
  return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
2263
2263
  }
2264
2264
  function genNodeListAsArray(nodes, context) {
2265
- const multilines = nodes.length > 3 || process.env.NODE_ENV !== "production" && nodes.some((n) => isArray(n) || !isText(n));
2265
+ const multilines = nodes.length > 3 || !!(process.env.NODE_ENV !== "production") && nodes.some((n) => isArray(n) || !isText(n));
2266
2266
  context.push(`[`);
2267
2267
  multilines && context.indent();
2268
2268
  genNodeList(nodes, context, multilines);
@@ -2303,7 +2303,7 @@ function genNode(node, context) {
2303
2303
  case 1:
2304
2304
  case 9:
2305
2305
  case 11:
2306
- process.env.NODE_ENV !== "production" && assert(
2306
+ !!(process.env.NODE_ENV !== "production") && assert(
2307
2307
  node.codegenNode != null,
2308
2308
  `Codegen node is missing for element/if/for node. Apply appropriate transforms first.`
2309
2309
  );
@@ -2364,7 +2364,7 @@ function genNode(node, context) {
2364
2364
  case 10:
2365
2365
  break;
2366
2366
  default:
2367
- if (process.env.NODE_ENV !== "production") {
2367
+ if (!!(process.env.NODE_ENV !== "production")) {
2368
2368
  assert(false, `unhandled codegen node type: ${node.type}`);
2369
2369
  const exhaustiveCheck = node;
2370
2370
  return exhaustiveCheck;
@@ -2479,7 +2479,7 @@ function genObjectExpression(node, context) {
2479
2479
  push(`{}`, node);
2480
2480
  return;
2481
2481
  }
2482
- const multilines = properties.length > 1 || process.env.NODE_ENV !== "production" && properties.some((p) => p.value.type !== 4);
2482
+ const multilines = properties.length > 1 || !!(process.env.NODE_ENV !== "production") && properties.some((p) => p.value.type !== 4);
2483
2483
  push(multilines ? `{` : `{ `);
2484
2484
  multilines && indent();
2485
2485
  for (let i = 0; i < properties.length; i++) {
@@ -2755,7 +2755,7 @@ const transformExpression = (node, context) => {
2755
2755
  };
2756
2756
  function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) {
2757
2757
  {
2758
- if (process.env.NODE_ENV !== "production") {
2758
+ if (!!(process.env.NODE_ENV !== "production")) {
2759
2759
  validateBrowserExpression(node, context, asParams, asRawStatements);
2760
2760
  }
2761
2761
  return node;
@@ -2811,7 +2811,7 @@ function processIf(node, dir, context, processCodegen) {
2811
2811
  );
2812
2812
  dir.exp = createSimpleExpression(`true`, false, loc);
2813
2813
  }
2814
- if (process.env.NODE_ENV !== "production" && true && dir.exp) {
2814
+ if (!!(process.env.NODE_ENV !== "production") && true && dir.exp) {
2815
2815
  validateBrowserExpression(dir.exp, context);
2816
2816
  }
2817
2817
  if (dir.name === "if") {
@@ -2832,7 +2832,8 @@ 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)(process.env.NODE_ENV !== "production") && comments.unshift(sibling);
2835
+ context.removeNode(sibling);
2836
+ !!(process.env.NODE_ENV !== "production") && comments.unshift(sibling);
2836
2837
  continue;
2837
2838
  }
2838
2839
  if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
@@ -2847,11 +2848,11 @@ function processIf(node, dir, context, processCodegen) {
2847
2848
  }
2848
2849
  context.removeNode();
2849
2850
  const branch = createIfBranch(node, dir);
2850
- if (process.env.NODE_ENV !== "production" && comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
2851
+ if (!!(process.env.NODE_ENV !== "production") && comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
2851
2852
  !(context.parent && context.parent.type === 1 && isBuiltInType(context.parent.tag, "transition"))) {
2852
2853
  branch.children = [...comments, ...branch.children];
2853
2854
  }
2854
- if (process.env.NODE_ENV !== "production" || false) {
2855
+ if (!!(process.env.NODE_ENV !== "production") || false) {
2855
2856
  const key = branch.userKey;
2856
2857
  if (key) {
2857
2858
  sibling.branches.forEach(({ userKey }) => {
@@ -2900,7 +2901,7 @@ function createCodegenNodeForBranch(branch, keyIndex, context) {
2900
2901
  // make sure to pass in asBlock: true so that the comment node call
2901
2902
  // closes the current block.
2902
2903
  createCallExpression(context.helper(CREATE_COMMENT), [
2903
- process.env.NODE_ENV !== "production" ? '"v-if"' : '""',
2904
+ !!(process.env.NODE_ENV !== "production") ? '"v-if"' : '""',
2904
2905
  "true"
2905
2906
  ])
2906
2907
  );
@@ -2930,7 +2931,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
2930
2931
  } else {
2931
2932
  let patchFlag = 64;
2932
2933
  let patchFlagText = PatchFlagNames[64];
2933
- if (process.env.NODE_ENV !== "production" && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
2934
+ if (!!(process.env.NODE_ENV !== "production") && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
2934
2935
  patchFlag |= 2048;
2935
2936
  patchFlagText += `, ${PatchFlagNames[2048]}`;
2936
2937
  }
@@ -2939,7 +2940,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
2939
2940
  helper(FRAGMENT),
2940
2941
  createObjectExpression([keyProperty]),
2941
2942
  children,
2942
- patchFlag + (process.env.NODE_ENV !== "production" ? ` /* ${patchFlagText} */` : ``),
2943
+ patchFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${patchFlagText} */` : ``),
2943
2944
  void 0,
2944
2945
  void 0,
2945
2946
  true,
@@ -3012,7 +3013,7 @@ const transformFor = createStructuralDirectiveTransform(
3012
3013
  helper(FRAGMENT),
3013
3014
  void 0,
3014
3015
  renderExp,
3015
- fragmentFlag + (process.env.NODE_ENV !== "production" ? ` /* ${PatchFlagNames[fragmentFlag]} */` : ``),
3016
+ fragmentFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[fragmentFlag]} */` : ``),
3016
3017
  void 0,
3017
3018
  void 0,
3018
3019
  true,
@@ -3023,7 +3024,7 @@ const transformFor = createStructuralDirectiveTransform(
3023
3024
  return () => {
3024
3025
  let childBlock;
3025
3026
  const { children } = forNode;
3026
- if ((process.env.NODE_ENV !== "production" || false) && isTemplate) {
3027
+ if ((!!(process.env.NODE_ENV !== "production") || false) && isTemplate) {
3027
3028
  node.children.some((c) => {
3028
3029
  if (c.type === 1) {
3029
3030
  const key = findProp(c, "key");
@@ -3052,7 +3053,7 @@ const transformFor = createStructuralDirectiveTransform(
3052
3053
  helper(FRAGMENT),
3053
3054
  keyProperty ? createObjectExpression([keyProperty]) : void 0,
3054
3055
  node.children,
3055
- 64 + (process.env.NODE_ENV !== "production" ? ` /* ${PatchFlagNames[64]} */` : ``),
3056
+ 64 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[64]} */` : ``),
3056
3057
  void 0,
3057
3058
  void 0,
3058
3059
  true,
@@ -3183,7 +3184,7 @@ function parseForExpression(input, context) {
3183
3184
  key: void 0,
3184
3185
  index: void 0
3185
3186
  };
3186
- if (process.env.NODE_ENV !== "production" && true) {
3187
+ if (!!(process.env.NODE_ENV !== "production") && true) {
3187
3188
  validateBrowserExpression(result.source, context);
3188
3189
  }
3189
3190
  let valueContent = LHS.trim().replace(stripParensRE, "").trim();
@@ -3196,7 +3197,7 @@ function parseForExpression(input, context) {
3196
3197
  if (keyContent) {
3197
3198
  keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
3198
3199
  result.key = createAliasExpression(loc, keyContent, keyOffset);
3199
- if (process.env.NODE_ENV !== "production" && true) {
3200
+ if (!!(process.env.NODE_ENV !== "production") && true) {
3200
3201
  validateBrowserExpression(
3201
3202
  result.key,
3202
3203
  context,
@@ -3215,7 +3216,7 @@ function parseForExpression(input, context) {
3215
3216
  result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
3216
3217
  )
3217
3218
  );
3218
- if (process.env.NODE_ENV !== "production" && true) {
3219
+ if (!!(process.env.NODE_ENV !== "production") && true) {
3219
3220
  validateBrowserExpression(
3220
3221
  result.index,
3221
3222
  context,
@@ -3227,7 +3228,7 @@ function parseForExpression(input, context) {
3227
3228
  }
3228
3229
  if (valueContent) {
3229
3230
  result.value = createAliasExpression(loc, valueContent, trimmedOffset);
3230
- if (process.env.NODE_ENV !== "production" && true) {
3231
+ if (!!(process.env.NODE_ENV !== "production") && true) {
3231
3232
  validateBrowserExpression(
3232
3233
  result.value,
3233
3234
  context,
@@ -3472,7 +3473,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
3472
3473
  // 2 = compiled but dynamic = can skip normalization, but must run diff
3473
3474
  // 1 = compiled and static = can skip normalization AND diff as optimized
3474
3475
  createSimpleExpression(
3475
- slotFlag + (process.env.NODE_ENV !== "production" ? ` /* ${slotFlagsText[slotFlag]} */` : ``),
3476
+ slotFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${slotFlagsText[slotFlag]} */` : ``),
3476
3477
  false
3477
3478
  )
3478
3479
  )
@@ -3579,7 +3580,7 @@ const transformElement = (node, context) => {
3579
3580
  if (vnodeTag === KEEP_ALIVE) {
3580
3581
  shouldUseBlock = true;
3581
3582
  patchFlag |= 1024;
3582
- if (process.env.NODE_ENV !== "production" && node.children.length > 1) {
3583
+ if (!!(process.env.NODE_ENV !== "production") && node.children.length > 1) {
3583
3584
  context.onError(
3584
3585
  createCompilerError(46, {
3585
3586
  start: node.children[0].loc.start,
@@ -3615,7 +3616,7 @@ const transformElement = (node, context) => {
3615
3616
  }
3616
3617
  }
3617
3618
  if (patchFlag !== 0) {
3618
- if (process.env.NODE_ENV !== "production") {
3619
+ if (!!(process.env.NODE_ENV !== "production")) {
3619
3620
  if (patchFlag < 0) {
3620
3621
  vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`;
3621
3622
  } else {
@@ -3665,7 +3666,7 @@ function resolveComponentType(node, context, ssr = false) {
3665
3666
  }
3666
3667
  const isDir = !isExplicitDynamic && findDir(node, "is");
3667
3668
  if (isDir && isDir.exp) {
3668
- if (process.env.NODE_ENV !== "production") {
3669
+ if (!!(process.env.NODE_ENV !== "production")) {
3669
3670
  context.onWarn(
3670
3671
  createCompilerError(52, isDir.loc)
3671
3672
  );
@@ -3824,7 +3825,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
3824
3825
  if (isVBind) {
3825
3826
  pushMergeArg();
3826
3827
  {
3827
- if (process.env.NODE_ENV !== "production") {
3828
+ if (!!(process.env.NODE_ENV !== "production")) {
3828
3829
  const hasOverridableKeys = mergeArgs.some((arg2) => {
3829
3830
  if (arg2.type === 15) {
3830
3831
  return arg2.properties.some(({ key }) => {
@@ -4175,7 +4176,7 @@ const transformOn = (dir, node, context, augmentor) => {
4175
4176
  if (arg.type === 4) {
4176
4177
  if (arg.isStatic) {
4177
4178
  let rawName = arg.content;
4178
- if (process.env.NODE_ENV !== "production" && rawName.startsWith("vnode")) {
4179
+ if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) {
4179
4180
  context.onWarn(
4180
4181
  createCompilerError(51, arg.loc)
4181
4182
  );
@@ -4214,7 +4215,7 @@ const transformOn = (dir, node, context, augmentor) => {
4214
4215
  const isMemberExp = isMemberExpression(exp.content);
4215
4216
  const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
4216
4217
  const hasMultipleStatements = exp.content.includes(`;`);
4217
- if (process.env.NODE_ENV !== "production" && true) {
4218
+ if (!!(process.env.NODE_ENV !== "production") && true) {
4218
4219
  validateBrowserExpression(
4219
4220
  exp,
4220
4221
  context,
@@ -4355,7 +4356,7 @@ const transformText = (node, context) => {
4355
4356
  }
4356
4357
  if (!context.ssr && getConstantType(child, context) === 0) {
4357
4358
  callArgs.push(
4358
- 1 + (process.env.NODE_ENV !== "production" ? ` /* ${PatchFlagNames[1]} */` : ``)
4359
+ 1 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[1]} */` : ``)
4359
4360
  );
4360
4361
  }
4361
4362
  children[i] = {
@@ -4578,7 +4579,7 @@ function parseFilter(node, context) {
4578
4579
  lastFilterIndex = i + 1;
4579
4580
  }
4580
4581
  if (filters.length) {
4581
- process.env.NODE_ENV !== "production" && warnDeprecation(
4582
+ !!(process.env.NODE_ENV !== "production") && warnDeprecation(
4582
4583
  "COMPILER_FILTER",
4583
4584
  context,
4584
4585
  node.loc
@@ -4636,7 +4637,7 @@ function getBaseTransformPreset(prefixIdentifiers) {
4636
4637
  transformMemo,
4637
4638
  transformFor,
4638
4639
  ...[transformFilter] ,
4639
- ...process.env.NODE_ENV !== "production" ? [transformExpression] : [],
4640
+ ...!!(process.env.NODE_ENV !== "production") ? [transformExpression] : [],
4640
4641
  transformSlotOutlet,
4641
4642
  transformElement,
4642
4643
  trackSlotScopes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-core",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
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.3",
36
+ "@vue/shared": "3.3.4",
37
37
  "estree-walker": "^2.0.2",
38
38
  "source-map-js": "^1.0.2"
39
39
  },