@vue/compiler-core 3.2.27 → 3.2.31

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.
@@ -736,13 +736,13 @@ const deprecationData = {
736
736
  message: `Platform-native elements with "is" prop will no longer be ` +
737
737
  `treated as components in Vue 3 unless the "is" value is explicitly ` +
738
738
  `prefixed with "vue:".`,
739
- link: `https://v3.vuejs.org/guide/migration/custom-elements-interop.html`
739
+ link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
740
740
  },
741
741
  ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: {
742
742
  message: key => `.sync modifier for v-bind has been removed. Use v-model with ` +
743
743
  `argument instead. \`v-bind:${key}.sync\` should be changed to ` +
744
744
  `\`v-model:${key}\`.`,
745
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
745
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
746
746
  },
747
747
  ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: {
748
748
  message: `.prop modifier for v-bind has been removed and no longer necessary. ` +
@@ -754,11 +754,11 @@ const deprecationData = {
754
754
  `that appears before v-bind in the case of conflict. ` +
755
755
  `To retain 2.x behavior, move v-bind to make it the first attribute. ` +
756
756
  `You can also suppress this warning if the usage is intended.`,
757
- link: `https://v3.vuejs.org/guide/migration/v-bind.html`
757
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
758
758
  },
759
759
  ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: {
760
760
  message: `.native modifier for v-on has been removed as is no longer necessary.`,
761
- link: `https://v3.vuejs.org/guide/migration/v-on-native-modifier-removed.html`
761
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
762
762
  },
763
763
  ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: {
764
764
  message: `v-if / v-for precedence when used on the same element has changed ` +
@@ -766,7 +766,7 @@ const deprecationData = {
766
766
  `access to v-for scope variables. It is best to avoid the ambiguity ` +
767
767
  `with <template> tags or use a computed property that filters v-for ` +
768
768
  `data source.`,
769
- link: `https://v3.vuejs.org/guide/migration/v-if-v-for.html`
769
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
770
770
  },
771
771
  ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: {
772
772
  message: `<template> with no special directives will render as a native template ` +
@@ -774,13 +774,13 @@ const deprecationData = {
774
774
  },
775
775
  ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: {
776
776
  message: `"inline-template" has been removed in Vue 3.`,
777
- link: `https://v3.vuejs.org/guide/migration/inline-template-attribute.html`
777
+ link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
778
778
  },
779
779
  ["COMPILER_FILTER" /* COMPILER_FILTERS */]: {
780
780
  message: `filters have been removed in Vue 3. ` +
781
781
  `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
782
782
  `Use method calls or computed properties instead.`,
783
- link: `https://v3.vuejs.org/guide/migration/filters.html`
783
+ link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
784
784
  }
785
785
  };
786
786
  function getCompatValue(key, context) {
@@ -1310,7 +1310,7 @@ function parseAttributes(context, type) {
1310
1310
  }
1311
1311
  const attr = parseAttribute(context, attributeNames);
1312
1312
  // Trim whitespace between class
1313
- // https://github.com/vuejs/vue-next/issues/4251
1313
+ // https://github.com/vuejs/core/issues/4251
1314
1314
  if (attr.type === 6 /* ATTRIBUTE */ &&
1315
1315
  attr.value &&
1316
1316
  attr.name === 'class') {
@@ -1546,7 +1546,7 @@ function parseTextData(context, length, mode) {
1546
1546
  advanceBy(context, length);
1547
1547
  if (mode === 2 /* RAWTEXT */ ||
1548
1548
  mode === 3 /* CDATA */ ||
1549
- rawText.indexOf('&') === -1) {
1549
+ !rawText.includes('&')) {
1550
1550
  return rawText;
1551
1551
  }
1552
1552
  else {
@@ -3288,7 +3288,7 @@ function isReferenced(node, parent, grandparent) {
3288
3288
  // no: NODE.target
3289
3289
  case 'MetaProperty':
3290
3290
  return false;
3291
- // yes: type X = { somePropert: NODE }
3291
+ // yes: type X = { someProperty: NODE }
3292
3292
  // no: type X = { NODE: OtherType }
3293
3293
  case 'ObjectTypeProperty':
3294
3294
  return parent.key !== node;
@@ -3799,6 +3799,7 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3799
3799
  const renderExp = createCallExpression(helper(RENDER_LIST), [
3800
3800
  forNode.source
3801
3801
  ]);
3802
+ const isTemplate = isTemplateNode(node);
3802
3803
  const memo = findDir(node, 'memo');
3803
3804
  const keyProp = findProp(node, `key`);
3804
3805
  const keyExp = keyProp &&
@@ -3806,15 +3807,17 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3806
3807
  ? createSimpleExpression(keyProp.value.content, true)
3807
3808
  : keyProp.exp);
3808
3809
  const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
3809
- if (context.prefixIdentifiers &&
3810
- keyProperty &&
3811
- keyProp.type !== 6 /* ATTRIBUTE */) {
3812
- // #2085 process :key expression needs to be processed in order for it
3813
- // to behave consistently for <template v-for> and <div v-for>.
3814
- // In the case of `<template v-for>`, the node is discarded and never
3815
- // traversed so its key expression won't be processed by the normal
3816
- // transforms.
3817
- keyProperty.value = processExpression(keyProperty.value, context);
3810
+ if (isTemplate) {
3811
+ // #2085 / #5288 process :key and v-memo expressions need to be
3812
+ // processed on `<template v-for>`. In this case the node is discarded
3813
+ // and never traversed so its binding expressions won't be processed
3814
+ // by the normal transforms.
3815
+ if (memo) {
3816
+ memo.exp = processExpression(memo.exp, context);
3817
+ }
3818
+ if (keyProperty && keyProp.type !== 6 /* ATTRIBUTE */) {
3819
+ keyProperty.value = processExpression(keyProperty.value, context);
3820
+ }
3818
3821
  }
3819
3822
  const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ &&
3820
3823
  forNode.source.constType > 0 /* NOT_CONSTANT */;
@@ -3828,7 +3831,6 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3828
3831
  return () => {
3829
3832
  // finish the codegen now that all children have been traversed
3830
3833
  let childBlock;
3831
- const isTemplate = isTemplateNode(node);
3832
3834
  const { children } = forNode;
3833
3835
  // check <template v-for> key placement
3834
3836
  if (isTemplate) {
@@ -4745,7 +4747,7 @@ function buildProps(node, context, props = node.props, ssr = false) {
4745
4747
  }
4746
4748
  }
4747
4749
  }
4748
- else {
4750
+ else if (!shared.isBuiltInDirective(name)) {
4749
4751
  // no built-in transform, this is a user custom directive.
4750
4752
  runtimeDirectives.push(prop);
4751
4753
  // custom dirs may use beforeUpdate so they need to force blocks
@@ -5718,6 +5720,7 @@ exports.advancePositionWithMutation = advancePositionWithMutation;
5718
5720
  exports.assert = assert;
5719
5721
  exports.baseCompile = baseCompile;
5720
5722
  exports.baseParse = baseParse;
5723
+ exports.buildDirectiveArgs = buildDirectiveArgs;
5721
5724
  exports.buildProps = buildProps;
5722
5725
  exports.buildSlots = buildSlots;
5723
5726
  exports.checkCompatEnabled = checkCompatEnabled;
@@ -735,13 +735,13 @@ const deprecationData = {
735
735
  message: `Platform-native elements with "is" prop will no longer be ` +
736
736
  `treated as components in Vue 3 unless the "is" value is explicitly ` +
737
737
  `prefixed with "vue:".`,
738
- link: `https://v3.vuejs.org/guide/migration/custom-elements-interop.html`
738
+ link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
739
739
  },
740
740
  ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: {
741
741
  message: key => `.sync modifier for v-bind has been removed. Use v-model with ` +
742
742
  `argument instead. \`v-bind:${key}.sync\` should be changed to ` +
743
743
  `\`v-model:${key}\`.`,
744
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
744
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
745
745
  },
746
746
  ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: {
747
747
  message: `.prop modifier for v-bind has been removed and no longer necessary. ` +
@@ -753,11 +753,11 @@ const deprecationData = {
753
753
  `that appears before v-bind in the case of conflict. ` +
754
754
  `To retain 2.x behavior, move v-bind to make it the first attribute. ` +
755
755
  `You can also suppress this warning if the usage is intended.`,
756
- link: `https://v3.vuejs.org/guide/migration/v-bind.html`
756
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
757
757
  },
758
758
  ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: {
759
759
  message: `.native modifier for v-on has been removed as is no longer necessary.`,
760
- link: `https://v3.vuejs.org/guide/migration/v-on-native-modifier-removed.html`
760
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
761
761
  },
762
762
  ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: {
763
763
  message: `v-if / v-for precedence when used on the same element has changed ` +
@@ -765,7 +765,7 @@ const deprecationData = {
765
765
  `access to v-for scope variables. It is best to avoid the ambiguity ` +
766
766
  `with <template> tags or use a computed property that filters v-for ` +
767
767
  `data source.`,
768
- link: `https://v3.vuejs.org/guide/migration/v-if-v-for.html`
768
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
769
769
  },
770
770
  ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: {
771
771
  message: `<template> with no special directives will render as a native template ` +
@@ -773,13 +773,13 @@ const deprecationData = {
773
773
  },
774
774
  ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: {
775
775
  message: `"inline-template" has been removed in Vue 3.`,
776
- link: `https://v3.vuejs.org/guide/migration/inline-template-attribute.html`
776
+ link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
777
777
  },
778
778
  ["COMPILER_FILTER" /* COMPILER_FILTERS */]: {
779
779
  message: `filters have been removed in Vue 3. ` +
780
780
  `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
781
781
  `Use method calls or computed properties instead.`,
782
- link: `https://v3.vuejs.org/guide/migration/filters.html`
782
+ link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
783
783
  }
784
784
  };
785
785
  function getCompatValue(key, context) {
@@ -1285,7 +1285,7 @@ function parseAttributes(context, type) {
1285
1285
  }
1286
1286
  const attr = parseAttribute(context, attributeNames);
1287
1287
  // Trim whitespace between class
1288
- // https://github.com/vuejs/vue-next/issues/4251
1288
+ // https://github.com/vuejs/core/issues/4251
1289
1289
  if (attr.type === 6 /* ATTRIBUTE */ &&
1290
1290
  attr.value &&
1291
1291
  attr.name === 'class') {
@@ -1518,7 +1518,7 @@ function parseTextData(context, length, mode) {
1518
1518
  advanceBy(context, length);
1519
1519
  if (mode === 2 /* RAWTEXT */ ||
1520
1520
  mode === 3 /* CDATA */ ||
1521
- rawText.indexOf('&') === -1) {
1521
+ !rawText.includes('&')) {
1522
1522
  return rawText;
1523
1523
  }
1524
1524
  else {
@@ -3225,7 +3225,7 @@ function isReferenced(node, parent, grandparent) {
3225
3225
  // no: NODE.target
3226
3226
  case 'MetaProperty':
3227
3227
  return false;
3228
- // yes: type X = { somePropert: NODE }
3228
+ // yes: type X = { someProperty: NODE }
3229
3229
  // no: type X = { NODE: OtherType }
3230
3230
  case 'ObjectTypeProperty':
3231
3231
  return parent.key !== node;
@@ -3717,6 +3717,7 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3717
3717
  const renderExp = createCallExpression(helper(RENDER_LIST), [
3718
3718
  forNode.source
3719
3719
  ]);
3720
+ const isTemplate = isTemplateNode(node);
3720
3721
  const memo = findDir(node, 'memo');
3721
3722
  const keyProp = findProp(node, `key`);
3722
3723
  const keyExp = keyProp &&
@@ -3724,15 +3725,17 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3724
3725
  ? createSimpleExpression(keyProp.value.content, true)
3725
3726
  : keyProp.exp);
3726
3727
  const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
3727
- if (context.prefixIdentifiers &&
3728
- keyProperty &&
3729
- keyProp.type !== 6 /* ATTRIBUTE */) {
3730
- // #2085 process :key expression needs to be processed in order for it
3731
- // to behave consistently for <template v-for> and <div v-for>.
3732
- // In the case of `<template v-for>`, the node is discarded and never
3733
- // traversed so its key expression won't be processed by the normal
3734
- // transforms.
3735
- keyProperty.value = processExpression(keyProperty.value, context);
3728
+ if (isTemplate) {
3729
+ // #2085 / #5288 process :key and v-memo expressions need to be
3730
+ // processed on `<template v-for>`. In this case the node is discarded
3731
+ // and never traversed so its binding expressions won't be processed
3732
+ // by the normal transforms.
3733
+ if (memo) {
3734
+ memo.exp = processExpression(memo.exp, context);
3735
+ }
3736
+ if (keyProperty && keyProp.type !== 6 /* ATTRIBUTE */) {
3737
+ keyProperty.value = processExpression(keyProperty.value, context);
3738
+ }
3736
3739
  }
3737
3740
  const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ &&
3738
3741
  forNode.source.constType > 0 /* NOT_CONSTANT */;
@@ -3746,7 +3749,6 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3746
3749
  return () => {
3747
3750
  // finish the codegen now that all children have been traversed
3748
3751
  let childBlock;
3749
- const isTemplate = isTemplateNode(node);
3750
3752
  const { children } = forNode;
3751
3753
  // check <template v-for> key placement
3752
3754
  if (isTemplate) {
@@ -4620,7 +4622,7 @@ function buildProps(node, context, props = node.props, ssr = false) {
4620
4622
  }
4621
4623
  }
4622
4624
  }
4623
- else {
4625
+ else if (!shared.isBuiltInDirective(name)) {
4624
4626
  // no built-in transform, this is a user custom directive.
4625
4627
  runtimeDirectives.push(prop);
4626
4628
  // custom dirs may use beforeUpdate so they need to force blocks
@@ -5589,6 +5591,7 @@ exports.advancePositionWithMutation = advancePositionWithMutation;
5589
5591
  exports.assert = assert;
5590
5592
  exports.baseCompile = baseCompile;
5591
5593
  exports.baseParse = baseParse;
5594
+ exports.buildDirectiveArgs = buildDirectiveArgs;
5592
5595
  exports.buildProps = buildProps;
5593
5596
  exports.buildSlots = buildSlots;
5594
5597
  exports.checkCompatEnabled = checkCompatEnabled;
@@ -100,6 +100,8 @@ export declare interface BlockStatement extends Node_2 {
100
100
  body: (JSChildNode | IfStatement)[];
101
101
  }
102
102
 
103
+ export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression;
104
+
103
105
  export declare function buildProps(node: ElementNode, context: TransformContext, props?: ElementNode['props'], ssr?: boolean): {
104
106
  props: PropsExpression | undefined;
105
107
  directives: DirectiveNode[];
@@ -811,7 +813,7 @@ export declare interface Property extends Node_2 {
811
813
  value: JSChildNode;
812
814
  }
813
815
 
814
- declare type PropsExpression = ObjectExpression | CallExpression | ExpressionNode;
816
+ export declare type PropsExpression = ObjectExpression | CallExpression | ExpressionNode;
815
817
 
816
818
  export declare const PUSH_SCOPE_ID: unique symbol;
817
819
 
@@ -1,4 +1,4 @@
1
- import { isString, hyphenate, NOOP, extend, isObject, NO, isArray, makeMap, isSymbol, EMPTY_OBJ, capitalize, camelize as camelize$1, PatchFlagNames, slotFlagsText, isOn, isReservedProp, toHandlerKey } from '@vue/shared';
1
+ import { isString, hyphenate, NOOP, extend, isObject, NO, isArray, makeMap, isSymbol, EMPTY_OBJ, capitalize, camelize as camelize$1, PatchFlagNames, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared';
2
2
  export { generateCodeFrame } from '@vue/shared';
3
3
 
4
4
  function defaultOnError(error) {
@@ -719,13 +719,13 @@ const deprecationData = {
719
719
  message: `Platform-native elements with "is" prop will no longer be ` +
720
720
  `treated as components in Vue 3 unless the "is" value is explicitly ` +
721
721
  `prefixed with "vue:".`,
722
- link: `https://v3.vuejs.org/guide/migration/custom-elements-interop.html`
722
+ link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
723
723
  },
724
724
  ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: {
725
725
  message: key => `.sync modifier for v-bind has been removed. Use v-model with ` +
726
726
  `argument instead. \`v-bind:${key}.sync\` should be changed to ` +
727
727
  `\`v-model:${key}\`.`,
728
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
728
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
729
729
  },
730
730
  ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: {
731
731
  message: `.prop modifier for v-bind has been removed and no longer necessary. ` +
@@ -737,11 +737,11 @@ const deprecationData = {
737
737
  `that appears before v-bind in the case of conflict. ` +
738
738
  `To retain 2.x behavior, move v-bind to make it the first attribute. ` +
739
739
  `You can also suppress this warning if the usage is intended.`,
740
- link: `https://v3.vuejs.org/guide/migration/v-bind.html`
740
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
741
741
  },
742
742
  ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: {
743
743
  message: `.native modifier for v-on has been removed as is no longer necessary.`,
744
- link: `https://v3.vuejs.org/guide/migration/v-on-native-modifier-removed.html`
744
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
745
745
  },
746
746
  ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: {
747
747
  message: `v-if / v-for precedence when used on the same element has changed ` +
@@ -749,7 +749,7 @@ const deprecationData = {
749
749
  `access to v-for scope variables. It is best to avoid the ambiguity ` +
750
750
  `with <template> tags or use a computed property that filters v-for ` +
751
751
  `data source.`,
752
- link: `https://v3.vuejs.org/guide/migration/v-if-v-for.html`
752
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
753
753
  },
754
754
  ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: {
755
755
  message: `<template> with no special directives will render as a native template ` +
@@ -757,13 +757,13 @@ const deprecationData = {
757
757
  },
758
758
  ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: {
759
759
  message: `"inline-template" has been removed in Vue 3.`,
760
- link: `https://v3.vuejs.org/guide/migration/inline-template-attribute.html`
760
+ link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
761
761
  },
762
762
  ["COMPILER_FILTER" /* COMPILER_FILTERS */]: {
763
763
  message: `filters have been removed in Vue 3. ` +
764
764
  `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
765
765
  `Use method calls or computed properties instead.`,
766
- link: `https://v3.vuejs.org/guide/migration/filters.html`
766
+ link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
767
767
  }
768
768
  };
769
769
  function getCompatValue(key, context) {
@@ -1295,7 +1295,7 @@ function parseAttributes(context, type) {
1295
1295
  }
1296
1296
  const attr = parseAttribute(context, attributeNames);
1297
1297
  // Trim whitespace between class
1298
- // https://github.com/vuejs/vue-next/issues/4251
1298
+ // https://github.com/vuejs/core/issues/4251
1299
1299
  if (attr.type === 6 /* ATTRIBUTE */ &&
1300
1300
  attr.value &&
1301
1301
  attr.name === 'class') {
@@ -1531,7 +1531,7 @@ function parseTextData(context, length, mode) {
1531
1531
  advanceBy(context, length);
1532
1532
  if (mode === 2 /* RAWTEXT */ ||
1533
1533
  mode === 3 /* CDATA */ ||
1534
- rawText.indexOf('&') === -1) {
1534
+ !rawText.includes('&')) {
1535
1535
  return rawText;
1536
1536
  }
1537
1537
  else {
@@ -3155,6 +3155,7 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3155
3155
  const renderExp = createCallExpression(helper(RENDER_LIST), [
3156
3156
  forNode.source
3157
3157
  ]);
3158
+ const isTemplate = isTemplateNode(node);
3158
3159
  const memo = findDir(node, 'memo');
3159
3160
  const keyProp = findProp(node, `key`);
3160
3161
  const keyExp = keyProp &&
@@ -3174,7 +3175,6 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
3174
3175
  return () => {
3175
3176
  // finish the codegen now that all children have been traversed
3176
3177
  let childBlock;
3177
- const isTemplate = isTemplateNode(node);
3178
3178
  const { children } = forNode;
3179
3179
  // check <template v-for> key placement
3180
3180
  if (((process.env.NODE_ENV !== 'production') || !true) && isTemplate) {
@@ -4002,7 +4002,7 @@ function buildProps(node, context, props = node.props, ssr = false) {
4002
4002
  }
4003
4003
  }
4004
4004
  }
4005
- else {
4005
+ else if (!isBuiltInDirective(name)) {
4006
4006
  // no built-in transform, this is a user custom directive.
4007
4007
  runtimeDirectives.push(prop);
4008
4008
  // custom dirs may use beforeUpdate so they need to force blocks
@@ -4855,4 +4855,4 @@ function baseCompile(template, options = {}) {
4855
4855
 
4856
4856
  const noopDirectiveTransform = () => ({ props: [] });
4857
4857
 
4858
- export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildProps, buildSlots, checkCompatEnabled, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVSlot, locStub, makeBlock, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
4858
+ export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVSlot, locStub, makeBlock, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-core",
3
- "version": "3.2.27",
3
+ "version": "3.2.31",
4
4
  "description": "@vue/compiler-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/compiler-core.esm-bundler.js",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "git+https://github.com/vuejs/vue-next.git",
22
+ "url": "git+https://github.com/vuejs/core.git",
23
23
  "directory": "packages/compiler-core"
24
24
  },
25
25
  "keywords": [
@@ -28,11 +28,11 @@
28
28
  "author": "Evan You",
29
29
  "license": "MIT",
30
30
  "bugs": {
31
- "url": "https://github.com/vuejs/vue-next/issues"
31
+ "url": "https://github.com/vuejs/core/issues"
32
32
  },
33
- "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-core#readme",
33
+ "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.2.27",
35
+ "@vue/shared": "3.2.31",
36
36
  "@babel/parser": "^7.16.4",
37
37
  "estree-walker": "^2.0.2",
38
38
  "source-map": "^0.6.1"