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
  'use strict';
@@ -242,9 +242,7 @@ const identity = (_) => _;
242
242
  */
243
243
  function genStaticKeys$1(modules) {
244
244
  return modules
245
- .reduce((keys, m) => {
246
- return keys.concat(m.staticKeys || []);
247
- }, [])
245
+ .reduce((keys, m) => keys.concat(m.staticKeys || []), [])
248
246
  .join(',');
249
247
  }
250
248
  /**
@@ -838,79 +836,8 @@ methodsToPatch.forEach(function (method) {
838
836
  });
839
837
  });
840
838
 
841
- const rawMap = new WeakMap();
842
- function reactive(target) {
843
- makeReactive(target, false);
844
- return target;
845
- }
846
- /**
847
- * Return a shallowly-reactive copy of the original object, where only the root
848
- * level properties are reactive. It also does not auto-unwrap refs (even at the
849
- * root level).
850
- */
851
- function shallowReactive(target) {
852
- makeReactive(target, true);
853
- def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
854
- return target;
855
- }
856
- function makeReactive(target, shallow) {
857
- // if trying to observe a readonly proxy, return the readonly version.
858
- if (!isReadonly(target)) {
859
- {
860
- if (isArray(target)) {
861
- 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.`);
862
- }
863
- const existingOb = target && target.__ob__;
864
- if (existingOb && existingOb.shallow !== shallow) {
865
- warn$2(`Target is already a ${existingOb.shallow ? `` : `non-`}shallow reactive object, and cannot be converted to ${shallow ? `` : `non-`}shallow.`);
866
- }
867
- }
868
- const ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
869
- if (!ob) {
870
- if (target == null || isPrimitive(target)) {
871
- warn$2(`value cannot be made reactive: ${String(target)}`);
872
- }
873
- if (isCollectionType(target)) {
874
- warn$2(`Vue 2 does not support reactive collection types such as Map or Set.`);
875
- }
876
- }
877
- }
878
- }
879
- function isReactive(value) {
880
- if (isReadonly(value)) {
881
- return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
882
- }
883
- return !!(value && value.__ob__);
884
- }
885
- function isShallow(value) {
886
- return !!(value && value.__v_isShallow);
887
- }
888
- function isReadonly(value) {
889
- return !!(value && value.__v_isReadonly);
890
- }
891
- function isProxy(value) {
892
- return isReactive(value) || isReadonly(value);
893
- }
894
- function toRaw(observed) {
895
- const raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
896
- return raw ? toRaw(raw) : observed;
897
- }
898
- function markRaw(value) {
899
- if (isObject(value)) {
900
- rawMap.set(value, true);
901
- }
902
- return value;
903
- }
904
- /**
905
- * @internal
906
- */
907
- function isCollectionType(value) {
908
- const type = toRawType(value);
909
- return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
910
- }
911
-
912
839
  const arrayKeys = Object.getOwnPropertyNames(arrayMethods);
913
- const NO_INIITIAL_VALUE = {};
840
+ const NO_INITIAL_VALUE = {};
914
841
  /**
915
842
  * In some cases we may want to disable observation inside a component's
916
843
  * update computation.
@@ -967,7 +894,7 @@ class Observer {
967
894
  const keys = Object.keys(value);
968
895
  for (let i = 0; i < keys.length; i++) {
969
896
  const key = keys[i];
970
- defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock);
897
+ defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);
971
898
  }
972
899
  }
973
900
  }
@@ -995,7 +922,6 @@ function observe(value, shallow, ssrMockReactivity) {
995
922
  (isArray(value) || isPlainObject(value)) &&
996
923
  Object.isExtensible(value) &&
997
924
  !value.__v_skip /* ReactiveFlags.SKIP */ &&
998
- !rawMap.has(value) &&
999
925
  !isRef(value) &&
1000
926
  !(value instanceof VNode)) {
1001
927
  return new Observer(value, shallow, ssrMockReactivity);
@@ -1014,7 +940,7 @@ function defineReactive(obj, key, val, customSetter, shallow, mock) {
1014
940
  const getter = property && property.get;
1015
941
  const setter = property && property.set;
1016
942
  if ((!getter || setter) &&
1017
- (val === NO_INIITIAL_VALUE || arguments.length === 2)) {
943
+ (val === NO_INITIAL_VALUE || arguments.length === 2)) {
1018
944
  val = obj[key];
1019
945
  }
1020
946
  let childOb = !shallow && observe(val, false, mock);
@@ -1168,6 +1094,77 @@ function dependArray(value) {
1168
1094
  }
1169
1095
  }
1170
1096
 
1097
+ function reactive(target) {
1098
+ makeReactive(target, false);
1099
+ return target;
1100
+ }
1101
+ /**
1102
+ * Return a shallowly-reactive copy of the original object, where only the root
1103
+ * level properties are reactive. It also does not auto-unwrap refs (even at the
1104
+ * root level).
1105
+ */
1106
+ function shallowReactive(target) {
1107
+ makeReactive(target, true);
1108
+ def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
1109
+ return target;
1110
+ }
1111
+ function makeReactive(target, shallow) {
1112
+ // if trying to observe a readonly proxy, return the readonly version.
1113
+ if (!isReadonly(target)) {
1114
+ {
1115
+ if (isArray(target)) {
1116
+ 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.`);
1117
+ }
1118
+ const existingOb = target && target.__ob__;
1119
+ if (existingOb && existingOb.shallow !== shallow) {
1120
+ warn$2(`Target is already a ${existingOb.shallow ? `` : `non-`}shallow reactive object, and cannot be converted to ${shallow ? `` : `non-`}shallow.`);
1121
+ }
1122
+ }
1123
+ const ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
1124
+ if (!ob) {
1125
+ if (target == null || isPrimitive(target)) {
1126
+ warn$2(`value cannot be made reactive: ${String(target)}`);
1127
+ }
1128
+ if (isCollectionType(target)) {
1129
+ warn$2(`Vue 2 does not support reactive collection types such as Map or Set.`);
1130
+ }
1131
+ }
1132
+ }
1133
+ }
1134
+ function isReactive(value) {
1135
+ if (isReadonly(value)) {
1136
+ return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
1137
+ }
1138
+ return !!(value && value.__ob__);
1139
+ }
1140
+ function isShallow(value) {
1141
+ return !!(value && value.__v_isShallow);
1142
+ }
1143
+ function isReadonly(value) {
1144
+ return !!(value && value.__v_isReadonly);
1145
+ }
1146
+ function isProxy(value) {
1147
+ return isReactive(value) || isReadonly(value);
1148
+ }
1149
+ function toRaw(observed) {
1150
+ const raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
1151
+ return raw ? toRaw(raw) : observed;
1152
+ }
1153
+ function markRaw(value) {
1154
+ // non-extensible objects won't be observed anyway
1155
+ if (Object.isExtensible(value)) {
1156
+ def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
1157
+ }
1158
+ return value;
1159
+ }
1160
+ /**
1161
+ * @internal
1162
+ */
1163
+ function isCollectionType(value) {
1164
+ const type = toRawType(value);
1165
+ return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
1166
+ }
1167
+
1171
1168
  /**
1172
1169
  * @internal
1173
1170
  */
@@ -1303,8 +1300,8 @@ function toRef(object, key, defaultValue) {
1303
1300
  return ref;
1304
1301
  }
1305
1302
 
1306
- const rawToReadonlyMap = new WeakMap();
1307
- const rawToShallowReadonlyMap = new WeakMap();
1303
+ const rawToReadonlyFlag = `__v_rawToReadonly`;
1304
+ const rawToShallowReadonlyFlag = `__v_rawToShallowReadonly`;
1308
1305
  function readonly(target) {
1309
1306
  return createReadonly(target, false);
1310
1307
  }
@@ -1323,18 +1320,21 @@ function createReadonly(target, shallow) {
1323
1320
  }
1324
1321
  return target;
1325
1322
  }
1323
+ if (!Object.isExtensible(target)) {
1324
+ warn$2(`Vue 2 does not support creating readonly proxy for non-extensible object.`);
1325
+ }
1326
1326
  // already a readonly object
1327
1327
  if (isReadonly(target)) {
1328
1328
  return target;
1329
1329
  }
1330
1330
  // already has a readonly proxy
1331
- const map = shallow ? rawToShallowReadonlyMap : rawToReadonlyMap;
1332
- const existingProxy = map.get(target);
1331
+ const existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;
1332
+ const existingProxy = target[existingFlag];
1333
1333
  if (existingProxy) {
1334
1334
  return existingProxy;
1335
1335
  }
1336
1336
  const proxy = Object.create(Object.getPrototypeOf(target));
1337
- map.set(target, proxy);
1337
+ def(target, existingFlag, proxy);
1338
1338
  def(proxy, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, true);
1339
1339
  def(proxy, "__v_raw" /* ReactiveFlags.RAW */, target);
1340
1340
  if (isRef(target)) {
@@ -2740,6 +2740,109 @@ function eventsMixin(Vue) {
2740
2740
  };
2741
2741
  }
2742
2742
 
2743
+ let activeEffectScope;
2744
+ class EffectScope {
2745
+ constructor(detached = false) {
2746
+ this.detached = detached;
2747
+ /**
2748
+ * @internal
2749
+ */
2750
+ this.active = true;
2751
+ /**
2752
+ * @internal
2753
+ */
2754
+ this.effects = [];
2755
+ /**
2756
+ * @internal
2757
+ */
2758
+ this.cleanups = [];
2759
+ this.parent = activeEffectScope;
2760
+ if (!detached && activeEffectScope) {
2761
+ this.index =
2762
+ (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
2763
+ }
2764
+ }
2765
+ run(fn) {
2766
+ if (this.active) {
2767
+ const currentEffectScope = activeEffectScope;
2768
+ try {
2769
+ activeEffectScope = this;
2770
+ return fn();
2771
+ }
2772
+ finally {
2773
+ activeEffectScope = currentEffectScope;
2774
+ }
2775
+ }
2776
+ else {
2777
+ warn$2(`cannot run an inactive effect scope.`);
2778
+ }
2779
+ }
2780
+ /**
2781
+ * This should only be called on non-detached scopes
2782
+ * @internal
2783
+ */
2784
+ on() {
2785
+ activeEffectScope = this;
2786
+ }
2787
+ /**
2788
+ * This should only be called on non-detached scopes
2789
+ * @internal
2790
+ */
2791
+ off() {
2792
+ activeEffectScope = this.parent;
2793
+ }
2794
+ stop(fromParent) {
2795
+ if (this.active) {
2796
+ let i, l;
2797
+ for (i = 0, l = this.effects.length; i < l; i++) {
2798
+ this.effects[i].teardown();
2799
+ }
2800
+ for (i = 0, l = this.cleanups.length; i < l; i++) {
2801
+ this.cleanups[i]();
2802
+ }
2803
+ if (this.scopes) {
2804
+ for (i = 0, l = this.scopes.length; i < l; i++) {
2805
+ this.scopes[i].stop(true);
2806
+ }
2807
+ }
2808
+ // nested scope, dereference from parent to avoid memory leaks
2809
+ if (!this.detached && this.parent && !fromParent) {
2810
+ // optimized O(1) removal
2811
+ const last = this.parent.scopes.pop();
2812
+ if (last && last !== this) {
2813
+ this.parent.scopes[this.index] = last;
2814
+ last.index = this.index;
2815
+ }
2816
+ }
2817
+ this.parent = undefined;
2818
+ this.active = false;
2819
+ }
2820
+ }
2821
+ }
2822
+ function effectScope(detached) {
2823
+ return new EffectScope(detached);
2824
+ }
2825
+ /**
2826
+ * @internal
2827
+ */
2828
+ function recordEffectScope(effect, scope = activeEffectScope) {
2829
+ if (scope && scope.active) {
2830
+ scope.effects.push(effect);
2831
+ }
2832
+ }
2833
+ function getCurrentScope() {
2834
+ return activeEffectScope;
2835
+ }
2836
+ function onScopeDispose(fn) {
2837
+ if (activeEffectScope) {
2838
+ activeEffectScope.cleanups.push(fn);
2839
+ }
2840
+ else {
2841
+ warn$2(`onScopeDispose() is called when there is no active effect scope` +
2842
+ ` to be associated with.`);
2843
+ }
2844
+ }
2845
+
2743
2846
  let activeInstance = null;
2744
2847
  let isUpdatingChildComponent = false;
2745
2848
  function setActiveInstance(vm) {
@@ -3041,7 +3144,8 @@ function deactivateChildComponent(vm, direct) {
3041
3144
  function callHook$1(vm, hook, args, setContext = true) {
3042
3145
  // #7573 disable dep collection when invoking lifecycle hooks
3043
3146
  pushTarget();
3044
- const prev = currentInstance;
3147
+ const prevInst = currentInstance;
3148
+ const prevScope = getCurrentScope();
3045
3149
  setContext && setCurrentInstance(vm);
3046
3150
  const handlers = vm.$options[hook];
3047
3151
  const info = `${hook} hook`;
@@ -3053,7 +3157,10 @@ function callHook$1(vm, hook, args, setContext = true) {
3053
3157
  if (vm._hasHookEvent) {
3054
3158
  vm.$emit('hook:' + hook);
3055
3159
  }
3056
- setContext && setCurrentInstance(prev);
3160
+ if (setContext) {
3161
+ setCurrentInstance(prevInst);
3162
+ prevScope && prevScope.on();
3163
+ }
3057
3164
  popTarget();
3058
3165
  }
3059
3166
 
@@ -3431,109 +3538,6 @@ function doWatch(source, cb, { immediate, deep, flush = 'pre', onTrack, onTrigge
3431
3538
  };
3432
3539
  }
3433
3540
 
3434
- let activeEffectScope;
3435
- class EffectScope {
3436
- constructor(detached = false) {
3437
- this.detached = detached;
3438
- /**
3439
- * @internal
3440
- */
3441
- this.active = true;
3442
- /**
3443
- * @internal
3444
- */
3445
- this.effects = [];
3446
- /**
3447
- * @internal
3448
- */
3449
- this.cleanups = [];
3450
- this.parent = activeEffectScope;
3451
- if (!detached && activeEffectScope) {
3452
- this.index =
3453
- (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
3454
- }
3455
- }
3456
- run(fn) {
3457
- if (this.active) {
3458
- const currentEffectScope = activeEffectScope;
3459
- try {
3460
- activeEffectScope = this;
3461
- return fn();
3462
- }
3463
- finally {
3464
- activeEffectScope = currentEffectScope;
3465
- }
3466
- }
3467
- else {
3468
- warn$2(`cannot run an inactive effect scope.`);
3469
- }
3470
- }
3471
- /**
3472
- * This should only be called on non-detached scopes
3473
- * @internal
3474
- */
3475
- on() {
3476
- activeEffectScope = this;
3477
- }
3478
- /**
3479
- * This should only be called on non-detached scopes
3480
- * @internal
3481
- */
3482
- off() {
3483
- activeEffectScope = this.parent;
3484
- }
3485
- stop(fromParent) {
3486
- if (this.active) {
3487
- let i, l;
3488
- for (i = 0, l = this.effects.length; i < l; i++) {
3489
- this.effects[i].teardown();
3490
- }
3491
- for (i = 0, l = this.cleanups.length; i < l; i++) {
3492
- this.cleanups[i]();
3493
- }
3494
- if (this.scopes) {
3495
- for (i = 0, l = this.scopes.length; i < l; i++) {
3496
- this.scopes[i].stop(true);
3497
- }
3498
- }
3499
- // nested scope, dereference from parent to avoid memory leaks
3500
- if (!this.detached && this.parent && !fromParent) {
3501
- // optimized O(1) removal
3502
- const last = this.parent.scopes.pop();
3503
- if (last && last !== this) {
3504
- this.parent.scopes[this.index] = last;
3505
- last.index = this.index;
3506
- }
3507
- }
3508
- this.parent = undefined;
3509
- this.active = false;
3510
- }
3511
- }
3512
- }
3513
- function effectScope(detached) {
3514
- return new EffectScope(detached);
3515
- }
3516
- /**
3517
- * @internal
3518
- */
3519
- function recordEffectScope(effect, scope = activeEffectScope) {
3520
- if (scope && scope.active) {
3521
- scope.effects.push(effect);
3522
- }
3523
- }
3524
- function getCurrentScope() {
3525
- return activeEffectScope;
3526
- }
3527
- function onScopeDispose(fn) {
3528
- if (activeEffectScope) {
3529
- activeEffectScope.cleanups.push(fn);
3530
- }
3531
- else {
3532
- warn$2(`onScopeDispose() is called when there is no active effect scope` +
3533
- ` to be associated with.`);
3534
- }
3535
- }
3536
-
3537
3541
  function provide(key, value) {
3538
3542
  if (!currentInstance) {
3539
3543
  {
@@ -3832,7 +3836,7 @@ function defineAsyncComponent(source) {
3832
3836
  suspensible = false, // in Vue 3 default is true
3833
3837
  onError: userOnError } = source;
3834
3838
  if (suspensible) {
3835
- warn$2(`The suspensiblbe option for async components is not supported in Vue2. It is ignored.`);
3839
+ warn$2(`The suspensible option for async components is not supported in Vue2. It is ignored.`);
3836
3840
  }
3837
3841
  let pendingRequest = null;
3838
3842
  let retries = 0;
@@ -3933,7 +3937,7 @@ function onErrorCaptured(hook, target = currentInstance) {
3933
3937
  /**
3934
3938
  * Note: also update dist/vue.runtime.mjs when adding new exports to this file.
3935
3939
  */
3936
- const version = '2.7.13';
3940
+ const version = '2.7.15';
3937
3941
  /**
3938
3942
  * @internal type is manually declared in <root>/types/v3-define-component.d.ts
3939
3943
  */
@@ -5123,7 +5127,7 @@ const strats = config.optionMergeStrategies;
5123
5127
  /**
5124
5128
  * Helper that recursively merges two data objects together.
5125
5129
  */
5126
- function mergeData(to, from) {
5130
+ function mergeData(to, from, recursive = true) {
5127
5131
  if (!from)
5128
5132
  return to;
5129
5133
  let key, toVal, fromVal;
@@ -5137,7 +5141,7 @@ function mergeData(to, from) {
5137
5141
  continue;
5138
5142
  toVal = to[key];
5139
5143
  fromVal = from[key];
5140
- if (!hasOwn(to, key)) {
5144
+ if (!recursive || !hasOwn(to, key)) {
5141
5145
  set(to, key, fromVal);
5142
5146
  }
5143
5147
  else if (toVal !== fromVal &&
@@ -5297,7 +5301,19 @@ strats.props =
5297
5301
  extend(ret, childVal);
5298
5302
  return ret;
5299
5303
  };
5300
- strats.provide = mergeDataOrFn;
5304
+ strats.provide = function (parentVal, childVal) {
5305
+ if (!parentVal)
5306
+ return childVal;
5307
+ return function () {
5308
+ const ret = Object.create(null);
5309
+ mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);
5310
+ if (childVal) {
5311
+ mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive
5312
+ );
5313
+ }
5314
+ return ret;
5315
+ };
5316
+ };
5301
5317
  /**
5302
5318
  * Default strategy.
5303
5319
  */
@@ -6173,7 +6189,7 @@ function isUnknownElement(tag) {
6173
6189
  }
6174
6190
  const el = document.createElement(tag);
6175
6191
  if (tag.indexOf('-') > -1) {
6176
- // http://stackoverflow.com/a/28210364/1070244
6192
+ // https://stackoverflow.com/a/28210364/1070244
6177
6193
  return (unknownElementCache[tag] =
6178
6194
  el.constructor === window.HTMLUnknownElement ||
6179
6195
  el.constructor === window.HTMLElement);
@@ -7047,8 +7063,11 @@ function createPatchFunction(backend) {
7047
7063
  const insert = ancestor.data.hook.insert;
7048
7064
  if (insert.merged) {
7049
7065
  // start at index 1 to avoid re-invoking component mounted hook
7050
- for (let i = 1; i < insert.fns.length; i++) {
7051
- insert.fns[i]();
7066
+ // clone insert hooks to avoid being mutated during iteration.
7067
+ // e.g. for customed directives under transition group.
7068
+ const cloned = insert.fns.slice(1);
7069
+ for (let i = 0; i < cloned.length; i++) {
7070
+ cloned[i]();
7052
7071
  }
7053
7072
  }
7054
7073
  }
@@ -9429,7 +9448,7 @@ function parseHTML(html, options) {
9429
9448
  continue;
9430
9449
  }
9431
9450
  }
9432
- // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
9451
+ // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
9433
9452
  if (conditionalComment.test(html)) {
9434
9453
  const conditionalEnd = html.indexOf(']>');
9435
9454
  if (conditionalEnd >= 0) {
@@ -11022,7 +11041,7 @@ function genFor(el, state, altGen, altHelper) {
11022
11041
  !el.key) {
11023
11042
  state.warn(`<${el.tag} v-for="${alias} in ${exp}">: component lists rendered with ` +
11024
11043
  `v-for should have explicit keys. ` +
11025
- `See https://vuejs.org/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);
11044
+ `See https://v2.vuejs.org/v2/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);
11026
11045
  }
11027
11046
  el.forProcessed = true; // avoid recursion
11028
11047
  return (`${altHelper || '_l'}((${exp}),` +