vue 2.7.13 → 2.7.15

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 (42) hide show
  1. package/dist/vue.common.dev.js +219 -200
  2. package/dist/vue.common.prod.js +5 -5
  3. package/dist/vue.esm.browser.js +219 -200
  4. package/dist/vue.esm.browser.min.js +5 -5
  5. package/dist/vue.esm.js +223 -203
  6. package/dist/vue.js +223 -203
  7. package/dist/vue.min.js +5 -5
  8. package/dist/vue.runtime.common.dev.js +113 -92
  9. package/dist/vue.runtime.common.prod.js +5 -5
  10. package/dist/vue.runtime.esm.js +114 -92
  11. package/dist/vue.runtime.js +114 -92
  12. package/dist/vue.runtime.min.js +5 -5
  13. package/package.json +7 -7
  14. package/packages/compiler-sfc/dist/compiler-sfc.js +43 -28
  15. package/packages/compiler-sfc/node_modules/.bin/lessc +4 -4
  16. package/packages/compiler-sfc/node_modules/.bin/parser +4 -4
  17. package/packages/compiler-sfc/node_modules/.bin/sass +4 -4
  18. package/packages/compiler-sfc/node_modules/.bin/stylus +4 -4
  19. package/packages/compiler-sfc/package.json +1 -1
  20. package/packages/compiler-sfc/src/compileScript.ts +13 -8
  21. package/packages/compiler-sfc/test/__snapshots__/compileScript.spec.ts.snap +41 -9
  22. package/packages/compiler-sfc/test/__snapshots__/cssVars.spec.ts.snap +1 -1
  23. package/packages/compiler-sfc/test/compileScript.spec.ts +45 -1
  24. package/src/compiler/codegen/index.ts +1 -1
  25. package/src/compiler/parser/html-parser.ts +1 -1
  26. package/src/compiler/parser/index.ts +1 -1
  27. package/src/core/instance/lifecycle.ts +8 -2
  28. package/src/core/observer/index.ts +3 -5
  29. package/src/core/util/options.ts +19 -3
  30. package/src/core/vdom/patch.ts +5 -2
  31. package/src/platforms/web/util/element.ts +1 -1
  32. package/src/shared/util.ts +1 -3
  33. package/src/types/utils.ts +1 -1
  34. package/src/v3/apiAsyncComponent.ts +1 -1
  35. package/src/v3/reactivity/reactive.ts +4 -6
  36. package/src/v3/reactivity/readonly.ts +11 -5
  37. package/types/common.d.ts +1 -1
  38. package/types/jsx.d.ts +3 -1
  39. package/types/options.d.ts +1 -1
  40. package/types/v3-setup-helpers.d.ts +5 -1
  41. package/types/vnode.d.ts +2 -1
  42. package/dist/compiler-sfc.js +0 -14
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Vue.js v2.7.13
3
- * (c) 2014-2022 Evan You
2
+ * Vue.js v2.7.15
3
+ * (c) 2014-2023 Evan You
4
4
  * Released under the MIT License.
5
5
  */
6
6
  const emptyObject = Object.freeze({});
@@ -240,9 +240,7 @@ const identity = (_) => _;
240
240
  */
241
241
  function genStaticKeys$1(modules) {
242
242
  return modules
243
- .reduce((keys, m) => {
244
- return keys.concat(m.staticKeys || []);
245
- }, [])
243
+ .reduce((keys, m) => keys.concat(m.staticKeys || []), [])
246
244
  .join(',');
247
245
  }
248
246
  /**
@@ -836,79 +834,8 @@ methodsToPatch.forEach(function (method) {
836
834
  });
837
835
  });
838
836
 
839
- const rawMap = new WeakMap();
840
- function reactive(target) {
841
- makeReactive(target, false);
842
- return target;
843
- }
844
- /**
845
- * Return a shallowly-reactive copy of the original object, where only the root
846
- * level properties are reactive. It also does not auto-unwrap refs (even at the
847
- * root level).
848
- */
849
- function shallowReactive(target) {
850
- makeReactive(target, true);
851
- def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
852
- return target;
853
- }
854
- function makeReactive(target, shallow) {
855
- // if trying to observe a readonly proxy, return the readonly version.
856
- if (!isReadonly(target)) {
857
- {
858
- if (isArray(target)) {
859
- warn$2(`Avoid using Array as root value for ${shallow ? `shallowReactive()` : `reactive()`} as it cannot be tracked in watch() or watchEffect(). Use ${shallow ? `shallowRef()` : `ref()`} instead. This is a Vue-2-only limitation.`);
860
- }
861
- const existingOb = target && target.__ob__;
862
- if (existingOb && existingOb.shallow !== shallow) {
863
- warn$2(`Target is already a ${existingOb.shallow ? `` : `non-`}shallow reactive object, and cannot be converted to ${shallow ? `` : `non-`}shallow.`);
864
- }
865
- }
866
- const ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
867
- if (!ob) {
868
- if (target == null || isPrimitive(target)) {
869
- warn$2(`value cannot be made reactive: ${String(target)}`);
870
- }
871
- if (isCollectionType(target)) {
872
- warn$2(`Vue 2 does not support reactive collection types such as Map or Set.`);
873
- }
874
- }
875
- }
876
- }
877
- function isReactive(value) {
878
- if (isReadonly(value)) {
879
- return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
880
- }
881
- return !!(value && value.__ob__);
882
- }
883
- function isShallow(value) {
884
- return !!(value && value.__v_isShallow);
885
- }
886
- function isReadonly(value) {
887
- return !!(value && value.__v_isReadonly);
888
- }
889
- function isProxy(value) {
890
- return isReactive(value) || isReadonly(value);
891
- }
892
- function toRaw(observed) {
893
- const raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
894
- return raw ? toRaw(raw) : observed;
895
- }
896
- function markRaw(value) {
897
- if (isObject(value)) {
898
- rawMap.set(value, true);
899
- }
900
- return value;
901
- }
902
- /**
903
- * @internal
904
- */
905
- function isCollectionType(value) {
906
- const type = toRawType(value);
907
- return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
908
- }
909
-
910
837
  const arrayKeys = Object.getOwnPropertyNames(arrayMethods);
911
- const NO_INIITIAL_VALUE = {};
838
+ const NO_INITIAL_VALUE = {};
912
839
  /**
913
840
  * In some cases we may want to disable observation inside a component's
914
841
  * update computation.
@@ -965,7 +892,7 @@ class Observer {
965
892
  const keys = Object.keys(value);
966
893
  for (let i = 0; i < keys.length; i++) {
967
894
  const key = keys[i];
968
- defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock);
895
+ defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);
969
896
  }
970
897
  }
971
898
  }
@@ -993,7 +920,6 @@ function observe(value, shallow, ssrMockReactivity) {
993
920
  (isArray(value) || isPlainObject(value)) &&
994
921
  Object.isExtensible(value) &&
995
922
  !value.__v_skip /* ReactiveFlags.SKIP */ &&
996
- !rawMap.has(value) &&
997
923
  !isRef(value) &&
998
924
  !(value instanceof VNode)) {
999
925
  return new Observer(value, shallow, ssrMockReactivity);
@@ -1012,7 +938,7 @@ function defineReactive(obj, key, val, customSetter, shallow, mock) {
1012
938
  const getter = property && property.get;
1013
939
  const setter = property && property.set;
1014
940
  if ((!getter || setter) &&
1015
- (val === NO_INIITIAL_VALUE || arguments.length === 2)) {
941
+ (val === NO_INITIAL_VALUE || arguments.length === 2)) {
1016
942
  val = obj[key];
1017
943
  }
1018
944
  let childOb = !shallow && observe(val, false, mock);
@@ -1166,6 +1092,77 @@ function dependArray(value) {
1166
1092
  }
1167
1093
  }
1168
1094
 
1095
+ function reactive(target) {
1096
+ makeReactive(target, false);
1097
+ return target;
1098
+ }
1099
+ /**
1100
+ * Return a shallowly-reactive copy of the original object, where only the root
1101
+ * level properties are reactive. It also does not auto-unwrap refs (even at the
1102
+ * root level).
1103
+ */
1104
+ function shallowReactive(target) {
1105
+ makeReactive(target, true);
1106
+ def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
1107
+ return target;
1108
+ }
1109
+ function makeReactive(target, shallow) {
1110
+ // if trying to observe a readonly proxy, return the readonly version.
1111
+ if (!isReadonly(target)) {
1112
+ {
1113
+ if (isArray(target)) {
1114
+ warn$2(`Avoid using Array as root value for ${shallow ? `shallowReactive()` : `reactive()`} as it cannot be tracked in watch() or watchEffect(). Use ${shallow ? `shallowRef()` : `ref()`} instead. This is a Vue-2-only limitation.`);
1115
+ }
1116
+ const existingOb = target && target.__ob__;
1117
+ if (existingOb && existingOb.shallow !== shallow) {
1118
+ warn$2(`Target is already a ${existingOb.shallow ? `` : `non-`}shallow reactive object, and cannot be converted to ${shallow ? `` : `non-`}shallow.`);
1119
+ }
1120
+ }
1121
+ const ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
1122
+ if (!ob) {
1123
+ if (target == null || isPrimitive(target)) {
1124
+ warn$2(`value cannot be made reactive: ${String(target)}`);
1125
+ }
1126
+ if (isCollectionType(target)) {
1127
+ warn$2(`Vue 2 does not support reactive collection types such as Map or Set.`);
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+ function isReactive(value) {
1133
+ if (isReadonly(value)) {
1134
+ return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
1135
+ }
1136
+ return !!(value && value.__ob__);
1137
+ }
1138
+ function isShallow(value) {
1139
+ return !!(value && value.__v_isShallow);
1140
+ }
1141
+ function isReadonly(value) {
1142
+ return !!(value && value.__v_isReadonly);
1143
+ }
1144
+ function isProxy(value) {
1145
+ return isReactive(value) || isReadonly(value);
1146
+ }
1147
+ function toRaw(observed) {
1148
+ const raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
1149
+ return raw ? toRaw(raw) : observed;
1150
+ }
1151
+ function markRaw(value) {
1152
+ // non-extensible objects won't be observed anyway
1153
+ if (Object.isExtensible(value)) {
1154
+ def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
1155
+ }
1156
+ return value;
1157
+ }
1158
+ /**
1159
+ * @internal
1160
+ */
1161
+ function isCollectionType(value) {
1162
+ const type = toRawType(value);
1163
+ return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
1164
+ }
1165
+
1169
1166
  /**
1170
1167
  * @internal
1171
1168
  */
@@ -1301,8 +1298,8 @@ function toRef(object, key, defaultValue) {
1301
1298
  return ref;
1302
1299
  }
1303
1300
 
1304
- const rawToReadonlyMap = new WeakMap();
1305
- const rawToShallowReadonlyMap = new WeakMap();
1301
+ const rawToReadonlyFlag = `__v_rawToReadonly`;
1302
+ const rawToShallowReadonlyFlag = `__v_rawToShallowReadonly`;
1306
1303
  function readonly(target) {
1307
1304
  return createReadonly(target, false);
1308
1305
  }
@@ -1321,18 +1318,21 @@ function createReadonly(target, shallow) {
1321
1318
  }
1322
1319
  return target;
1323
1320
  }
1321
+ if (!Object.isExtensible(target)) {
1322
+ warn$2(`Vue 2 does not support creating readonly proxy for non-extensible object.`);
1323
+ }
1324
1324
  // already a readonly object
1325
1325
  if (isReadonly(target)) {
1326
1326
  return target;
1327
1327
  }
1328
1328
  // already has a readonly proxy
1329
- const map = shallow ? rawToShallowReadonlyMap : rawToReadonlyMap;
1330
- const existingProxy = map.get(target);
1329
+ const existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;
1330
+ const existingProxy = target[existingFlag];
1331
1331
  if (existingProxy) {
1332
1332
  return existingProxy;
1333
1333
  }
1334
1334
  const proxy = Object.create(Object.getPrototypeOf(target));
1335
- map.set(target, proxy);
1335
+ def(target, existingFlag, proxy);
1336
1336
  def(proxy, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, true);
1337
1337
  def(proxy, "__v_raw" /* ReactiveFlags.RAW */, target);
1338
1338
  if (isRef(target)) {
@@ -2738,6 +2738,109 @@ function eventsMixin(Vue) {
2738
2738
  };
2739
2739
  }
2740
2740
 
2741
+ let activeEffectScope;
2742
+ class EffectScope {
2743
+ constructor(detached = false) {
2744
+ this.detached = detached;
2745
+ /**
2746
+ * @internal
2747
+ */
2748
+ this.active = true;
2749
+ /**
2750
+ * @internal
2751
+ */
2752
+ this.effects = [];
2753
+ /**
2754
+ * @internal
2755
+ */
2756
+ this.cleanups = [];
2757
+ this.parent = activeEffectScope;
2758
+ if (!detached && activeEffectScope) {
2759
+ this.index =
2760
+ (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
2761
+ }
2762
+ }
2763
+ run(fn) {
2764
+ if (this.active) {
2765
+ const currentEffectScope = activeEffectScope;
2766
+ try {
2767
+ activeEffectScope = this;
2768
+ return fn();
2769
+ }
2770
+ finally {
2771
+ activeEffectScope = currentEffectScope;
2772
+ }
2773
+ }
2774
+ else {
2775
+ warn$2(`cannot run an inactive effect scope.`);
2776
+ }
2777
+ }
2778
+ /**
2779
+ * This should only be called on non-detached scopes
2780
+ * @internal
2781
+ */
2782
+ on() {
2783
+ activeEffectScope = this;
2784
+ }
2785
+ /**
2786
+ * This should only be called on non-detached scopes
2787
+ * @internal
2788
+ */
2789
+ off() {
2790
+ activeEffectScope = this.parent;
2791
+ }
2792
+ stop(fromParent) {
2793
+ if (this.active) {
2794
+ let i, l;
2795
+ for (i = 0, l = this.effects.length; i < l; i++) {
2796
+ this.effects[i].teardown();
2797
+ }
2798
+ for (i = 0, l = this.cleanups.length; i < l; i++) {
2799
+ this.cleanups[i]();
2800
+ }
2801
+ if (this.scopes) {
2802
+ for (i = 0, l = this.scopes.length; i < l; i++) {
2803
+ this.scopes[i].stop(true);
2804
+ }
2805
+ }
2806
+ // nested scope, dereference from parent to avoid memory leaks
2807
+ if (!this.detached && this.parent && !fromParent) {
2808
+ // optimized O(1) removal
2809
+ const last = this.parent.scopes.pop();
2810
+ if (last && last !== this) {
2811
+ this.parent.scopes[this.index] = last;
2812
+ last.index = this.index;
2813
+ }
2814
+ }
2815
+ this.parent = undefined;
2816
+ this.active = false;
2817
+ }
2818
+ }
2819
+ }
2820
+ function effectScope(detached) {
2821
+ return new EffectScope(detached);
2822
+ }
2823
+ /**
2824
+ * @internal
2825
+ */
2826
+ function recordEffectScope(effect, scope = activeEffectScope) {
2827
+ if (scope && scope.active) {
2828
+ scope.effects.push(effect);
2829
+ }
2830
+ }
2831
+ function getCurrentScope() {
2832
+ return activeEffectScope;
2833
+ }
2834
+ function onScopeDispose(fn) {
2835
+ if (activeEffectScope) {
2836
+ activeEffectScope.cleanups.push(fn);
2837
+ }
2838
+ else {
2839
+ warn$2(`onScopeDispose() is called when there is no active effect scope` +
2840
+ ` to be associated with.`);
2841
+ }
2842
+ }
2843
+
2741
2844
  let activeInstance = null;
2742
2845
  let isUpdatingChildComponent = false;
2743
2846
  function setActiveInstance(vm) {
@@ -3039,7 +3142,8 @@ function deactivateChildComponent(vm, direct) {
3039
3142
  function callHook$1(vm, hook, args, setContext = true) {
3040
3143
  // #7573 disable dep collection when invoking lifecycle hooks
3041
3144
  pushTarget();
3042
- const prev = currentInstance;
3145
+ const prevInst = currentInstance;
3146
+ const prevScope = getCurrentScope();
3043
3147
  setContext && setCurrentInstance(vm);
3044
3148
  const handlers = vm.$options[hook];
3045
3149
  const info = `${hook} hook`;
@@ -3051,7 +3155,10 @@ function callHook$1(vm, hook, args, setContext = true) {
3051
3155
  if (vm._hasHookEvent) {
3052
3156
  vm.$emit('hook:' + hook);
3053
3157
  }
3054
- setContext && setCurrentInstance(prev);
3158
+ if (setContext) {
3159
+ setCurrentInstance(prevInst);
3160
+ prevScope && prevScope.on();
3161
+ }
3055
3162
  popTarget();
3056
3163
  }
3057
3164
 
@@ -3429,109 +3536,6 @@ function doWatch(source, cb, { immediate, deep, flush = 'pre', onTrack, onTrigge
3429
3536
  };
3430
3537
  }
3431
3538
 
3432
- let activeEffectScope;
3433
- class EffectScope {
3434
- constructor(detached = false) {
3435
- this.detached = detached;
3436
- /**
3437
- * @internal
3438
- */
3439
- this.active = true;
3440
- /**
3441
- * @internal
3442
- */
3443
- this.effects = [];
3444
- /**
3445
- * @internal
3446
- */
3447
- this.cleanups = [];
3448
- this.parent = activeEffectScope;
3449
- if (!detached && activeEffectScope) {
3450
- this.index =
3451
- (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
3452
- }
3453
- }
3454
- run(fn) {
3455
- if (this.active) {
3456
- const currentEffectScope = activeEffectScope;
3457
- try {
3458
- activeEffectScope = this;
3459
- return fn();
3460
- }
3461
- finally {
3462
- activeEffectScope = currentEffectScope;
3463
- }
3464
- }
3465
- else {
3466
- warn$2(`cannot run an inactive effect scope.`);
3467
- }
3468
- }
3469
- /**
3470
- * This should only be called on non-detached scopes
3471
- * @internal
3472
- */
3473
- on() {
3474
- activeEffectScope = this;
3475
- }
3476
- /**
3477
- * This should only be called on non-detached scopes
3478
- * @internal
3479
- */
3480
- off() {
3481
- activeEffectScope = this.parent;
3482
- }
3483
- stop(fromParent) {
3484
- if (this.active) {
3485
- let i, l;
3486
- for (i = 0, l = this.effects.length; i < l; i++) {
3487
- this.effects[i].teardown();
3488
- }
3489
- for (i = 0, l = this.cleanups.length; i < l; i++) {
3490
- this.cleanups[i]();
3491
- }
3492
- if (this.scopes) {
3493
- for (i = 0, l = this.scopes.length; i < l; i++) {
3494
- this.scopes[i].stop(true);
3495
- }
3496
- }
3497
- // nested scope, dereference from parent to avoid memory leaks
3498
- if (!this.detached && this.parent && !fromParent) {
3499
- // optimized O(1) removal
3500
- const last = this.parent.scopes.pop();
3501
- if (last && last !== this) {
3502
- this.parent.scopes[this.index] = last;
3503
- last.index = this.index;
3504
- }
3505
- }
3506
- this.parent = undefined;
3507
- this.active = false;
3508
- }
3509
- }
3510
- }
3511
- function effectScope(detached) {
3512
- return new EffectScope(detached);
3513
- }
3514
- /**
3515
- * @internal
3516
- */
3517
- function recordEffectScope(effect, scope = activeEffectScope) {
3518
- if (scope && scope.active) {
3519
- scope.effects.push(effect);
3520
- }
3521
- }
3522
- function getCurrentScope() {
3523
- return activeEffectScope;
3524
- }
3525
- function onScopeDispose(fn) {
3526
- if (activeEffectScope) {
3527
- activeEffectScope.cleanups.push(fn);
3528
- }
3529
- else {
3530
- warn$2(`onScopeDispose() is called when there is no active effect scope` +
3531
- ` to be associated with.`);
3532
- }
3533
- }
3534
-
3535
3539
  function provide(key, value) {
3536
3540
  if (!currentInstance) {
3537
3541
  {
@@ -3824,7 +3828,7 @@ function defineAsyncComponent(source) {
3824
3828
  suspensible = false, // in Vue 3 default is true
3825
3829
  onError: userOnError } = source;
3826
3830
  if (suspensible) {
3827
- warn$2(`The suspensiblbe option for async components is not supported in Vue2. It is ignored.`);
3831
+ warn$2(`The suspensible option for async components is not supported in Vue2. It is ignored.`);
3828
3832
  }
3829
3833
  let pendingRequest = null;
3830
3834
  let retries = 0;
@@ -3925,7 +3929,7 @@ function onErrorCaptured(hook, target = currentInstance) {
3925
3929
  /**
3926
3930
  * Note: also update dist/vue.runtime.mjs when adding new exports to this file.
3927
3931
  */
3928
- const version = '2.7.13';
3932
+ const version = '2.7.15';
3929
3933
  /**
3930
3934
  * @internal type is manually declared in <root>/types/v3-define-component.d.ts
3931
3935
  */
@@ -5055,7 +5059,7 @@ const strats = config.optionMergeStrategies;
5055
5059
  /**
5056
5060
  * Helper that recursively merges two data objects together.
5057
5061
  */
5058
- function mergeData(to, from) {
5062
+ function mergeData(to, from, recursive = true) {
5059
5063
  if (!from)
5060
5064
  return to;
5061
5065
  let key, toVal, fromVal;
@@ -5069,7 +5073,7 @@ function mergeData(to, from) {
5069
5073
  continue;
5070
5074
  toVal = to[key];
5071
5075
  fromVal = from[key];
5072
- if (!hasOwn(to, key)) {
5076
+ if (!recursive || !hasOwn(to, key)) {
5073
5077
  set(to, key, fromVal);
5074
5078
  }
5075
5079
  else if (toVal !== fromVal &&
@@ -5229,7 +5233,19 @@ strats.props =
5229
5233
  extend(ret, childVal);
5230
5234
  return ret;
5231
5235
  };
5232
- strats.provide = mergeDataOrFn;
5236
+ strats.provide = function (parentVal, childVal) {
5237
+ if (!parentVal)
5238
+ return childVal;
5239
+ return function () {
5240
+ const ret = Object.create(null);
5241
+ mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);
5242
+ if (childVal) {
5243
+ mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive
5244
+ );
5245
+ }
5246
+ return ret;
5247
+ };
5248
+ };
5233
5249
  /**
5234
5250
  * Default strategy.
5235
5251
  */
@@ -6105,7 +6121,7 @@ function isUnknownElement(tag) {
6105
6121
  }
6106
6122
  const el = document.createElement(tag);
6107
6123
  if (tag.indexOf('-') > -1) {
6108
- // http://stackoverflow.com/a/28210364/1070244
6124
+ // https://stackoverflow.com/a/28210364/1070244
6109
6125
  return (unknownElementCache[tag] =
6110
6126
  el.constructor === window.HTMLUnknownElement ||
6111
6127
  el.constructor === window.HTMLElement);
@@ -6979,8 +6995,11 @@ function createPatchFunction(backend) {
6979
6995
  const insert = ancestor.data.hook.insert;
6980
6996
  if (insert.merged) {
6981
6997
  // start at index 1 to avoid re-invoking component mounted hook
6982
- for (let i = 1; i < insert.fns.length; i++) {
6983
- insert.fns[i]();
6998
+ // clone insert hooks to avoid being mutated during iteration.
6999
+ // e.g. for customed directives under transition group.
7000
+ const cloned = insert.fns.slice(1);
7001
+ for (let i = 0; i < cloned.length; i++) {
7002
+ cloned[i]();
6984
7003
  }
6985
7004
  }
6986
7005
  }
@@ -9361,7 +9380,7 @@ function parseHTML(html, options) {
9361
9380
  continue;
9362
9381
  }
9363
9382
  }
9364
- // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
9383
+ // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
9365
9384
  if (conditionalComment.test(html)) {
9366
9385
  const conditionalEnd = html.indexOf(']>');
9367
9386
  if (conditionalEnd >= 0) {
@@ -10954,7 +10973,7 @@ function genFor(el, state, altGen, altHelper) {
10954
10973
  !el.key) {
10955
10974
  state.warn(`<${el.tag} v-for="${alias} in ${exp}">: component lists rendered with ` +
10956
10975
  `v-for should have explicit keys. ` +
10957
- `See https://vuejs.org/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);
10976
+ `See https://v2.vuejs.org/v2/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);
10958
10977
  }
10959
10978
  el.forProcessed = true; // avoid recursion
10960
10979
  return (`${altHelper || '_l'}((${exp}),` +