@vue/compat 3.2.42 → 3.2.44
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 +15 -8
- package/dist/vue.cjs.prod.js +7 -140
- package/dist/vue.esm-browser.js +15 -8
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +19 -9
- package/dist/vue.global.js +14 -7
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +15 -8
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +19 -9
- package/dist/vue.runtime.global.js +14 -7
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.cjs.js
CHANGED
|
@@ -2474,8 +2474,8 @@ const deprecationData = {
|
|
|
2474
2474
|
},
|
|
2475
2475
|
["INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */]: {
|
|
2476
2476
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
2477
|
-
`use the "
|
|
2478
|
-
`should be changed to @
|
|
2477
|
+
`use the "vue:" prefix instead of "hook:". For example, @${event} ` +
|
|
2478
|
+
`should be changed to @vue:${event.slice(5)}. ` +
|
|
2479
2479
|
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
2480
2480
|
`hooks.`,
|
|
2481
2481
|
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
@@ -4078,10 +4078,11 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
4078
4078
|
callWithAsyncErrorHandling(cb, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [
|
|
4079
4079
|
newValue,
|
|
4080
4080
|
// pass undefined as the old value when it's changed for the first time
|
|
4081
|
-
oldValue === INITIAL_WATCHER_VALUE
|
|
4082
|
-
(isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
|
|
4081
|
+
oldValue === INITIAL_WATCHER_VALUE
|
|
4083
4082
|
? undefined
|
|
4084
|
-
: oldValue
|
|
4083
|
+
: (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
|
|
4084
|
+
? []
|
|
4085
|
+
: oldValue,
|
|
4085
4086
|
onCleanup
|
|
4086
4087
|
]);
|
|
4087
4088
|
oldValue = newValue;
|
|
@@ -7348,7 +7349,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
7348
7349
|
return vm;
|
|
7349
7350
|
}
|
|
7350
7351
|
}
|
|
7351
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
7352
|
+
Vue.version = `2.6.14-compat:${"3.2.44"}`;
|
|
7352
7353
|
Vue.config = singletonApp.config;
|
|
7353
7354
|
Vue.use = (p, ...options) => {
|
|
7354
7355
|
if (p && isFunction(p.install)) {
|
|
@@ -11141,7 +11142,7 @@ const useSSRContext = () => {
|
|
|
11141
11142
|
const ctx = inject(ssrContextKey);
|
|
11142
11143
|
if (!ctx) {
|
|
11143
11144
|
warn$1(`Server rendering context not provided. Make sure to only call ` +
|
|
11144
|
-
|
|
11145
|
+
`useSSRContext() conditionally in the server build.`);
|
|
11145
11146
|
}
|
|
11146
11147
|
return ctx;
|
|
11147
11148
|
}
|
|
@@ -11364,7 +11365,7 @@ function isMemoSame(cached, memo) {
|
|
|
11364
11365
|
}
|
|
11365
11366
|
|
|
11366
11367
|
// Core API ------------------------------------------------------------------
|
|
11367
|
-
const version = "3.2.
|
|
11368
|
+
const version = "3.2.44";
|
|
11368
11369
|
const _ssrUtils = {
|
|
11369
11370
|
createComponentInstance,
|
|
11370
11371
|
setupComponent,
|
|
@@ -11525,6 +11526,7 @@ function patchStyle(el, prev, next) {
|
|
|
11525
11526
|
}
|
|
11526
11527
|
}
|
|
11527
11528
|
}
|
|
11529
|
+
const semicolonRE = /[^\\];\s*$/;
|
|
11528
11530
|
const importantRE = /\s*!important$/;
|
|
11529
11531
|
function setStyle(style, name, val) {
|
|
11530
11532
|
if (isArray(val)) {
|
|
@@ -11533,6 +11535,11 @@ function setStyle(style, name, val) {
|
|
|
11533
11535
|
else {
|
|
11534
11536
|
if (val == null)
|
|
11535
11537
|
val = '';
|
|
11538
|
+
{
|
|
11539
|
+
if (semicolonRE.test(val)) {
|
|
11540
|
+
warn$1(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
11541
|
+
}
|
|
11542
|
+
}
|
|
11536
11543
|
if (name.startsWith('--')) {
|
|
11537
11544
|
// custom property definition
|
|
11538
11545
|
style.setProperty(name, val);
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1578,112 +1578,8 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1578
1578
|
return cRef;
|
|
1579
1579
|
}
|
|
1580
1580
|
|
|
1581
|
-
const stack = [];
|
|
1582
1581
|
function warn(msg, ...args) {
|
|
1583
|
-
|
|
1584
|
-
// during patch, leading to infinite recursion.
|
|
1585
|
-
pauseTracking();
|
|
1586
|
-
const instance = stack.length ? stack[stack.length - 1].component : null;
|
|
1587
|
-
const appWarnHandler = instance && instance.appContext.config.warnHandler;
|
|
1588
|
-
const trace = getComponentTrace();
|
|
1589
|
-
if (appWarnHandler) {
|
|
1590
|
-
callWithErrorHandling(appWarnHandler, instance, 11 /* ErrorCodes.APP_WARN_HANDLER */, [
|
|
1591
|
-
msg + args.join(''),
|
|
1592
|
-
instance && instance.proxy,
|
|
1593
|
-
trace
|
|
1594
|
-
.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`)
|
|
1595
|
-
.join('\n'),
|
|
1596
|
-
trace
|
|
1597
|
-
]);
|
|
1598
|
-
}
|
|
1599
|
-
else {
|
|
1600
|
-
const warnArgs = [`[Vue warn]: ${msg}`, ...args];
|
|
1601
|
-
/* istanbul ignore if */
|
|
1602
|
-
if (trace.length &&
|
|
1603
|
-
// avoid spamming console during tests
|
|
1604
|
-
!false) {
|
|
1605
|
-
warnArgs.push(`\n`, ...formatTrace(trace));
|
|
1606
|
-
}
|
|
1607
|
-
console.warn(...warnArgs);
|
|
1608
|
-
}
|
|
1609
|
-
resetTracking();
|
|
1610
|
-
}
|
|
1611
|
-
function getComponentTrace() {
|
|
1612
|
-
let currentVNode = stack[stack.length - 1];
|
|
1613
|
-
if (!currentVNode) {
|
|
1614
|
-
return [];
|
|
1615
|
-
}
|
|
1616
|
-
// we can't just use the stack because it will be incomplete during updates
|
|
1617
|
-
// that did not start from the root. Re-construct the parent chain using
|
|
1618
|
-
// instance parent pointers.
|
|
1619
|
-
const normalizedStack = [];
|
|
1620
|
-
while (currentVNode) {
|
|
1621
|
-
const last = normalizedStack[0];
|
|
1622
|
-
if (last && last.vnode === currentVNode) {
|
|
1623
|
-
last.recurseCount++;
|
|
1624
|
-
}
|
|
1625
|
-
else {
|
|
1626
|
-
normalizedStack.push({
|
|
1627
|
-
vnode: currentVNode,
|
|
1628
|
-
recurseCount: 0
|
|
1629
|
-
});
|
|
1630
|
-
}
|
|
1631
|
-
const parentInstance = currentVNode.component && currentVNode.component.parent;
|
|
1632
|
-
currentVNode = parentInstance && parentInstance.vnode;
|
|
1633
|
-
}
|
|
1634
|
-
return normalizedStack;
|
|
1635
|
-
}
|
|
1636
|
-
/* istanbul ignore next */
|
|
1637
|
-
function formatTrace(trace) {
|
|
1638
|
-
const logs = [];
|
|
1639
|
-
trace.forEach((entry, i) => {
|
|
1640
|
-
logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry));
|
|
1641
|
-
});
|
|
1642
|
-
return logs;
|
|
1643
|
-
}
|
|
1644
|
-
function formatTraceEntry({ vnode, recurseCount }) {
|
|
1645
|
-
const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
|
|
1646
|
-
const isRoot = vnode.component ? vnode.component.parent == null : false;
|
|
1647
|
-
const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
|
|
1648
|
-
const close = `>` + postfix;
|
|
1649
|
-
return vnode.props
|
|
1650
|
-
? [open, ...formatProps(vnode.props), close]
|
|
1651
|
-
: [open + close];
|
|
1652
|
-
}
|
|
1653
|
-
/* istanbul ignore next */
|
|
1654
|
-
function formatProps(props) {
|
|
1655
|
-
const res = [];
|
|
1656
|
-
const keys = Object.keys(props);
|
|
1657
|
-
keys.slice(0, 3).forEach(key => {
|
|
1658
|
-
res.push(...formatProp(key, props[key]));
|
|
1659
|
-
});
|
|
1660
|
-
if (keys.length > 3) {
|
|
1661
|
-
res.push(` ...`);
|
|
1662
|
-
}
|
|
1663
|
-
return res;
|
|
1664
|
-
}
|
|
1665
|
-
/* istanbul ignore next */
|
|
1666
|
-
function formatProp(key, value, raw) {
|
|
1667
|
-
if (isString(value)) {
|
|
1668
|
-
value = JSON.stringify(value);
|
|
1669
|
-
return raw ? value : [`${key}=${value}`];
|
|
1670
|
-
}
|
|
1671
|
-
else if (typeof value === 'number' ||
|
|
1672
|
-
typeof value === 'boolean' ||
|
|
1673
|
-
value == null) {
|
|
1674
|
-
return raw ? value : [`${key}=${value}`];
|
|
1675
|
-
}
|
|
1676
|
-
else if (isRef(value)) {
|
|
1677
|
-
value = formatProp(key, toRaw(value.value), true);
|
|
1678
|
-
return raw ? value : [`${key}=Ref<`, value, `>`];
|
|
1679
|
-
}
|
|
1680
|
-
else if (isFunction(value)) {
|
|
1681
|
-
return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
|
|
1682
|
-
}
|
|
1683
|
-
else {
|
|
1684
|
-
value = toRaw(value);
|
|
1685
|
-
return raw ? value : [`${key}=`, value];
|
|
1686
|
-
}
|
|
1582
|
+
return;
|
|
1687
1583
|
}
|
|
1688
1584
|
|
|
1689
1585
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
@@ -3107,10 +3003,11 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3107
3003
|
callWithAsyncErrorHandling(cb, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [
|
|
3108
3004
|
newValue,
|
|
3109
3005
|
// pass undefined as the old value when it's changed for the first time
|
|
3110
|
-
oldValue === INITIAL_WATCHER_VALUE
|
|
3111
|
-
(isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
|
|
3006
|
+
oldValue === INITIAL_WATCHER_VALUE
|
|
3112
3007
|
? undefined
|
|
3113
|
-
: oldValue
|
|
3008
|
+
: (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
|
|
3009
|
+
? []
|
|
3010
|
+
: oldValue,
|
|
3114
3011
|
onCleanup
|
|
3115
3012
|
]);
|
|
3116
3013
|
oldValue = newValue;
|
|
@@ -5907,7 +5804,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5907
5804
|
return vm;
|
|
5908
5805
|
}
|
|
5909
5806
|
}
|
|
5910
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
5807
|
+
Vue.version = `2.6.14-compat:${"3.2.44"}`;
|
|
5911
5808
|
Vue.config = singletonApp.config;
|
|
5912
5809
|
Vue.use = (p, ...options) => {
|
|
5913
5810
|
if (p && isFunction(p.install)) {
|
|
@@ -8974,37 +8871,11 @@ function getExposeProxy(instance) {
|
|
|
8974
8871
|
})));
|
|
8975
8872
|
}
|
|
8976
8873
|
}
|
|
8977
|
-
const classifyRE = /(?:^|[-_])(\w)/g;
|
|
8978
|
-
const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
|
|
8979
8874
|
function getComponentName(Component, includeInferred = true) {
|
|
8980
8875
|
return isFunction(Component)
|
|
8981
8876
|
? Component.displayName || Component.name
|
|
8982
8877
|
: Component.name || (includeInferred && Component.__name);
|
|
8983
8878
|
}
|
|
8984
|
-
/* istanbul ignore next */
|
|
8985
|
-
function formatComponentName(instance, Component, isRoot = false) {
|
|
8986
|
-
let name = getComponentName(Component);
|
|
8987
|
-
if (!name && Component.__file) {
|
|
8988
|
-
const match = Component.__file.match(/([^/\\]+)\.\w+$/);
|
|
8989
|
-
if (match) {
|
|
8990
|
-
name = match[1];
|
|
8991
|
-
}
|
|
8992
|
-
}
|
|
8993
|
-
if (!name && instance && instance.parent) {
|
|
8994
|
-
// try to infer the name based on reverse resolution
|
|
8995
|
-
const inferFromRegistry = (registry) => {
|
|
8996
|
-
for (const key in registry) {
|
|
8997
|
-
if (registry[key] === Component) {
|
|
8998
|
-
return key;
|
|
8999
|
-
}
|
|
9000
|
-
}
|
|
9001
|
-
};
|
|
9002
|
-
name =
|
|
9003
|
-
inferFromRegistry(instance.components ||
|
|
9004
|
-
instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
|
|
9005
|
-
}
|
|
9006
|
-
return name ? classify(name) : isRoot ? `App` : `Anonymous`;
|
|
9007
|
-
}
|
|
9008
8879
|
function isClassComponent(value) {
|
|
9009
8880
|
return isFunction(value) && '__vccOpts' in value;
|
|
9010
8881
|
}
|
|
@@ -9173,10 +9044,6 @@ const ssrContextKey = Symbol(``);
|
|
|
9173
9044
|
const useSSRContext = () => {
|
|
9174
9045
|
{
|
|
9175
9046
|
const ctx = inject(ssrContextKey);
|
|
9176
|
-
if (!ctx) {
|
|
9177
|
-
warn(`Server rendering context not provided. Make sure to only call ` +
|
|
9178
|
-
`useSSRContext() conditionally in the server build.`);
|
|
9179
|
-
}
|
|
9180
9047
|
return ctx;
|
|
9181
9048
|
}
|
|
9182
9049
|
};
|
|
@@ -9216,7 +9083,7 @@ function isMemoSame(cached, memo) {
|
|
|
9216
9083
|
}
|
|
9217
9084
|
|
|
9218
9085
|
// Core API ------------------------------------------------------------------
|
|
9219
|
-
const version = "3.2.
|
|
9086
|
+
const version = "3.2.44";
|
|
9220
9087
|
const _ssrUtils = {
|
|
9221
9088
|
createComponentInstance,
|
|
9222
9089
|
setupComponent,
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -2334,8 +2334,8 @@ const deprecationData = {
|
|
|
2334
2334
|
},
|
|
2335
2335
|
["INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */]: {
|
|
2336
2336
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
2337
|
-
`use the "
|
|
2338
|
-
`should be changed to @
|
|
2337
|
+
`use the "vue:" prefix instead of "hook:". For example, @${event} ` +
|
|
2338
|
+
`should be changed to @vue:${event.slice(5)}. ` +
|
|
2339
2339
|
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
2340
2340
|
`hooks.`,
|
|
2341
2341
|
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
@@ -3912,10 +3912,11 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3912
3912
|
callWithAsyncErrorHandling(cb, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [
|
|
3913
3913
|
newValue,
|
|
3914
3914
|
// pass undefined as the old value when it's changed for the first time
|
|
3915
|
-
oldValue === INITIAL_WATCHER_VALUE
|
|
3916
|
-
(isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
|
|
3915
|
+
oldValue === INITIAL_WATCHER_VALUE
|
|
3917
3916
|
? undefined
|
|
3918
|
-
: oldValue
|
|
3917
|
+
: (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
|
|
3918
|
+
? []
|
|
3919
|
+
: oldValue,
|
|
3919
3920
|
onCleanup
|
|
3920
3921
|
]);
|
|
3921
3922
|
oldValue = newValue;
|
|
@@ -7172,7 +7173,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
7172
7173
|
return vm;
|
|
7173
7174
|
}
|
|
7174
7175
|
}
|
|
7175
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
7176
|
+
Vue.version = `2.6.14-compat:${"3.2.44"}`;
|
|
7176
7177
|
Vue.config = singletonApp.config;
|
|
7177
7178
|
Vue.use = (p, ...options) => {
|
|
7178
7179
|
if (p && isFunction(p.install)) {
|
|
@@ -10961,7 +10962,7 @@ const useSSRContext = () => {
|
|
|
10961
10962
|
const ctx = inject(ssrContextKey);
|
|
10962
10963
|
if (!ctx) {
|
|
10963
10964
|
warn$1(`Server rendering context not provided. Make sure to only call ` +
|
|
10964
|
-
|
|
10965
|
+
`useSSRContext() conditionally in the server build.`);
|
|
10965
10966
|
}
|
|
10966
10967
|
return ctx;
|
|
10967
10968
|
}
|
|
@@ -11184,7 +11185,7 @@ function isMemoSame(cached, memo) {
|
|
|
11184
11185
|
}
|
|
11185
11186
|
|
|
11186
11187
|
// Core API ------------------------------------------------------------------
|
|
11187
|
-
const version = "3.2.
|
|
11188
|
+
const version = "3.2.44";
|
|
11188
11189
|
/**
|
|
11189
11190
|
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
11190
11191
|
* @internal
|
|
@@ -11337,6 +11338,7 @@ function patchStyle(el, prev, next) {
|
|
|
11337
11338
|
}
|
|
11338
11339
|
}
|
|
11339
11340
|
}
|
|
11341
|
+
const semicolonRE = /[^\\];\s*$/;
|
|
11340
11342
|
const importantRE = /\s*!important$/;
|
|
11341
11343
|
function setStyle(style, name, val) {
|
|
11342
11344
|
if (isArray(val)) {
|
|
@@ -11345,6 +11347,11 @@ function setStyle(style, name, val) {
|
|
|
11345
11347
|
else {
|
|
11346
11348
|
if (val == null)
|
|
11347
11349
|
val = '';
|
|
11350
|
+
{
|
|
11351
|
+
if (semicolonRE.test(val)) {
|
|
11352
|
+
warn$1(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
11353
|
+
}
|
|
11354
|
+
}
|
|
11348
11355
|
if (name.startsWith('--')) {
|
|
11349
11356
|
// custom property definition
|
|
11350
11357
|
style.setProperty(name, val);
|