@vue/compat 3.4.35 → 3.4.37
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/README.md +80 -80
- package/dist/vue.cjs.js +45 -23
- package/dist/vue.cjs.prod.js +43 -21
- package/dist/vue.esm-browser.js +21 -14
- package/dist/vue.esm-browser.prod.js +2 -2
- package/dist/vue.esm-bundler.js +23 -15
- package/dist/vue.global.js +21 -14
- package/dist/vue.global.prod.js +2 -2
- package/dist/vue.runtime.esm-browser.js +20 -13
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +22 -14
- package/dist/vue.runtime.global.js +20 -13
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -750,7 +750,7 @@ class BaseReactiveHandler {
|
|
|
750
750
|
return isShallow2;
|
|
751
751
|
} else if (key === "__v_raw") {
|
|
752
752
|
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
753
|
-
// this means the
|
|
753
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
754
754
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
755
755
|
return target;
|
|
756
756
|
}
|
|
@@ -3413,7 +3413,7 @@ const KeepAliveImpl = {
|
|
|
3413
3413
|
}
|
|
3414
3414
|
function pruneCacheEntry(key) {
|
|
3415
3415
|
const cached = cache.get(key);
|
|
3416
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
3416
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
3417
3417
|
unmount(cached);
|
|
3418
3418
|
} else if (current) {
|
|
3419
3419
|
resetShapeFlag(current);
|
|
@@ -3475,6 +3475,10 @@ const KeepAliveImpl = {
|
|
|
3475
3475
|
return rawVNode;
|
|
3476
3476
|
}
|
|
3477
3477
|
let vnode = getInnerChild(rawVNode);
|
|
3478
|
+
if (vnode.type === Comment) {
|
|
3479
|
+
current = null;
|
|
3480
|
+
return vnode;
|
|
3481
|
+
}
|
|
3478
3482
|
const comp = vnode.type;
|
|
3479
3483
|
const name = getComponentName(
|
|
3480
3484
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -5194,7 +5198,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5194
5198
|
return vm;
|
|
5195
5199
|
}
|
|
5196
5200
|
}
|
|
5197
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
5201
|
+
Vue.version = `2.6.14-compat:${"3.4.37"}`;
|
|
5198
5202
|
Vue.config = singletonApp.config;
|
|
5199
5203
|
Vue.use = (plugin, ...options) => {
|
|
5200
5204
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -5772,7 +5776,7 @@ function provide(key, value) {
|
|
|
5772
5776
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
5773
5777
|
const instance = currentInstance || currentRenderingInstance;
|
|
5774
5778
|
if (instance || currentApp) {
|
|
5775
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
5779
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
5776
5780
|
if (provides && key in provides) {
|
|
5777
5781
|
return provides[key];
|
|
5778
5782
|
} else if (arguments.length > 1) {
|
|
@@ -7038,6 +7042,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
7038
7042
|
}
|
|
7039
7043
|
if (props) {
|
|
7040
7044
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7045
|
+
const isCustomElement = el.tagName.includes("-");
|
|
7041
7046
|
for (const key in props) {
|
|
7042
7047
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
|
|
7043
7048
|
// as it could have mutated the DOM in any possible way
|
|
@@ -7045,7 +7050,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
7045
7050
|
logMismatchError();
|
|
7046
7051
|
}
|
|
7047
7052
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7048
|
-
key[0] === ".") {
|
|
7053
|
+
key[0] === "." || isCustomElement) {
|
|
7049
7054
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
7050
7055
|
}
|
|
7051
7056
|
}
|
|
@@ -8826,13 +8831,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8826
8831
|
namespace
|
|
8827
8832
|
);
|
|
8828
8833
|
}
|
|
8834
|
+
container._vnode = vnode;
|
|
8829
8835
|
if (!isFlushing) {
|
|
8830
8836
|
isFlushing = true;
|
|
8831
8837
|
flushPreFlushCbs();
|
|
8832
8838
|
flushPostFlushCbs();
|
|
8833
8839
|
isFlushing = false;
|
|
8834
8840
|
}
|
|
8835
|
-
container._vnode = vnode;
|
|
8836
8841
|
};
|
|
8837
8842
|
const internals = {
|
|
8838
8843
|
p: patch,
|
|
@@ -9270,7 +9275,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9270
9275
|
return options.get ? options.get(localValue) : localValue;
|
|
9271
9276
|
},
|
|
9272
9277
|
set(value) {
|
|
9273
|
-
|
|
9278
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
9279
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
9274
9280
|
return;
|
|
9275
9281
|
}
|
|
9276
9282
|
const rawProps = i.vnode.props;
|
|
@@ -9279,7 +9285,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9279
9285
|
localValue = value;
|
|
9280
9286
|
trigger();
|
|
9281
9287
|
}
|
|
9282
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
9283
9288
|
i.emit(`update:${name}`, emittedValue);
|
|
9284
9289
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
9285
9290
|
trigger();
|
|
@@ -9317,9 +9322,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
9317
9322
|
} = instance;
|
|
9318
9323
|
if (emitsOptions) {
|
|
9319
9324
|
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
9320
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
9325
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
9321
9326
|
warn$1(
|
|
9322
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
9327
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
9323
9328
|
);
|
|
9324
9329
|
}
|
|
9325
9330
|
} else {
|
|
@@ -11480,7 +11485,7 @@ function isMemoSame(cached, memo) {
|
|
|
11480
11485
|
return true;
|
|
11481
11486
|
}
|
|
11482
11487
|
|
|
11483
|
-
const version = "3.4.
|
|
11488
|
+
const version = "3.4.37";
|
|
11484
11489
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
11485
11490
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11486
11491
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -11492,7 +11497,8 @@ const _ssrUtils = {
|
|
|
11492
11497
|
setCurrentRenderingInstance,
|
|
11493
11498
|
isVNode: isVNode,
|
|
11494
11499
|
normalizeVNode,
|
|
11495
|
-
getComponentPublicInstance
|
|
11500
|
+
getComponentPublicInstance,
|
|
11501
|
+
ensureValidVNode
|
|
11496
11502
|
};
|
|
11497
11503
|
const ssrUtils = _ssrUtils ;
|
|
11498
11504
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -11963,8 +11969,10 @@ function useCssVars(getter) {
|
|
|
11963
11969
|
setVarsOnVNode(instance.subTree, vars);
|
|
11964
11970
|
updateTeleports(vars);
|
|
11965
11971
|
};
|
|
11966
|
-
|
|
11972
|
+
onBeforeMount(() => {
|
|
11967
11973
|
watchPostEffect(setVars);
|
|
11974
|
+
});
|
|
11975
|
+
onMounted(() => {
|
|
11968
11976
|
const ob = new MutationObserver(setVars);
|
|
11969
11977
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11970
11978
|
onUnmounted(() => ob.disconnect());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -753,7 +753,7 @@ var Vue = (function () {
|
|
|
753
753
|
return isShallow2;
|
|
754
754
|
} else if (key === "__v_raw") {
|
|
755
755
|
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
756
|
-
// this means the
|
|
756
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
757
757
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
758
758
|
return target;
|
|
759
759
|
}
|
|
@@ -3403,7 +3403,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3403
3403
|
}
|
|
3404
3404
|
function pruneCacheEntry(key) {
|
|
3405
3405
|
const cached = cache.get(key);
|
|
3406
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
3406
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
3407
3407
|
unmount(cached);
|
|
3408
3408
|
} else if (current) {
|
|
3409
3409
|
resetShapeFlag(current);
|
|
@@ -3465,6 +3465,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3465
3465
|
return rawVNode;
|
|
3466
3466
|
}
|
|
3467
3467
|
let vnode = getInnerChild(rawVNode);
|
|
3468
|
+
if (vnode.type === Comment) {
|
|
3469
|
+
current = null;
|
|
3470
|
+
return vnode;
|
|
3471
|
+
}
|
|
3468
3472
|
const comp = vnode.type;
|
|
3469
3473
|
const name = getComponentName(
|
|
3470
3474
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -5182,7 +5186,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5182
5186
|
return vm;
|
|
5183
5187
|
}
|
|
5184
5188
|
}
|
|
5185
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
5189
|
+
Vue.version = `2.6.14-compat:${"3.4.37"}`;
|
|
5186
5190
|
Vue.config = singletonApp.config;
|
|
5187
5191
|
Vue.use = (plugin, ...options) => {
|
|
5188
5192
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -5758,7 +5762,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5758
5762
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
5759
5763
|
const instance = currentInstance || currentRenderingInstance;
|
|
5760
5764
|
if (instance || currentApp) {
|
|
5761
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
5765
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
5762
5766
|
if (provides && key in provides) {
|
|
5763
5767
|
return provides[key];
|
|
5764
5768
|
} else if (arguments.length > 1) {
|
|
@@ -7024,6 +7028,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
7024
7028
|
}
|
|
7025
7029
|
if (props) {
|
|
7026
7030
|
{
|
|
7031
|
+
const isCustomElement = el.tagName.includes("-");
|
|
7027
7032
|
for (const key in props) {
|
|
7028
7033
|
if (// #11189 skip if this node has directives that have created hooks
|
|
7029
7034
|
// as it could have mutated the DOM in any possible way
|
|
@@ -7031,7 +7036,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
7031
7036
|
logMismatchError();
|
|
7032
7037
|
}
|
|
7033
7038
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7034
|
-
key[0] === ".") {
|
|
7039
|
+
key[0] === "." || isCustomElement) {
|
|
7035
7040
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
7036
7041
|
}
|
|
7037
7042
|
}
|
|
@@ -8763,13 +8768,13 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8763
8768
|
namespace
|
|
8764
8769
|
);
|
|
8765
8770
|
}
|
|
8771
|
+
container._vnode = vnode;
|
|
8766
8772
|
if (!isFlushing) {
|
|
8767
8773
|
isFlushing = true;
|
|
8768
8774
|
flushPreFlushCbs();
|
|
8769
8775
|
flushPostFlushCbs();
|
|
8770
8776
|
isFlushing = false;
|
|
8771
8777
|
}
|
|
8772
|
-
container._vnode = vnode;
|
|
8773
8778
|
};
|
|
8774
8779
|
const internals = {
|
|
8775
8780
|
p: patch,
|
|
@@ -9181,7 +9186,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
9181
9186
|
return options.get ? options.get(localValue) : localValue;
|
|
9182
9187
|
},
|
|
9183
9188
|
set(value) {
|
|
9184
|
-
|
|
9189
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
9190
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
9185
9191
|
return;
|
|
9186
9192
|
}
|
|
9187
9193
|
const rawProps = i.vnode.props;
|
|
@@ -9190,7 +9196,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
9190
9196
|
localValue = value;
|
|
9191
9197
|
trigger();
|
|
9192
9198
|
}
|
|
9193
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
9194
9199
|
i.emit(`update:${name}`, emittedValue);
|
|
9195
9200
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
9196
9201
|
trigger();
|
|
@@ -9228,9 +9233,9 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
9228
9233
|
} = instance;
|
|
9229
9234
|
if (emitsOptions) {
|
|
9230
9235
|
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
9231
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
9236
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
9232
9237
|
warn$1(
|
|
9233
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
9238
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
9234
9239
|
);
|
|
9235
9240
|
}
|
|
9236
9241
|
} else {
|
|
@@ -11363,7 +11368,7 @@ Component that was made reactive: `,
|
|
|
11363
11368
|
return true;
|
|
11364
11369
|
}
|
|
11365
11370
|
|
|
11366
|
-
const version = "3.4.
|
|
11371
|
+
const version = "3.4.37";
|
|
11367
11372
|
const warn = warn$1 ;
|
|
11368
11373
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11369
11374
|
const devtools = devtools$1 ;
|
|
@@ -11830,8 +11835,10 @@ Component that was made reactive: `,
|
|
|
11830
11835
|
setVarsOnVNode(instance.subTree, vars);
|
|
11831
11836
|
updateTeleports(vars);
|
|
11832
11837
|
};
|
|
11833
|
-
|
|
11838
|
+
onBeforeMount(() => {
|
|
11834
11839
|
watchPostEffect(setVars);
|
|
11840
|
+
});
|
|
11841
|
+
onMounted(() => {
|
|
11835
11842
|
const ob = new MutationObserver(setVars);
|
|
11836
11843
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11837
11844
|
onUnmounted(() => ob.disconnect());
|