@vue/compat 3.5.2 → 3.5.4
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 +60 -66
- package/dist/vue.cjs.prod.js +45 -39
- package/dist/vue.esm-browser.js +60 -66
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +62 -68
- package/dist/vue.global.js +57 -65
- package/dist/vue.global.prod.js +2 -2
- package/dist/vue.runtime.esm-browser.js +57 -56
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +59 -58
- package/dist/vue.runtime.global.js +54 -55
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
7
|
// @__NO_SIDE_EFFECTS__
|
|
8
|
-
function makeMap(str
|
|
9
|
-
const
|
|
10
|
-
|
|
8
|
+
function makeMap(str) {
|
|
9
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
10
|
+
for (const key of str.split(",")) map[key] = 1;
|
|
11
|
+
return (val) => val in map;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const EMPTY_OBJ = Object.freeze({}) ;
|
|
@@ -611,7 +612,7 @@ function cleanupDeps(sub) {
|
|
|
611
612
|
}
|
|
612
613
|
function isDirty(sub) {
|
|
613
614
|
for (let link = sub.deps; link; link = link.nextDep) {
|
|
614
|
-
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed)
|
|
615
|
+
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
|
|
615
616
|
return true;
|
|
616
617
|
}
|
|
617
618
|
}
|
|
@@ -887,9 +888,23 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
887
888
|
globalVersion++;
|
|
888
889
|
return;
|
|
889
890
|
}
|
|
890
|
-
|
|
891
|
+
const run = (dep) => {
|
|
892
|
+
if (dep) {
|
|
893
|
+
{
|
|
894
|
+
dep.trigger({
|
|
895
|
+
target,
|
|
896
|
+
type,
|
|
897
|
+
key,
|
|
898
|
+
newValue,
|
|
899
|
+
oldValue,
|
|
900
|
+
oldTarget
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
startBatch();
|
|
891
906
|
if (type === "clear") {
|
|
892
|
-
|
|
907
|
+
depsMap.forEach(run);
|
|
893
908
|
} else {
|
|
894
909
|
const targetIsArray = isArray(target);
|
|
895
910
|
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
@@ -897,57 +912,43 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
897
912
|
const newLength = Number(newValue);
|
|
898
913
|
depsMap.forEach((dep, key2) => {
|
|
899
914
|
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
|
|
900
|
-
|
|
915
|
+
run(dep);
|
|
901
916
|
}
|
|
902
917
|
});
|
|
903
918
|
} else {
|
|
904
|
-
const push = (dep) => dep && deps.push(dep);
|
|
905
919
|
if (key !== void 0) {
|
|
906
|
-
|
|
920
|
+
run(depsMap.get(key));
|
|
907
921
|
}
|
|
908
922
|
if (isArrayIndex) {
|
|
909
|
-
|
|
923
|
+
run(depsMap.get(ARRAY_ITERATE_KEY));
|
|
910
924
|
}
|
|
911
925
|
switch (type) {
|
|
912
926
|
case "add":
|
|
913
927
|
if (!targetIsArray) {
|
|
914
|
-
|
|
928
|
+
run(depsMap.get(ITERATE_KEY));
|
|
915
929
|
if (isMap(target)) {
|
|
916
|
-
|
|
930
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
917
931
|
}
|
|
918
932
|
} else if (isArrayIndex) {
|
|
919
|
-
|
|
933
|
+
run(depsMap.get("length"));
|
|
920
934
|
}
|
|
921
935
|
break;
|
|
922
936
|
case "delete":
|
|
923
937
|
if (!targetIsArray) {
|
|
924
|
-
|
|
938
|
+
run(depsMap.get(ITERATE_KEY));
|
|
925
939
|
if (isMap(target)) {
|
|
926
|
-
|
|
940
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
927
941
|
}
|
|
928
942
|
}
|
|
929
943
|
break;
|
|
930
944
|
case "set":
|
|
931
945
|
if (isMap(target)) {
|
|
932
|
-
|
|
946
|
+
run(depsMap.get(ITERATE_KEY));
|
|
933
947
|
}
|
|
934
948
|
break;
|
|
935
949
|
}
|
|
936
950
|
}
|
|
937
951
|
}
|
|
938
|
-
startBatch();
|
|
939
|
-
for (const dep of deps) {
|
|
940
|
-
{
|
|
941
|
-
dep.trigger({
|
|
942
|
-
target,
|
|
943
|
-
type,
|
|
944
|
-
key,
|
|
945
|
-
newValue,
|
|
946
|
-
oldValue,
|
|
947
|
-
oldTarget
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
952
|
endBatch();
|
|
952
953
|
}
|
|
953
954
|
function getDepFromReactive(object, key) {
|
|
@@ -1685,7 +1686,7 @@ function toRaw(observed) {
|
|
|
1685
1686
|
return raw ? toRaw(raw) : observed;
|
|
1686
1687
|
}
|
|
1687
1688
|
function markRaw(value) {
|
|
1688
|
-
if (Object.isExtensible(value)) {
|
|
1689
|
+
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
|
|
1689
1690
|
def(value, "__v_skip", true);
|
|
1690
1691
|
}
|
|
1691
1692
|
return value;
|
|
@@ -2584,23 +2585,19 @@ function flushJobs(seen) {
|
|
|
2584
2585
|
}
|
|
2585
2586
|
}
|
|
2586
2587
|
function checkRecursiveUpdates(seen, fn) {
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
const
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
10
|
|
2598
|
-
);
|
|
2599
|
-
return true;
|
|
2600
|
-
} else {
|
|
2601
|
-
seen.set(fn, count + 1);
|
|
2602
|
-
}
|
|
2588
|
+
const count = seen.get(fn) || 0;
|
|
2589
|
+
if (count > RECURSION_LIMIT) {
|
|
2590
|
+
const instance = fn.i;
|
|
2591
|
+
const componentName = instance && getComponentName(instance.type);
|
|
2592
|
+
handleError(
|
|
2593
|
+
`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
2594
|
+
null,
|
|
2595
|
+
10
|
|
2596
|
+
);
|
|
2597
|
+
return true;
|
|
2603
2598
|
}
|
|
2599
|
+
seen.set(fn, count + 1);
|
|
2600
|
+
return false;
|
|
2604
2601
|
}
|
|
2605
2602
|
|
|
2606
2603
|
let isHmrUpdating = false;
|
|
@@ -4083,6 +4080,7 @@ function getInnerChild$1(vnode) {
|
|
|
4083
4080
|
}
|
|
4084
4081
|
function setTransitionHooks(vnode, hooks) {
|
|
4085
4082
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4083
|
+
vnode.transition = hooks;
|
|
4086
4084
|
setTransitionHooks(vnode.component.subTree, hooks);
|
|
4087
4085
|
} else if (vnode.shapeFlag & 128) {
|
|
4088
4086
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
@@ -4127,7 +4125,7 @@ function defineComponent(options, extraOptions) {
|
|
|
4127
4125
|
function useId() {
|
|
4128
4126
|
const i = getCurrentInstance();
|
|
4129
4127
|
if (i) {
|
|
4130
|
-
return (i.appContext.config.idPrefix || "v") + "
|
|
4128
|
+
return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
|
|
4131
4129
|
} else {
|
|
4132
4130
|
warn$1(
|
|
4133
4131
|
`useId() is called when there is no active component instance to be associated with.`
|
|
@@ -5775,13 +5773,15 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5775
5773
|
const sourceIsArray = isArray(source);
|
|
5776
5774
|
if (sourceIsArray || isString(source)) {
|
|
5777
5775
|
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
5776
|
+
let needsWrap = false;
|
|
5778
5777
|
if (sourceIsReactiveArray) {
|
|
5778
|
+
needsWrap = !isShallow(source);
|
|
5779
5779
|
source = shallowReadArray(source);
|
|
5780
5780
|
}
|
|
5781
5781
|
ret = new Array(source.length);
|
|
5782
5782
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
5783
5783
|
ret[i] = renderItem(
|
|
5784
|
-
|
|
5784
|
+
needsWrap ? toReactive(source[i]) : source[i],
|
|
5785
5785
|
i,
|
|
5786
5786
|
void 0,
|
|
5787
5787
|
cached && cached[i]
|
|
@@ -7032,7 +7032,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7032
7032
|
return vm;
|
|
7033
7033
|
}
|
|
7034
7034
|
}
|
|
7035
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7035
|
+
Vue.version = `2.6.14-compat:${"3.5.4"}`;
|
|
7036
7036
|
Vue.config = singletonApp.config;
|
|
7037
7037
|
Vue.use = (plugin, ...options) => {
|
|
7038
7038
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8937,7 +8937,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8937
8937
|
endMeasure(instance, `hydrate`);
|
|
8938
8938
|
}
|
|
8939
8939
|
};
|
|
8940
|
-
if (isAsyncWrapperVNode) {
|
|
8940
|
+
if (isAsyncWrapperVNode && type.__asyncHydrate) {
|
|
8941
8941
|
type.__asyncHydrate(
|
|
8942
8942
|
el,
|
|
8943
8943
|
instance,
|
|
@@ -10145,8 +10145,7 @@ function renderComponentRoot(instance) {
|
|
|
10145
10145
|
data,
|
|
10146
10146
|
setupState,
|
|
10147
10147
|
ctx,
|
|
10148
|
-
inheritAttrs
|
|
10149
|
-
isMounted
|
|
10148
|
+
inheritAttrs
|
|
10150
10149
|
} = instance;
|
|
10151
10150
|
const prev = setCurrentRenderingInstance(instance);
|
|
10152
10151
|
let result;
|
|
@@ -10287,7 +10286,7 @@ function renderComponentRoot(instance) {
|
|
|
10287
10286
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
10288
10287
|
);
|
|
10289
10288
|
}
|
|
10290
|
-
root
|
|
10289
|
+
setTransitionHooks(root, vnode.transition);
|
|
10291
10290
|
}
|
|
10292
10291
|
if (setRoot) {
|
|
10293
10292
|
setRoot(root);
|
|
@@ -12146,7 +12145,7 @@ function isMemoSame(cached, memo) {
|
|
|
12146
12145
|
return true;
|
|
12147
12146
|
}
|
|
12148
12147
|
|
|
12149
|
-
const version = "3.5.
|
|
12148
|
+
const version = "3.5.4";
|
|
12150
12149
|
const warn = warn$1 ;
|
|
12151
12150
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12152
12151
|
const devtools = devtools$1 ;
|
|
@@ -12159,7 +12158,9 @@ const _ssrUtils = {
|
|
|
12159
12158
|
isVNode: isVNode,
|
|
12160
12159
|
normalizeVNode,
|
|
12161
12160
|
getComponentPublicInstance,
|
|
12162
|
-
ensureValidVNode
|
|
12161
|
+
ensureValidVNode,
|
|
12162
|
+
pushWarningContext,
|
|
12163
|
+
popWarningContext
|
|
12163
12164
|
};
|
|
12164
12165
|
const ssrUtils = _ssrUtils ;
|
|
12165
12166
|
const resolveFilter = resolveFilter$1 ;
|