@vue/runtime-core 3.4.36 → 3.4.38
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 +1 -1
- package/dist/runtime-core.cjs.js +15 -10
- package/dist/runtime-core.cjs.prod.js +13 -8
- package/dist/runtime-core.d.ts +2 -2
- package/dist/runtime-core.esm-bundler.js +15 -10
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.38
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1357,7 +1357,7 @@ const KeepAliveImpl = {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
function pruneCacheEntry(key) {
|
|
1359
1359
|
const cached = cache.get(key);
|
|
1360
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
1360
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
1361
1361
|
unmount(cached);
|
|
1362
1362
|
} else if (current) {
|
|
1363
1363
|
resetShapeFlag(current);
|
|
@@ -1419,6 +1419,10 @@ const KeepAliveImpl = {
|
|
|
1419
1419
|
return rawVNode;
|
|
1420
1420
|
}
|
|
1421
1421
|
let vnode = getInnerChild(rawVNode);
|
|
1422
|
+
if (vnode.type === Comment) {
|
|
1423
|
+
current = null;
|
|
1424
|
+
return vnode;
|
|
1425
|
+
}
|
|
1422
1426
|
const comp = vnode.type;
|
|
1423
1427
|
const name = getComponentName(
|
|
1424
1428
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -2711,7 +2715,7 @@ function provide(key, value) {
|
|
|
2711
2715
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
2712
2716
|
const instance = currentInstance || currentRenderingInstance;
|
|
2713
2717
|
if (instance || currentApp) {
|
|
2714
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
2718
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
2715
2719
|
if (provides && key in provides) {
|
|
2716
2720
|
return provides[key];
|
|
2717
2721
|
} else if (arguments.length > 1) {
|
|
@@ -5611,13 +5615,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5611
5615
|
namespace
|
|
5612
5616
|
);
|
|
5613
5617
|
}
|
|
5618
|
+
container._vnode = vnode;
|
|
5614
5619
|
if (!isFlushing) {
|
|
5615
5620
|
isFlushing = true;
|
|
5616
5621
|
flushPreFlushCbs();
|
|
5617
5622
|
flushPostFlushCbs();
|
|
5618
5623
|
isFlushing = false;
|
|
5619
5624
|
}
|
|
5620
|
-
container._vnode = vnode;
|
|
5621
5625
|
};
|
|
5622
5626
|
const internals = {
|
|
5623
5627
|
p: patch,
|
|
@@ -6045,7 +6049,8 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
6045
6049
|
return options.get ? options.get(localValue) : localValue;
|
|
6046
6050
|
},
|
|
6047
6051
|
set(value) {
|
|
6048
|
-
|
|
6052
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
6053
|
+
if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) {
|
|
6049
6054
|
return;
|
|
6050
6055
|
}
|
|
6051
6056
|
const rawProps = i.vnode.props;
|
|
@@ -6054,7 +6059,6 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
6054
6059
|
localValue = value;
|
|
6055
6060
|
trigger();
|
|
6056
6061
|
}
|
|
6057
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
6058
6062
|
i.emit(`update:${name}`, emittedValue);
|
|
6059
6063
|
if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
|
|
6060
6064
|
trigger();
|
|
@@ -6092,9 +6096,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
6092
6096
|
} = instance;
|
|
6093
6097
|
if (emitsOptions) {
|
|
6094
6098
|
if (!(event in emitsOptions) && true) {
|
|
6095
|
-
if (!propsOptions || !(shared.toHandlerKey(event) in propsOptions)) {
|
|
6099
|
+
if (!propsOptions || !(shared.toHandlerKey(shared.camelize(event)) in propsOptions)) {
|
|
6096
6100
|
warn$1(
|
|
6097
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(event)}" prop.`
|
|
6101
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(shared.camelize(event))}" prop.`
|
|
6098
6102
|
);
|
|
6099
6103
|
}
|
|
6100
6104
|
} else {
|
|
@@ -8134,7 +8138,7 @@ function isMemoSame(cached, memo) {
|
|
|
8134
8138
|
return true;
|
|
8135
8139
|
}
|
|
8136
8140
|
|
|
8137
|
-
const version = "3.4.
|
|
8141
|
+
const version = "3.4.38";
|
|
8138
8142
|
const warn = warn$1 ;
|
|
8139
8143
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8140
8144
|
const devtools = devtools$1 ;
|
|
@@ -8146,7 +8150,8 @@ const _ssrUtils = {
|
|
|
8146
8150
|
setCurrentRenderingInstance,
|
|
8147
8151
|
isVNode: isVNode,
|
|
8148
8152
|
normalizeVNode,
|
|
8149
|
-
getComponentPublicInstance
|
|
8153
|
+
getComponentPublicInstance,
|
|
8154
|
+
ensureValidVNode
|
|
8150
8155
|
};
|
|
8151
8156
|
const ssrUtils = _ssrUtils ;
|
|
8152
8157
|
const resolveFilter = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.38
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -928,7 +928,7 @@ const KeepAliveImpl = {
|
|
|
928
928
|
}
|
|
929
929
|
function pruneCacheEntry(key) {
|
|
930
930
|
const cached = cache.get(key);
|
|
931
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
931
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
932
932
|
unmount(cached);
|
|
933
933
|
} else if (current) {
|
|
934
934
|
resetShapeFlag(current);
|
|
@@ -987,6 +987,10 @@ const KeepAliveImpl = {
|
|
|
987
987
|
return rawVNode;
|
|
988
988
|
}
|
|
989
989
|
let vnode = getInnerChild(rawVNode);
|
|
990
|
+
if (vnode.type === Comment) {
|
|
991
|
+
current = null;
|
|
992
|
+
return vnode;
|
|
993
|
+
}
|
|
990
994
|
const comp = vnode.type;
|
|
991
995
|
const name = getComponentName(
|
|
992
996
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -1968,7 +1972,7 @@ function provide(key, value) {
|
|
|
1968
1972
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
1969
1973
|
const instance = currentInstance || currentRenderingInstance;
|
|
1970
1974
|
if (instance || currentApp) {
|
|
1971
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
1975
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
1972
1976
|
if (provides && key in provides) {
|
|
1973
1977
|
return provides[key];
|
|
1974
1978
|
} else if (arguments.length > 1) {
|
|
@@ -4344,13 +4348,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4344
4348
|
namespace
|
|
4345
4349
|
);
|
|
4346
4350
|
}
|
|
4351
|
+
container._vnode = vnode;
|
|
4347
4352
|
if (!isFlushing) {
|
|
4348
4353
|
isFlushing = true;
|
|
4349
4354
|
flushPreFlushCbs();
|
|
4350
4355
|
flushPostFlushCbs();
|
|
4351
4356
|
isFlushing = false;
|
|
4352
4357
|
}
|
|
4353
|
-
container._vnode = vnode;
|
|
4354
4358
|
};
|
|
4355
4359
|
const internals = {
|
|
4356
4360
|
p: patch,
|
|
@@ -4721,7 +4725,8 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
4721
4725
|
return options.get ? options.get(localValue) : localValue;
|
|
4722
4726
|
},
|
|
4723
4727
|
set(value) {
|
|
4724
|
-
|
|
4728
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
4729
|
+
if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) {
|
|
4725
4730
|
return;
|
|
4726
4731
|
}
|
|
4727
4732
|
const rawProps = i.vnode.props;
|
|
@@ -4730,7 +4735,6 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
4730
4735
|
localValue = value;
|
|
4731
4736
|
trigger();
|
|
4732
4737
|
}
|
|
4733
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
4734
4738
|
i.emit(`update:${name}`, emittedValue);
|
|
4735
4739
|
if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
|
|
4736
4740
|
trigger();
|
|
@@ -6306,7 +6310,7 @@ function isMemoSame(cached, memo) {
|
|
|
6306
6310
|
return true;
|
|
6307
6311
|
}
|
|
6308
6312
|
|
|
6309
|
-
const version = "3.4.
|
|
6313
|
+
const version = "3.4.38";
|
|
6310
6314
|
const warn$1 = shared.NOOP;
|
|
6311
6315
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6312
6316
|
const devtools = void 0;
|
|
@@ -6318,7 +6322,8 @@ const _ssrUtils = {
|
|
|
6318
6322
|
setCurrentRenderingInstance,
|
|
6319
6323
|
isVNode: isVNode,
|
|
6320
6324
|
normalizeVNode,
|
|
6321
|
-
getComponentPublicInstance
|
|
6325
|
+
getComponentPublicInstance,
|
|
6326
|
+
ensureValidVNode
|
|
6322
6327
|
};
|
|
6323
6328
|
const ssrUtils = _ssrUtils ;
|
|
6324
6329
|
const resolveFilter = null;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -507,7 +507,7 @@ export interface ObjectDirective<T = any, V = any> {
|
|
|
507
507
|
export type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>;
|
|
508
508
|
export type Directive<T = any, V = any> = ObjectDirective<T, V> | FunctionDirective<T, V>;
|
|
509
509
|
type DirectiveModifiers = Record<string, boolean>;
|
|
510
|
-
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string, DirectiveModifiers]>;
|
|
510
|
+
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>;
|
|
511
511
|
/**
|
|
512
512
|
* Adds directives to a VNode.
|
|
513
513
|
*/
|
|
@@ -1146,7 +1146,7 @@ export declare function registerRuntimeCompiler(_compile: any): void;
|
|
|
1146
1146
|
export declare const isRuntimeOnly: () => boolean;
|
|
1147
1147
|
|
|
1148
1148
|
export type WatchEffect = (onCleanup: OnCleanup) => void;
|
|
1149
|
-
export type WatchSource<T = any> = Ref<T
|
|
1149
|
+
export type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
|
|
1150
1150
|
export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
|
|
1151
1151
|
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
|
1152
1152
|
type MapSources<T, Immediate> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.38
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1359,7 +1359,7 @@ const KeepAliveImpl = {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
function pruneCacheEntry(key) {
|
|
1361
1361
|
const cached = cache.get(key);
|
|
1362
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
1362
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
1363
1363
|
unmount(cached);
|
|
1364
1364
|
} else if (current) {
|
|
1365
1365
|
resetShapeFlag(current);
|
|
@@ -1421,6 +1421,10 @@ const KeepAliveImpl = {
|
|
|
1421
1421
|
return rawVNode;
|
|
1422
1422
|
}
|
|
1423
1423
|
let vnode = getInnerChild(rawVNode);
|
|
1424
|
+
if (vnode.type === Comment) {
|
|
1425
|
+
current = null;
|
|
1426
|
+
return vnode;
|
|
1427
|
+
}
|
|
1424
1428
|
const comp = vnode.type;
|
|
1425
1429
|
const name = getComponentName(
|
|
1426
1430
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -2717,7 +2721,7 @@ function provide(key, value) {
|
|
|
2717
2721
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
2718
2722
|
const instance = currentInstance || currentRenderingInstance;
|
|
2719
2723
|
if (instance || currentApp) {
|
|
2720
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
2724
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
2721
2725
|
if (provides && key in provides) {
|
|
2722
2726
|
return provides[key];
|
|
2723
2727
|
} else if (arguments.length > 1) {
|
|
@@ -5666,13 +5670,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5666
5670
|
namespace
|
|
5667
5671
|
);
|
|
5668
5672
|
}
|
|
5673
|
+
container._vnode = vnode;
|
|
5669
5674
|
if (!isFlushing) {
|
|
5670
5675
|
isFlushing = true;
|
|
5671
5676
|
flushPreFlushCbs();
|
|
5672
5677
|
flushPostFlushCbs();
|
|
5673
5678
|
isFlushing = false;
|
|
5674
5679
|
}
|
|
5675
|
-
container._vnode = vnode;
|
|
5676
5680
|
};
|
|
5677
5681
|
const internals = {
|
|
5678
5682
|
p: patch,
|
|
@@ -6100,7 +6104,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6100
6104
|
return options.get ? options.get(localValue) : localValue;
|
|
6101
6105
|
},
|
|
6102
6106
|
set(value) {
|
|
6103
|
-
|
|
6107
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
6108
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
6104
6109
|
return;
|
|
6105
6110
|
}
|
|
6106
6111
|
const rawProps = i.vnode.props;
|
|
@@ -6109,7 +6114,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6109
6114
|
localValue = value;
|
|
6110
6115
|
trigger();
|
|
6111
6116
|
}
|
|
6112
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
6113
6117
|
i.emit(`update:${name}`, emittedValue);
|
|
6114
6118
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
6115
6119
|
trigger();
|
|
@@ -6147,9 +6151,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
6147
6151
|
} = instance;
|
|
6148
6152
|
if (emitsOptions) {
|
|
6149
6153
|
if (!(event in emitsOptions) && true) {
|
|
6150
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
6154
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
6151
6155
|
warn$1(
|
|
6152
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
6156
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
6153
6157
|
);
|
|
6154
6158
|
}
|
|
6155
6159
|
} else {
|
|
@@ -8203,7 +8207,7 @@ function isMemoSame(cached, memo) {
|
|
|
8203
8207
|
return true;
|
|
8204
8208
|
}
|
|
8205
8209
|
|
|
8206
|
-
const version = "3.4.
|
|
8210
|
+
const version = "3.4.38";
|
|
8207
8211
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8208
8212
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8209
8213
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -8215,7 +8219,8 @@ const _ssrUtils = {
|
|
|
8215
8219
|
setCurrentRenderingInstance,
|
|
8216
8220
|
isVNode: isVNode,
|
|
8217
8221
|
normalizeVNode,
|
|
8218
|
-
getComponentPublicInstance
|
|
8222
|
+
getComponentPublicInstance,
|
|
8223
|
+
ensureValidVNode
|
|
8219
8224
|
};
|
|
8220
8225
|
const ssrUtils = _ssrUtils ;
|
|
8221
8226
|
const resolveFilter = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.38",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/
|
|
50
|
-
"@vue/
|
|
49
|
+
"@vue/shared": "3.4.38",
|
|
50
|
+
"@vue/reactivity": "3.4.38"
|
|
51
51
|
}
|
|
52
52
|
}
|