@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.
- package/dist/vue.cjs.js +57 -36
- package/dist/vue.cjs.prod.js +57 -36
- package/dist/vue.esm-browser.js +40 -34
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +40 -34
- package/dist/vue.global.js +40 -34
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +31 -28
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +31 -28
- package/dist/vue.runtime.global.js +31 -28
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.0-beta.
|
|
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
|
**/
|
|
@@ -532,11 +532,11 @@ class ReactiveEffect {
|
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
pause() {
|
|
535
|
-
this.flags |=
|
|
535
|
+
this.flags |= 64;
|
|
536
536
|
}
|
|
537
537
|
resume() {
|
|
538
|
-
if (this.flags &
|
|
539
|
-
this.flags &= ~
|
|
538
|
+
if (this.flags & 64) {
|
|
539
|
+
this.flags &= ~64;
|
|
540
540
|
if (pausedQueueEffects.has(this)) {
|
|
541
541
|
pausedQueueEffects.delete(this);
|
|
542
542
|
this.trigger();
|
|
@@ -550,9 +550,6 @@ class ReactiveEffect {
|
|
|
550
550
|
if (this.flags & 2 && !(this.flags & 32)) {
|
|
551
551
|
return;
|
|
552
552
|
}
|
|
553
|
-
if (this.flags & 64) {
|
|
554
|
-
return this.trigger();
|
|
555
|
-
}
|
|
556
553
|
if (!(this.flags & 8)) {
|
|
557
554
|
this.flags |= 8;
|
|
558
555
|
this.nextEffect = batchedEffect;
|
|
@@ -596,7 +593,7 @@ class ReactiveEffect {
|
|
|
596
593
|
}
|
|
597
594
|
}
|
|
598
595
|
trigger() {
|
|
599
|
-
if (this.flags &
|
|
596
|
+
if (this.flags & 64) {
|
|
600
597
|
pausedQueueEffects.add(this);
|
|
601
598
|
} else if (this.scheduler) {
|
|
602
599
|
this.scheduler();
|
|
@@ -626,6 +623,7 @@ function endBatch() {
|
|
|
626
623
|
batchDepth--;
|
|
627
624
|
return;
|
|
628
625
|
}
|
|
626
|
+
batchDepth--;
|
|
629
627
|
let error;
|
|
630
628
|
while (batchedEffect) {
|
|
631
629
|
let e = batchedEffect;
|
|
@@ -644,7 +642,6 @@ function endBatch() {
|
|
|
644
642
|
e = next;
|
|
645
643
|
}
|
|
646
644
|
}
|
|
647
|
-
batchDepth--;
|
|
648
645
|
if (error) throw error;
|
|
649
646
|
}
|
|
650
647
|
function prepareDeps(sub) {
|
|
@@ -1047,26 +1044,26 @@ const arrayInstrumentations = {
|
|
|
1047
1044
|
});
|
|
1048
1045
|
},
|
|
1049
1046
|
every(fn, thisArg) {
|
|
1050
|
-
return apply(this, "every", fn, thisArg);
|
|
1047
|
+
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
1051
1048
|
},
|
|
1052
1049
|
filter(fn, thisArg) {
|
|
1053
|
-
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
|
|
1050
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
1054
1051
|
},
|
|
1055
1052
|
find(fn, thisArg) {
|
|
1056
|
-
return apply(this, "find", fn, thisArg, toReactive);
|
|
1053
|
+
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
1057
1054
|
},
|
|
1058
1055
|
findIndex(fn, thisArg) {
|
|
1059
|
-
return apply(this, "findIndex", fn, thisArg);
|
|
1056
|
+
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1060
1057
|
},
|
|
1061
1058
|
findLast(fn, thisArg) {
|
|
1062
|
-
return apply(this, "findLast", fn, thisArg, toReactive);
|
|
1059
|
+
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
1063
1060
|
},
|
|
1064
1061
|
findLastIndex(fn, thisArg) {
|
|
1065
|
-
return apply(this, "findLastIndex", fn, thisArg);
|
|
1062
|
+
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
1066
1063
|
},
|
|
1067
1064
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
1068
1065
|
forEach(fn, thisArg) {
|
|
1069
|
-
return apply(this, "forEach", fn, thisArg);
|
|
1066
|
+
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
1070
1067
|
},
|
|
1071
1068
|
includes(...args) {
|
|
1072
1069
|
return searchProxy(this, "includes", args);
|
|
@@ -1082,7 +1079,7 @@ const arrayInstrumentations = {
|
|
|
1082
1079
|
return searchProxy(this, "lastIndexOf", args);
|
|
1083
1080
|
},
|
|
1084
1081
|
map(fn, thisArg) {
|
|
1085
|
-
return apply(this, "map", fn, thisArg);
|
|
1082
|
+
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
1086
1083
|
},
|
|
1087
1084
|
pop() {
|
|
1088
1085
|
return noTracking(this, "pop");
|
|
@@ -1101,7 +1098,7 @@ const arrayInstrumentations = {
|
|
|
1101
1098
|
},
|
|
1102
1099
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
1103
1100
|
some(fn, thisArg) {
|
|
1104
|
-
return apply(this, "some", fn, thisArg);
|
|
1101
|
+
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
1105
1102
|
},
|
|
1106
1103
|
splice(...args) {
|
|
1107
1104
|
return noTracking(this, "splice", args);
|
|
@@ -1137,8 +1134,13 @@ function iterator(self, method, wrapValue) {
|
|
|
1137
1134
|
}
|
|
1138
1135
|
return iter;
|
|
1139
1136
|
}
|
|
1140
|
-
|
|
1137
|
+
const arrayProto = Array.prototype;
|
|
1138
|
+
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1141
1139
|
const arr = shallowReadArray(self);
|
|
1140
|
+
let methodFn;
|
|
1141
|
+
if ((methodFn = arr[method]) !== arrayProto[method]) {
|
|
1142
|
+
return methodFn.apply(arr, args);
|
|
1143
|
+
}
|
|
1142
1144
|
let needsWrap = false;
|
|
1143
1145
|
let wrappedFn = fn;
|
|
1144
1146
|
if (arr !== self) {
|
|
@@ -1153,7 +1155,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn) {
|
|
|
1153
1155
|
};
|
|
1154
1156
|
}
|
|
1155
1157
|
}
|
|
1156
|
-
const result = arr
|
|
1158
|
+
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
1157
1159
|
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
1158
1160
|
}
|
|
1159
1161
|
function reduce(self, method, fn, args) {
|
|
@@ -4089,6 +4091,7 @@ const logMismatchError = () => {
|
|
|
4089
4091
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
4090
4092
|
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
4091
4093
|
const getContainerType = (container) => {
|
|
4094
|
+
if (container.nodeType !== 1) return void 0;
|
|
4092
4095
|
if (isSVGContainer(container)) return "svg";
|
|
4093
4096
|
if (isMathMLContainer(container)) return "mathml";
|
|
4094
4097
|
return void 0;
|
|
@@ -5017,7 +5020,7 @@ const KeepAliveImpl = {
|
|
|
5017
5020
|
function pruneCache(filter) {
|
|
5018
5021
|
cache.forEach((vnode, key) => {
|
|
5019
5022
|
const name = getComponentName(vnode.type);
|
|
5020
|
-
if (name &&
|
|
5023
|
+
if (name && !filter(name)) {
|
|
5021
5024
|
pruneCacheEntry(key);
|
|
5022
5025
|
}
|
|
5023
5026
|
});
|
|
@@ -5139,6 +5142,7 @@ function matches(pattern, name) {
|
|
|
5139
5142
|
} else if (isString(pattern)) {
|
|
5140
5143
|
return pattern.split(",").includes(name);
|
|
5141
5144
|
} else if (isRegExp(pattern)) {
|
|
5145
|
+
pattern.lastIndex = 0;
|
|
5142
5146
|
return pattern.test(name);
|
|
5143
5147
|
}
|
|
5144
5148
|
return false;
|
|
@@ -6823,7 +6827,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6823
6827
|
return vm;
|
|
6824
6828
|
}
|
|
6825
6829
|
}
|
|
6826
|
-
Vue.version = `2.6.14-compat:${"3.5.0-beta.
|
|
6830
|
+
Vue.version = `2.6.14-compat:${"3.5.0-beta.2"}`;
|
|
6827
6831
|
Vue.config = singletonApp.config;
|
|
6828
6832
|
Vue.use = (plugin, ...options) => {
|
|
6829
6833
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -9775,7 +9779,6 @@ function doWatch(source, cb, {
|
|
|
9775
9779
|
const effect = new ReactiveEffect(getter);
|
|
9776
9780
|
let scheduler;
|
|
9777
9781
|
if (flush === "sync") {
|
|
9778
|
-
effect.flags |= 64;
|
|
9779
9782
|
scheduler = job;
|
|
9780
9783
|
} else if (flush === "post") {
|
|
9781
9784
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
@@ -12127,7 +12130,7 @@ function isMemoSame(cached, memo) {
|
|
|
12127
12130
|
return true;
|
|
12128
12131
|
}
|
|
12129
12132
|
|
|
12130
|
-
const version = "3.5.0-beta.
|
|
12133
|
+
const version = "3.5.0-beta.2";
|
|
12131
12134
|
const warn = warn$1 ;
|
|
12132
12135
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12133
12136
|
const devtools = devtools$1 ;
|
|
@@ -13084,7 +13087,6 @@ class VueElement extends BaseClass {
|
|
|
13084
13087
|
this._ob = null;
|
|
13085
13088
|
if (this.shadowRoot && _createApp !== createApp) {
|
|
13086
13089
|
this._root = this.shadowRoot;
|
|
13087
|
-
this._mount(_def);
|
|
13088
13090
|
} else {
|
|
13089
13091
|
if (this.shadowRoot) {
|
|
13090
13092
|
warn(
|
|
@@ -13097,9 +13099,9 @@ class VueElement extends BaseClass {
|
|
|
13097
13099
|
} else {
|
|
13098
13100
|
this._root = this;
|
|
13099
13101
|
}
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13102
|
+
}
|
|
13103
|
+
if (!this._def.__asyncLoader) {
|
|
13104
|
+
this._resolveProps(this._def);
|
|
13103
13105
|
}
|
|
13104
13106
|
}
|
|
13105
13107
|
connectedCallback() {
|
|
@@ -13299,6 +13301,7 @@ class VueElement extends BaseClass {
|
|
|
13299
13301
|
vnode.ce = (instance) => {
|
|
13300
13302
|
this._instance = instance;
|
|
13301
13303
|
instance.ce = this;
|
|
13304
|
+
instance.isCE = true;
|
|
13302
13305
|
{
|
|
13303
13306
|
instance.ceReload = (newStyles) => {
|
|
13304
13307
|
if (this._styles) {
|
|
@@ -15549,8 +15552,9 @@ const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
|
15549
15552
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
15550
15553
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
15551
15554
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
15552
|
-
const
|
|
15553
|
-
|
|
15555
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
15556
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
15557
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
15554
15558
|
let state = 0 /* inMemberExp */;
|
|
15555
15559
|
let stateStack = [];
|
|
15556
15560
|
let currentOpenBracketCount = 0;
|
|
@@ -15612,6 +15616,9 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
15612
15616
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
15613
15617
|
};
|
|
15614
15618
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
15619
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
15620
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
15621
|
+
const isFnExpression = isFnExpressionBrowser ;
|
|
15615
15622
|
function assert(condition, msg) {
|
|
15616
15623
|
if (!condition) {
|
|
15617
15624
|
throw new Error(msg || `unexpected compiler condition`);
|
|
@@ -19106,7 +19113,6 @@ function processSlotOutlet(node, context) {
|
|
|
19106
19113
|
};
|
|
19107
19114
|
}
|
|
19108
19115
|
|
|
19109
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
19110
19116
|
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
19111
19117
|
const { loc, modifiers, arg } = dir;
|
|
19112
19118
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -19150,8 +19156,8 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
19150
19156
|
}
|
|
19151
19157
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
19152
19158
|
if (exp) {
|
|
19153
|
-
const isMemberExp = isMemberExpression(exp
|
|
19154
|
-
const isInlineStatement = !(isMemberExp ||
|
|
19159
|
+
const isMemberExp = isMemberExpression(exp);
|
|
19160
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp));
|
|
19155
19161
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
19156
19162
|
{
|
|
19157
19163
|
validateBrowserExpression(
|
|
@@ -19299,7 +19305,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
19299
19305
|
return createTransformProps();
|
|
19300
19306
|
}
|
|
19301
19307
|
const maybeRef = false;
|
|
19302
|
-
if (!expString.trim() || !isMemberExpression(
|
|
19308
|
+
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
19303
19309
|
context.onError(
|
|
19304
19310
|
createCompilerError(42, exp.loc)
|
|
19305
19311
|
);
|