vue 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 +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +39 -33
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +39 -33
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +30 -27
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +30 -27
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.0-beta.
|
|
2
|
+
* vue 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) {
|
|
@@ -3558,6 +3560,7 @@ const logMismatchError = () => {
|
|
|
3558
3560
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
3559
3561
|
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
3560
3562
|
const getContainerType = (container) => {
|
|
3563
|
+
if (container.nodeType !== 1) return void 0;
|
|
3561
3564
|
if (isSVGContainer(container)) return "svg";
|
|
3562
3565
|
if (isMathMLContainer(container)) return "mathml";
|
|
3563
3566
|
return void 0;
|
|
@@ -4486,7 +4489,7 @@ const KeepAliveImpl = {
|
|
|
4486
4489
|
function pruneCache(filter) {
|
|
4487
4490
|
cache.forEach((vnode, key) => {
|
|
4488
4491
|
const name = getComponentName(vnode.type);
|
|
4489
|
-
if (name &&
|
|
4492
|
+
if (name && !filter(name)) {
|
|
4490
4493
|
pruneCacheEntry(key);
|
|
4491
4494
|
}
|
|
4492
4495
|
});
|
|
@@ -4605,6 +4608,7 @@ function matches(pattern, name) {
|
|
|
4605
4608
|
} else if (isString(pattern)) {
|
|
4606
4609
|
return pattern.split(",").includes(name);
|
|
4607
4610
|
} else if (isRegExp(pattern)) {
|
|
4611
|
+
pattern.lastIndex = 0;
|
|
4608
4612
|
return pattern.test(name);
|
|
4609
4613
|
}
|
|
4610
4614
|
return false;
|
|
@@ -8127,7 +8131,6 @@ function doWatch(source, cb, {
|
|
|
8127
8131
|
const effect = new ReactiveEffect(getter);
|
|
8128
8132
|
let scheduler;
|
|
8129
8133
|
if (flush === "sync") {
|
|
8130
|
-
effect.flags |= 64;
|
|
8131
8134
|
scheduler = job;
|
|
8132
8135
|
} else if (flush === "post") {
|
|
8133
8136
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
@@ -10372,7 +10375,7 @@ function isMemoSame(cached, memo) {
|
|
|
10372
10375
|
return true;
|
|
10373
10376
|
}
|
|
10374
10377
|
|
|
10375
|
-
const version = "3.5.0-beta.
|
|
10378
|
+
const version = "3.5.0-beta.2";
|
|
10376
10379
|
const warn = warn$1 ;
|
|
10377
10380
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10378
10381
|
const devtools = devtools$1 ;
|
|
@@ -11241,7 +11244,6 @@ class VueElement extends BaseClass {
|
|
|
11241
11244
|
this._ob = null;
|
|
11242
11245
|
if (this.shadowRoot && _createApp !== createApp) {
|
|
11243
11246
|
this._root = this.shadowRoot;
|
|
11244
|
-
this._mount(_def);
|
|
11245
11247
|
} else {
|
|
11246
11248
|
if (this.shadowRoot) {
|
|
11247
11249
|
warn(
|
|
@@ -11254,9 +11256,9 @@ class VueElement extends BaseClass {
|
|
|
11254
11256
|
} else {
|
|
11255
11257
|
this._root = this;
|
|
11256
11258
|
}
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11259
|
+
}
|
|
11260
|
+
if (!this._def.__asyncLoader) {
|
|
11261
|
+
this._resolveProps(this._def);
|
|
11260
11262
|
}
|
|
11261
11263
|
}
|
|
11262
11264
|
connectedCallback() {
|
|
@@ -11456,6 +11458,7 @@ class VueElement extends BaseClass {
|
|
|
11456
11458
|
vnode.ce = (instance) => {
|
|
11457
11459
|
this._instance = instance;
|
|
11458
11460
|
instance.ce = this;
|
|
11461
|
+
instance.isCE = true;
|
|
11459
11462
|
{
|
|
11460
11463
|
instance.ceReload = (newStyles) => {
|
|
11461
11464
|
if (this._styles) {
|
|
@@ -13562,8 +13565,9 @@ const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
|
13562
13565
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
13563
13566
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
13564
13567
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
13565
|
-
const
|
|
13566
|
-
|
|
13568
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
13569
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
13570
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
13567
13571
|
let state = 0 /* inMemberExp */;
|
|
13568
13572
|
let stateStack = [];
|
|
13569
13573
|
let currentOpenBracketCount = 0;
|
|
@@ -13625,6 +13629,9 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
13625
13629
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
13626
13630
|
};
|
|
13627
13631
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
13632
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
13633
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
13634
|
+
const isFnExpression = isFnExpressionBrowser ;
|
|
13628
13635
|
function assert(condition, msg) {
|
|
13629
13636
|
if (!condition) {
|
|
13630
13637
|
throw new Error(msg || `unexpected compiler condition`);
|
|
@@ -16982,7 +16989,6 @@ function processSlotOutlet(node, context) {
|
|
|
16982
16989
|
};
|
|
16983
16990
|
}
|
|
16984
16991
|
|
|
16985
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
16986
16992
|
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
16987
16993
|
const { loc, modifiers, arg } = dir;
|
|
16988
16994
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -17026,8 +17032,8 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
17026
17032
|
}
|
|
17027
17033
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
17028
17034
|
if (exp) {
|
|
17029
|
-
const isMemberExp = isMemberExpression(exp
|
|
17030
|
-
const isInlineStatement = !(isMemberExp ||
|
|
17035
|
+
const isMemberExp = isMemberExpression(exp);
|
|
17036
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp));
|
|
17031
17037
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
17032
17038
|
{
|
|
17033
17039
|
validateBrowserExpression(
|
|
@@ -17175,7 +17181,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
17175
17181
|
return createTransformProps();
|
|
17176
17182
|
}
|
|
17177
17183
|
const maybeRef = false;
|
|
17178
|
-
if (!expString.trim() || !isMemberExpression(
|
|
17184
|
+
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
17179
17185
|
context.onError(
|
|
17180
17186
|
createCompilerError(42, exp.loc)
|
|
17181
17187
|
);
|