@vue/runtime-core 3.4.3 → 3.4.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/runtime-core.cjs.js +16 -10
- package/dist/runtime-core.cjs.prod.js +11 -10
- package/dist/runtime-core.esm-bundler.js +18 -12
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1455,7 +1455,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
1455
1455
|
hiddenContainer,
|
|
1456
1456
|
anchor,
|
|
1457
1457
|
deps: 0,
|
|
1458
|
-
pendingId:
|
|
1458
|
+
pendingId: suspenseId++,
|
|
1459
1459
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
1460
1460
|
activeBranch: null,
|
|
1461
1461
|
pendingBranch: null,
|
|
@@ -1794,7 +1794,6 @@ function doWatch(source, cb, {
|
|
|
1794
1794
|
onTrack,
|
|
1795
1795
|
onTrigger
|
|
1796
1796
|
} = shared.EMPTY_OBJ) {
|
|
1797
|
-
var _a;
|
|
1798
1797
|
if (cb && once) {
|
|
1799
1798
|
const _cb = cb;
|
|
1800
1799
|
cb = (...args) => {
|
|
@@ -1802,6 +1801,11 @@ function doWatch(source, cb, {
|
|
|
1802
1801
|
unwatch();
|
|
1803
1802
|
};
|
|
1804
1803
|
}
|
|
1804
|
+
if (deep !== void 0 && typeof deep === "number") {
|
|
1805
|
+
warn$1(
|
|
1806
|
+
`watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1805
1809
|
if (!cb) {
|
|
1806
1810
|
if (immediate !== void 0) {
|
|
1807
1811
|
warn$1(
|
|
@@ -1826,7 +1830,11 @@ function doWatch(source, cb, {
|
|
|
1826
1830
|
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
1827
1831
|
);
|
|
1828
1832
|
};
|
|
1829
|
-
const instance =
|
|
1833
|
+
const instance = currentInstance;
|
|
1834
|
+
const reactiveGetter = (source2) => deep === true ? source2 : (
|
|
1835
|
+
// for deep: false, only traverse root-level properties
|
|
1836
|
+
traverse(source2, deep === false ? 1 : void 0)
|
|
1837
|
+
);
|
|
1830
1838
|
let getter;
|
|
1831
1839
|
let forceTrigger = false;
|
|
1832
1840
|
let isMultiSource = false;
|
|
@@ -1834,7 +1842,7 @@ function doWatch(source, cb, {
|
|
|
1834
1842
|
getter = () => source.value;
|
|
1835
1843
|
forceTrigger = reactivity.isShallow(source);
|
|
1836
1844
|
} else if (reactivity.isReactive(source)) {
|
|
1837
|
-
getter =
|
|
1845
|
+
getter = () => reactiveGetter(source);
|
|
1838
1846
|
forceTrigger = true;
|
|
1839
1847
|
} else if (shared.isArray(source)) {
|
|
1840
1848
|
isMultiSource = true;
|
|
@@ -1843,7 +1851,7 @@ function doWatch(source, cb, {
|
|
|
1843
1851
|
if (reactivity.isRef(s)) {
|
|
1844
1852
|
return s.value;
|
|
1845
1853
|
} else if (reactivity.isReactive(s)) {
|
|
1846
|
-
return
|
|
1854
|
+
return reactiveGetter(s);
|
|
1847
1855
|
} else if (shared.isFunction(s)) {
|
|
1848
1856
|
return callWithErrorHandling(s, instance, 2);
|
|
1849
1857
|
} else {
|
|
@@ -1855,9 +1863,6 @@ function doWatch(source, cb, {
|
|
|
1855
1863
|
getter = () => callWithErrorHandling(source, instance, 2);
|
|
1856
1864
|
} else {
|
|
1857
1865
|
getter = () => {
|
|
1858
|
-
if (instance && instance.isUnmounted) {
|
|
1859
|
-
return;
|
|
1860
|
-
}
|
|
1861
1866
|
if (cleanup) {
|
|
1862
1867
|
cleanup();
|
|
1863
1868
|
}
|
|
@@ -3293,6 +3298,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
3293
3298
|
return reactivity.ref();
|
|
3294
3299
|
}
|
|
3295
3300
|
const camelizedName = shared.camelize(name);
|
|
3301
|
+
const hyphenatedName = shared.hyphenate(name);
|
|
3296
3302
|
const res = reactivity.customRef((track, trigger) => {
|
|
3297
3303
|
let localValue;
|
|
3298
3304
|
watchSyncEffect(() => {
|
|
@@ -3310,7 +3316,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
3310
3316
|
set(value) {
|
|
3311
3317
|
const rawProps = i.vnode.props;
|
|
3312
3318
|
if (!(rawProps && // check if parent has passed v-model
|
|
3313
|
-
(name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
|
3319
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
|
3314
3320
|
localValue = value;
|
|
3315
3321
|
trigger();
|
|
3316
3322
|
}
|
|
@@ -7985,7 +7991,7 @@ function isMemoSame(cached, memo) {
|
|
|
7985
7991
|
return true;
|
|
7986
7992
|
}
|
|
7987
7993
|
|
|
7988
|
-
const version = "3.4.
|
|
7994
|
+
const version = "3.4.4";
|
|
7989
7995
|
const warn = warn$1 ;
|
|
7990
7996
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
7991
7997
|
const devtools = devtools$1 ;
|
|
@@ -944,7 +944,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
944
944
|
hiddenContainer,
|
|
945
945
|
anchor,
|
|
946
946
|
deps: 0,
|
|
947
|
-
pendingId:
|
|
947
|
+
pendingId: suspenseId++,
|
|
948
948
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
949
949
|
activeBranch: null,
|
|
950
950
|
pendingBranch: null,
|
|
@@ -1252,7 +1252,6 @@ function doWatch(source, cb, {
|
|
|
1252
1252
|
onTrack,
|
|
1253
1253
|
onTrigger
|
|
1254
1254
|
} = shared.EMPTY_OBJ) {
|
|
1255
|
-
var _a;
|
|
1256
1255
|
if (cb && once) {
|
|
1257
1256
|
const _cb = cb;
|
|
1258
1257
|
cb = (...args) => {
|
|
@@ -1260,7 +1259,11 @@ function doWatch(source, cb, {
|
|
|
1260
1259
|
unwatch();
|
|
1261
1260
|
};
|
|
1262
1261
|
}
|
|
1263
|
-
const instance =
|
|
1262
|
+
const instance = currentInstance;
|
|
1263
|
+
const reactiveGetter = (source2) => deep === true ? source2 : (
|
|
1264
|
+
// for deep: false, only traverse root-level properties
|
|
1265
|
+
traverse(source2, deep === false ? 1 : void 0)
|
|
1266
|
+
);
|
|
1264
1267
|
let getter;
|
|
1265
1268
|
let forceTrigger = false;
|
|
1266
1269
|
let isMultiSource = false;
|
|
@@ -1268,7 +1271,7 @@ function doWatch(source, cb, {
|
|
|
1268
1271
|
getter = () => source.value;
|
|
1269
1272
|
forceTrigger = reactivity.isShallow(source);
|
|
1270
1273
|
} else if (reactivity.isReactive(source)) {
|
|
1271
|
-
getter =
|
|
1274
|
+
getter = () => reactiveGetter(source);
|
|
1272
1275
|
forceTrigger = true;
|
|
1273
1276
|
} else if (shared.isArray(source)) {
|
|
1274
1277
|
isMultiSource = true;
|
|
@@ -1277,7 +1280,7 @@ function doWatch(source, cb, {
|
|
|
1277
1280
|
if (reactivity.isRef(s)) {
|
|
1278
1281
|
return s.value;
|
|
1279
1282
|
} else if (reactivity.isReactive(s)) {
|
|
1280
|
-
return
|
|
1283
|
+
return reactiveGetter(s);
|
|
1281
1284
|
} else if (shared.isFunction(s)) {
|
|
1282
1285
|
return callWithErrorHandling(s, instance, 2);
|
|
1283
1286
|
} else ;
|
|
@@ -1287,9 +1290,6 @@ function doWatch(source, cb, {
|
|
|
1287
1290
|
getter = () => callWithErrorHandling(source, instance, 2);
|
|
1288
1291
|
} else {
|
|
1289
1292
|
getter = () => {
|
|
1290
|
-
if (instance && instance.isUnmounted) {
|
|
1291
|
-
return;
|
|
1292
|
-
}
|
|
1293
1293
|
if (cleanup) {
|
|
1294
1294
|
cleanup();
|
|
1295
1295
|
}
|
|
@@ -2529,6 +2529,7 @@ function useAttrs() {
|
|
|
2529
2529
|
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
2530
2530
|
const i = getCurrentInstance();
|
|
2531
2531
|
const camelizedName = shared.camelize(name);
|
|
2532
|
+
const hyphenatedName = shared.hyphenate(name);
|
|
2532
2533
|
const res = reactivity.customRef((track, trigger) => {
|
|
2533
2534
|
let localValue;
|
|
2534
2535
|
watchSyncEffect(() => {
|
|
@@ -2546,7 +2547,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
2546
2547
|
set(value) {
|
|
2547
2548
|
const rawProps = i.vnode.props;
|
|
2548
2549
|
if (!(rawProps && // check if parent has passed v-model
|
|
2549
|
-
(name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
|
2550
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
|
2550
2551
|
localValue = value;
|
|
2551
2552
|
trigger();
|
|
2552
2553
|
}
|
|
@@ -6253,7 +6254,7 @@ function isMemoSame(cached, memo) {
|
|
|
6253
6254
|
return true;
|
|
6254
6255
|
}
|
|
6255
6256
|
|
|
6256
|
-
const version = "3.4.
|
|
6257
|
+
const version = "3.4.4";
|
|
6257
6258
|
const warn$1 = shared.NOOP;
|
|
6258
6259
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6259
6260
|
const devtools = void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { pauseTracking, resetTracking, isRef, toRaw,
|
|
1
|
+
import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, customRef, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
|
|
2
2
|
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
3
|
-
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, isSet, isMap, isPlainObject,
|
|
3
|
+
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, isSet, isMap, isPlainObject, remove, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr } from '@vue/shared';
|
|
4
4
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
5
5
|
|
|
6
6
|
const stack = [];
|
|
@@ -1457,7 +1457,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
1457
1457
|
hiddenContainer,
|
|
1458
1458
|
anchor,
|
|
1459
1459
|
deps: 0,
|
|
1460
|
-
pendingId:
|
|
1460
|
+
pendingId: suspenseId++,
|
|
1461
1461
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
1462
1462
|
activeBranch: null,
|
|
1463
1463
|
pendingBranch: null,
|
|
@@ -1796,7 +1796,6 @@ function doWatch(source, cb, {
|
|
|
1796
1796
|
onTrack,
|
|
1797
1797
|
onTrigger
|
|
1798
1798
|
} = EMPTY_OBJ) {
|
|
1799
|
-
var _a;
|
|
1800
1799
|
if (cb && once) {
|
|
1801
1800
|
const _cb = cb;
|
|
1802
1801
|
cb = (...args) => {
|
|
@@ -1804,6 +1803,11 @@ function doWatch(source, cb, {
|
|
|
1804
1803
|
unwatch();
|
|
1805
1804
|
};
|
|
1806
1805
|
}
|
|
1806
|
+
if (!!(process.env.NODE_ENV !== "production") && deep !== void 0 && typeof deep === "number") {
|
|
1807
|
+
warn$1(
|
|
1808
|
+
`watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
|
|
1809
|
+
);
|
|
1810
|
+
}
|
|
1807
1811
|
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
1808
1812
|
if (immediate !== void 0) {
|
|
1809
1813
|
warn$1(
|
|
@@ -1828,7 +1832,11 @@ function doWatch(source, cb, {
|
|
|
1828
1832
|
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
1829
1833
|
);
|
|
1830
1834
|
};
|
|
1831
|
-
const instance =
|
|
1835
|
+
const instance = currentInstance;
|
|
1836
|
+
const reactiveGetter = (source2) => deep === true ? source2 : (
|
|
1837
|
+
// for deep: false, only traverse root-level properties
|
|
1838
|
+
traverse(source2, deep === false ? 1 : void 0)
|
|
1839
|
+
);
|
|
1832
1840
|
let getter;
|
|
1833
1841
|
let forceTrigger = false;
|
|
1834
1842
|
let isMultiSource = false;
|
|
@@ -1836,7 +1844,7 @@ function doWatch(source, cb, {
|
|
|
1836
1844
|
getter = () => source.value;
|
|
1837
1845
|
forceTrigger = isShallow$1(source);
|
|
1838
1846
|
} else if (isReactive(source)) {
|
|
1839
|
-
getter =
|
|
1847
|
+
getter = () => reactiveGetter(source);
|
|
1840
1848
|
forceTrigger = true;
|
|
1841
1849
|
} else if (isArray(source)) {
|
|
1842
1850
|
isMultiSource = true;
|
|
@@ -1845,7 +1853,7 @@ function doWatch(source, cb, {
|
|
|
1845
1853
|
if (isRef(s)) {
|
|
1846
1854
|
return s.value;
|
|
1847
1855
|
} else if (isReactive(s)) {
|
|
1848
|
-
return
|
|
1856
|
+
return reactiveGetter(s);
|
|
1849
1857
|
} else if (isFunction(s)) {
|
|
1850
1858
|
return callWithErrorHandling(s, instance, 2);
|
|
1851
1859
|
} else {
|
|
@@ -1857,9 +1865,6 @@ function doWatch(source, cb, {
|
|
|
1857
1865
|
getter = () => callWithErrorHandling(source, instance, 2);
|
|
1858
1866
|
} else {
|
|
1859
1867
|
getter = () => {
|
|
1860
|
-
if (instance && instance.isUnmounted) {
|
|
1861
|
-
return;
|
|
1862
|
-
}
|
|
1863
1868
|
if (cleanup) {
|
|
1864
1869
|
cleanup();
|
|
1865
1870
|
}
|
|
@@ -3297,6 +3302,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3297
3302
|
return ref();
|
|
3298
3303
|
}
|
|
3299
3304
|
const camelizedName = camelize(name);
|
|
3305
|
+
const hyphenatedName = hyphenate(name);
|
|
3300
3306
|
const res = customRef((track, trigger) => {
|
|
3301
3307
|
let localValue;
|
|
3302
3308
|
watchSyncEffect(() => {
|
|
@@ -3314,7 +3320,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3314
3320
|
set(value) {
|
|
3315
3321
|
const rawProps = i.vnode.props;
|
|
3316
3322
|
if (!(rawProps && // check if parent has passed v-model
|
|
3317
|
-
(name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
3323
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
3318
3324
|
localValue = value;
|
|
3319
3325
|
trigger();
|
|
3320
3326
|
}
|
|
@@ -8057,7 +8063,7 @@ function isMemoSame(cached, memo) {
|
|
|
8057
8063
|
return true;
|
|
8058
8064
|
}
|
|
8059
8065
|
|
|
8060
|
-
const version = "3.4.
|
|
8066
|
+
const version = "3.4.4";
|
|
8061
8067
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8062
8068
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8063
8069
|
const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/shared": "3.4.
|
|
36
|
-
"@vue/reactivity": "3.4.
|
|
35
|
+
"@vue/shared": "3.4.4",
|
|
36
|
+
"@vue/reactivity": "3.4.4"
|
|
37
37
|
}
|
|
38
38
|
}
|