@vue/compat 3.5.0-beta.1 → 3.5.0-beta.2

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.0-beta.1
2
+ * @vue/compat v3.5.0-beta.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -465,11 +465,11 @@ class ReactiveEffect {
465
465
  }
466
466
  }
467
467
  pause() {
468
- this.flags |= 128;
468
+ this.flags |= 64;
469
469
  }
470
470
  resume() {
471
- if (this.flags & 128) {
472
- this.flags &= ~128;
471
+ if (this.flags & 64) {
472
+ this.flags &= ~64;
473
473
  if (pausedQueueEffects.has(this)) {
474
474
  pausedQueueEffects.delete(this);
475
475
  this.trigger();
@@ -483,9 +483,6 @@ class ReactiveEffect {
483
483
  if (this.flags & 2 && !(this.flags & 32)) {
484
484
  return;
485
485
  }
486
- if (this.flags & 64) {
487
- return this.trigger();
488
- }
489
486
  if (!(this.flags & 8)) {
490
487
  this.flags |= 8;
491
488
  this.nextEffect = batchedEffect;
@@ -529,7 +526,7 @@ class ReactiveEffect {
529
526
  }
530
527
  }
531
528
  trigger() {
532
- if (this.flags & 128) {
529
+ if (this.flags & 64) {
533
530
  pausedQueueEffects.add(this);
534
531
  } else if (this.scheduler) {
535
532
  this.scheduler();
@@ -559,6 +556,7 @@ function endBatch() {
559
556
  batchDepth--;
560
557
  return;
561
558
  }
559
+ batchDepth--;
562
560
  let error;
563
561
  while (batchedEffect) {
564
562
  let e = batchedEffect;
@@ -577,7 +575,6 @@ function endBatch() {
577
575
  e = next;
578
576
  }
579
577
  }
580
- batchDepth--;
581
578
  if (error) throw error;
582
579
  }
583
580
  function prepareDeps(sub) {
@@ -984,26 +981,26 @@ const arrayInstrumentations = {
984
981
  });
985
982
  },
986
983
  every(fn, thisArg) {
987
- return apply(this, "every", fn, thisArg);
984
+ return apply(this, "every", fn, thisArg, void 0, arguments);
988
985
  },
989
986
  filter(fn, thisArg) {
990
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
987
+ return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
991
988
  },
992
989
  find(fn, thisArg) {
993
- return apply(this, "find", fn, thisArg, toReactive);
990
+ return apply(this, "find", fn, thisArg, toReactive, arguments);
994
991
  },
995
992
  findIndex(fn, thisArg) {
996
- return apply(this, "findIndex", fn, thisArg);
993
+ return apply(this, "findIndex", fn, thisArg, void 0, arguments);
997
994
  },
998
995
  findLast(fn, thisArg) {
999
- return apply(this, "findLast", fn, thisArg, toReactive);
996
+ return apply(this, "findLast", fn, thisArg, toReactive, arguments);
1000
997
  },
1001
998
  findLastIndex(fn, thisArg) {
1002
- return apply(this, "findLastIndex", fn, thisArg);
999
+ return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
1003
1000
  },
1004
1001
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
1005
1002
  forEach(fn, thisArg) {
1006
- return apply(this, "forEach", fn, thisArg);
1003
+ return apply(this, "forEach", fn, thisArg, void 0, arguments);
1007
1004
  },
1008
1005
  includes(...args) {
1009
1006
  return searchProxy(this, "includes", args);
@@ -1019,7 +1016,7 @@ const arrayInstrumentations = {
1019
1016
  return searchProxy(this, "lastIndexOf", args);
1020
1017
  },
1021
1018
  map(fn, thisArg) {
1022
- return apply(this, "map", fn, thisArg);
1019
+ return apply(this, "map", fn, thisArg, void 0, arguments);
1023
1020
  },
1024
1021
  pop() {
1025
1022
  return noTracking(this, "pop");
@@ -1038,7 +1035,7 @@ const arrayInstrumentations = {
1038
1035
  },
1039
1036
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
1040
1037
  some(fn, thisArg) {
1041
- return apply(this, "some", fn, thisArg);
1038
+ return apply(this, "some", fn, thisArg, void 0, arguments);
1042
1039
  },
1043
1040
  splice(...args) {
1044
1041
  return noTracking(this, "splice", args);
@@ -1074,8 +1071,13 @@ function iterator(self, method, wrapValue) {
1074
1071
  }
1075
1072
  return iter;
1076
1073
  }
1077
- function apply(self, method, fn, thisArg, wrappedRetFn) {
1074
+ const arrayProto = Array.prototype;
1075
+ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1078
1076
  const arr = shallowReadArray(self);
1077
+ let methodFn;
1078
+ if ((methodFn = arr[method]) !== arrayProto[method]) {
1079
+ return methodFn.apply(arr, args);
1080
+ }
1079
1081
  let needsWrap = false;
1080
1082
  let wrappedFn = fn;
1081
1083
  if (arr !== self) {
@@ -1090,7 +1092,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn) {
1090
1092
  };
1091
1093
  }
1092
1094
  }
1093
- const result = arr[method](wrappedFn, thisArg);
1095
+ const result = methodFn.call(arr, wrappedFn, thisArg);
1094
1096
  return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
1095
1097
  }
1096
1098
  function reduce(self, method, fn, args) {
@@ -4041,6 +4043,7 @@ const logMismatchError = () => {
4041
4043
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
4042
4044
  const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
4043
4045
  const getContainerType = (container) => {
4046
+ if (container.nodeType !== 1) return void 0;
4044
4047
  if (isSVGContainer(container)) return "svg";
4045
4048
  if (isMathMLContainer(container)) return "mathml";
4046
4049
  return void 0;
@@ -4980,7 +4983,7 @@ const KeepAliveImpl = {
4980
4983
  function pruneCache(filter) {
4981
4984
  cache.forEach((vnode, key) => {
4982
4985
  const name = getComponentName(vnode.type);
4983
- if (name && (!filter || !filter(name))) {
4986
+ if (name && !filter(name)) {
4984
4987
  pruneCacheEntry(key);
4985
4988
  }
4986
4989
  });
@@ -5102,6 +5105,7 @@ function matches(pattern, name) {
5102
5105
  } else if (isString(pattern)) {
5103
5106
  return pattern.split(",").includes(name);
5104
5107
  } else if (isRegExp(pattern)) {
5108
+ pattern.lastIndex = 0;
5105
5109
  return pattern.test(name);
5106
5110
  }
5107
5111
  return false;
@@ -6788,7 +6792,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6788
6792
  return vm;
6789
6793
  }
6790
6794
  }
6791
- Vue.version = `2.6.14-compat:${"3.5.0-beta.1"}`;
6795
+ Vue.version = `2.6.14-compat:${"3.5.0-beta.2"}`;
6792
6796
  Vue.config = singletonApp.config;
6793
6797
  Vue.use = (plugin, ...options) => {
6794
6798
  if (plugin && isFunction(plugin.install)) {
@@ -9780,7 +9784,6 @@ function doWatch(source, cb, {
9780
9784
  const effect = new ReactiveEffect(getter);
9781
9785
  let scheduler;
9782
9786
  if (flush === "sync") {
9783
- effect.flags |= 64;
9784
9787
  scheduler = job;
9785
9788
  } else if (flush === "post") {
9786
9789
  scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
@@ -12146,7 +12149,7 @@ function isMemoSame(cached, memo) {
12146
12149
  return true;
12147
12150
  }
12148
12151
 
12149
- const version = "3.5.0-beta.1";
12152
+ const version = "3.5.0-beta.2";
12150
12153
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12151
12154
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12152
12155
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -13103,7 +13106,6 @@ class VueElement extends BaseClass {
13103
13106
  this._ob = null;
13104
13107
  if (this.shadowRoot && _createApp !== createApp) {
13105
13108
  this._root = this.shadowRoot;
13106
- this._mount(_def);
13107
13109
  } else {
13108
13110
  if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) {
13109
13111
  warn(
@@ -13116,9 +13118,9 @@ class VueElement extends BaseClass {
13116
13118
  } else {
13117
13119
  this._root = this;
13118
13120
  }
13119
- if (!this._def.__asyncLoader) {
13120
- this._resolveProps(this._def);
13121
- }
13121
+ }
13122
+ if (!this._def.__asyncLoader) {
13123
+ this._resolveProps(this._def);
13122
13124
  }
13123
13125
  }
13124
13126
  connectedCallback() {
@@ -13318,6 +13320,7 @@ class VueElement extends BaseClass {
13318
13320
  vnode.ce = (instance) => {
13319
13321
  this._instance = instance;
13320
13322
  instance.ce = this;
13323
+ instance.isCE = true;
13321
13324
  if (!!(process.env.NODE_ENV !== "production")) {
13322
13325
  instance.ceReload = (newStyles) => {
13323
13326
  if (this._styles) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.0-beta.1
2
+ * @vue/compat v3.5.0-beta.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -468,11 +468,11 @@ var Vue = (function () {
468
468
  }
469
469
  }
470
470
  pause() {
471
- this.flags |= 128;
471
+ this.flags |= 64;
472
472
  }
473
473
  resume() {
474
- if (this.flags & 128) {
475
- this.flags &= ~128;
474
+ if (this.flags & 64) {
475
+ this.flags &= ~64;
476
476
  if (pausedQueueEffects.has(this)) {
477
477
  pausedQueueEffects.delete(this);
478
478
  this.trigger();
@@ -486,9 +486,6 @@ var Vue = (function () {
486
486
  if (this.flags & 2 && !(this.flags & 32)) {
487
487
  return;
488
488
  }
489
- if (this.flags & 64) {
490
- return this.trigger();
491
- }
492
489
  if (!(this.flags & 8)) {
493
490
  this.flags |= 8;
494
491
  this.nextEffect = batchedEffect;
@@ -532,7 +529,7 @@ var Vue = (function () {
532
529
  }
533
530
  }
534
531
  trigger() {
535
- if (this.flags & 128) {
532
+ if (this.flags & 64) {
536
533
  pausedQueueEffects.add(this);
537
534
  } else if (this.scheduler) {
538
535
  this.scheduler();
@@ -562,6 +559,7 @@ var Vue = (function () {
562
559
  batchDepth--;
563
560
  return;
564
561
  }
562
+ batchDepth--;
565
563
  let error;
566
564
  while (batchedEffect) {
567
565
  let e = batchedEffect;
@@ -580,7 +578,6 @@ var Vue = (function () {
580
578
  e = next;
581
579
  }
582
580
  }
583
- batchDepth--;
584
581
  if (error) throw error;
585
582
  }
586
583
  function prepareDeps(sub) {
@@ -983,26 +980,26 @@ var Vue = (function () {
983
980
  });
984
981
  },
985
982
  every(fn, thisArg) {
986
- return apply(this, "every", fn, thisArg);
983
+ return apply(this, "every", fn, thisArg, void 0, arguments);
987
984
  },
988
985
  filter(fn, thisArg) {
989
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
986
+ return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
990
987
  },
991
988
  find(fn, thisArg) {
992
- return apply(this, "find", fn, thisArg, toReactive);
989
+ return apply(this, "find", fn, thisArg, toReactive, arguments);
993
990
  },
994
991
  findIndex(fn, thisArg) {
995
- return apply(this, "findIndex", fn, thisArg);
992
+ return apply(this, "findIndex", fn, thisArg, void 0, arguments);
996
993
  },
997
994
  findLast(fn, thisArg) {
998
- return apply(this, "findLast", fn, thisArg, toReactive);
995
+ return apply(this, "findLast", fn, thisArg, toReactive, arguments);
999
996
  },
1000
997
  findLastIndex(fn, thisArg) {
1001
- return apply(this, "findLastIndex", fn, thisArg);
998
+ return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
1002
999
  },
1003
1000
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
1004
1001
  forEach(fn, thisArg) {
1005
- return apply(this, "forEach", fn, thisArg);
1002
+ return apply(this, "forEach", fn, thisArg, void 0, arguments);
1006
1003
  },
1007
1004
  includes(...args) {
1008
1005
  return searchProxy(this, "includes", args);
@@ -1018,7 +1015,7 @@ var Vue = (function () {
1018
1015
  return searchProxy(this, "lastIndexOf", args);
1019
1016
  },
1020
1017
  map(fn, thisArg) {
1021
- return apply(this, "map", fn, thisArg);
1018
+ return apply(this, "map", fn, thisArg, void 0, arguments);
1022
1019
  },
1023
1020
  pop() {
1024
1021
  return noTracking(this, "pop");
@@ -1037,7 +1034,7 @@ var Vue = (function () {
1037
1034
  },
1038
1035
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
1039
1036
  some(fn, thisArg) {
1040
- return apply(this, "some", fn, thisArg);
1037
+ return apply(this, "some", fn, thisArg, void 0, arguments);
1041
1038
  },
1042
1039
  splice(...args) {
1043
1040
  return noTracking(this, "splice", args);
@@ -1073,8 +1070,13 @@ var Vue = (function () {
1073
1070
  }
1074
1071
  return iter;
1075
1072
  }
1076
- function apply(self, method, fn, thisArg, wrappedRetFn) {
1073
+ const arrayProto = Array.prototype;
1074
+ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1077
1075
  const arr = shallowReadArray(self);
1076
+ let methodFn;
1077
+ if ((methodFn = arr[method]) !== arrayProto[method]) {
1078
+ return methodFn.apply(arr, args);
1079
+ }
1078
1080
  let needsWrap = false;
1079
1081
  let wrappedFn = fn;
1080
1082
  if (arr !== self) {
@@ -1089,7 +1091,7 @@ var Vue = (function () {
1089
1091
  };
1090
1092
  }
1091
1093
  }
1092
- const result = arr[method](wrappedFn, thisArg);
1094
+ const result = methodFn.call(arr, wrappedFn, thisArg);
1093
1095
  return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
1094
1096
  }
1095
1097
  function reduce(self, method, fn, args) {
@@ -4025,6 +4027,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4025
4027
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
4026
4028
  const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
4027
4029
  const getContainerType = (container) => {
4030
+ if (container.nodeType !== 1) return void 0;
4028
4031
  if (isSVGContainer(container)) return "svg";
4029
4032
  if (isMathMLContainer(container)) return "mathml";
4030
4033
  return void 0;
@@ -4947,7 +4950,7 @@ Server rendered element contains fewer child nodes than client vdom.`
4947
4950
  function pruneCache(filter) {
4948
4951
  cache.forEach((vnode, key) => {
4949
4952
  const name = getComponentName(vnode.type);
4950
- if (name && (!filter || !filter(name))) {
4953
+ if (name && !filter(name)) {
4951
4954
  pruneCacheEntry(key);
4952
4955
  }
4953
4956
  });
@@ -5069,6 +5072,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5069
5072
  } else if (isString(pattern)) {
5070
5073
  return pattern.split(",").includes(name);
5071
5074
  } else if (isRegExp(pattern)) {
5075
+ pattern.lastIndex = 0;
5072
5076
  return pattern.test(name);
5073
5077
  }
5074
5078
  return false;
@@ -6750,7 +6754,7 @@ If this is a native custom element, make sure to exclude it from component resol
6750
6754
  return vm;
6751
6755
  }
6752
6756
  }
6753
- Vue.version = `2.6.14-compat:${"3.5.0-beta.1"}`;
6757
+ Vue.version = `2.6.14-compat:${"3.5.0-beta.2"}`;
6754
6758
  Vue.config = singletonApp.config;
6755
6759
  Vue.use = (plugin, ...options) => {
6756
6760
  if (plugin && isFunction(plugin.install)) {
@@ -9672,7 +9676,6 @@ If you want to remount the same app, move your app creation logic into a factory
9672
9676
  const effect = new ReactiveEffect(getter);
9673
9677
  let scheduler;
9674
9678
  if (flush === "sync") {
9675
- effect.flags |= 64;
9676
9679
  scheduler = job;
9677
9680
  } else if (flush === "post") {
9678
9681
  scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
@@ -12009,7 +12012,7 @@ Component that was made reactive: `,
12009
12012
  return true;
12010
12013
  }
12011
12014
 
12012
- const version = "3.5.0-beta.1";
12015
+ const version = "3.5.0-beta.2";
12013
12016
  const warn = warn$1 ;
12014
12017
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12015
12018
  const devtools = devtools$1 ;
@@ -12949,7 +12952,6 @@ Expected function or array of functions, received type ${typeof value}.`
12949
12952
  this._ob = null;
12950
12953
  if (this.shadowRoot && _createApp !== createApp) {
12951
12954
  this._root = this.shadowRoot;
12952
- this._mount(_def);
12953
12955
  } else {
12954
12956
  if (this.shadowRoot) {
12955
12957
  warn(
@@ -12962,9 +12964,9 @@ Expected function or array of functions, received type ${typeof value}.`
12962
12964
  } else {
12963
12965
  this._root = this;
12964
12966
  }
12965
- if (!this._def.__asyncLoader) {
12966
- this._resolveProps(this._def);
12967
- }
12967
+ }
12968
+ if (!this._def.__asyncLoader) {
12969
+ this._resolveProps(this._def);
12968
12970
  }
12969
12971
  }
12970
12972
  connectedCallback() {
@@ -13164,6 +13166,7 @@ Expected function or array of functions, received type ${typeof value}.`
13164
13166
  vnode.ce = (instance) => {
13165
13167
  this._instance = instance;
13166
13168
  instance.ce = this;
13169
+ instance.isCE = true;
13167
13170
  {
13168
13171
  instance.ceReload = (newStyles) => {
13169
13172
  if (this._styles) {