@vue/compiler-core 3.5.13 → 3.5.14
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1782,7 +1782,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1782
1782
|
if (parent.key === node) {
|
|
1783
1783
|
return !!parent.computed;
|
|
1784
1784
|
}
|
|
1785
|
-
return
|
|
1785
|
+
return true;
|
|
1786
1786
|
// no: class { NODE = value; }
|
|
1787
1787
|
// yes: class { [NODE] = value; }
|
|
1788
1788
|
// yes: class { key = NODE; }
|
|
@@ -2473,7 +2473,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2473
2473
|
"COMPILER_V_BIND_SYNC",
|
|
2474
2474
|
currentOptions,
|
|
2475
2475
|
currentProp.loc,
|
|
2476
|
-
currentProp.
|
|
2476
|
+
currentProp.arg.loc.source
|
|
2477
2477
|
)) {
|
|
2478
2478
|
currentProp.name = "model";
|
|
2479
2479
|
currentProp.modifiers.splice(syncIndex, 1);
|
|
@@ -3065,6 +3065,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3065
3065
|
}
|
|
3066
3066
|
}
|
|
3067
3067
|
let cachedAsArray = false;
|
|
3068
|
+
const slotCacheKeys = [];
|
|
3068
3069
|
if (toCache.length === children.length && node.type === 1) {
|
|
3069
3070
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) {
|
|
3070
3071
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -3074,6 +3075,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3074
3075
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
3075
3076
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
3076
3077
|
if (slot) {
|
|
3078
|
+
slotCacheKeys.push(context.cached.length);
|
|
3077
3079
|
slot.returns = getCacheExpression(
|
|
3078
3080
|
createArrayExpression(slot.returns)
|
|
3079
3081
|
);
|
|
@@ -3083,6 +3085,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3083
3085
|
const slotName = findDir(node, "slot", true);
|
|
3084
3086
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
3085
3087
|
if (slot) {
|
|
3088
|
+
slotCacheKeys.push(context.cached.length);
|
|
3086
3089
|
slot.returns = getCacheExpression(
|
|
3087
3090
|
createArrayExpression(slot.returns)
|
|
3088
3091
|
);
|
|
@@ -3092,9 +3095,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3092
3095
|
}
|
|
3093
3096
|
if (!cachedAsArray) {
|
|
3094
3097
|
for (const child of toCache) {
|
|
3098
|
+
slotCacheKeys.push(context.cached.length);
|
|
3095
3099
|
child.codegenNode = context.cache(child.codegenNode);
|
|
3096
3100
|
}
|
|
3097
3101
|
}
|
|
3102
|
+
if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
3103
|
+
node.codegenNode.children.properties.push(
|
|
3104
|
+
createObjectProperty(
|
|
3105
|
+
`__`,
|
|
3106
|
+
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
3107
|
+
)
|
|
3108
|
+
);
|
|
3109
|
+
}
|
|
3098
3110
|
function getCacheExpression(value) {
|
|
3099
3111
|
const exp = context.cache(value);
|
|
3100
3112
|
if (inFor && context.hmr) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1778,7 +1778,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1778
1778
|
if (parent.key === node) {
|
|
1779
1779
|
return !!parent.computed;
|
|
1780
1780
|
}
|
|
1781
|
-
return
|
|
1781
|
+
return true;
|
|
1782
1782
|
// no: class { NODE = value; }
|
|
1783
1783
|
// yes: class { [NODE] = value; }
|
|
1784
1784
|
// yes: class { key = NODE; }
|
|
@@ -2469,7 +2469,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2469
2469
|
"COMPILER_V_BIND_SYNC",
|
|
2470
2470
|
currentOptions,
|
|
2471
2471
|
currentProp.loc,
|
|
2472
|
-
currentProp.
|
|
2472
|
+
currentProp.arg.loc.source
|
|
2473
2473
|
)) {
|
|
2474
2474
|
currentProp.name = "model";
|
|
2475
2475
|
currentProp.modifiers.splice(syncIndex, 1);
|
|
@@ -3024,6 +3024,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3024
3024
|
}
|
|
3025
3025
|
}
|
|
3026
3026
|
let cachedAsArray = false;
|
|
3027
|
+
const slotCacheKeys = [];
|
|
3027
3028
|
if (toCache.length === children.length && node.type === 1) {
|
|
3028
3029
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) {
|
|
3029
3030
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -3033,6 +3034,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3033
3034
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
3034
3035
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
3035
3036
|
if (slot) {
|
|
3037
|
+
slotCacheKeys.push(context.cached.length);
|
|
3036
3038
|
slot.returns = getCacheExpression(
|
|
3037
3039
|
createArrayExpression(slot.returns)
|
|
3038
3040
|
);
|
|
@@ -3042,6 +3044,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3042
3044
|
const slotName = findDir(node, "slot", true);
|
|
3043
3045
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
3044
3046
|
if (slot) {
|
|
3047
|
+
slotCacheKeys.push(context.cached.length);
|
|
3045
3048
|
slot.returns = getCacheExpression(
|
|
3046
3049
|
createArrayExpression(slot.returns)
|
|
3047
3050
|
);
|
|
@@ -3051,9 +3054,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
3051
3054
|
}
|
|
3052
3055
|
if (!cachedAsArray) {
|
|
3053
3056
|
for (const child of toCache) {
|
|
3057
|
+
slotCacheKeys.push(context.cached.length);
|
|
3054
3058
|
child.codegenNode = context.cache(child.codegenNode);
|
|
3055
3059
|
}
|
|
3056
3060
|
}
|
|
3061
|
+
if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
3062
|
+
node.codegenNode.children.properties.push(
|
|
3063
|
+
createObjectProperty(
|
|
3064
|
+
`__`,
|
|
3065
|
+
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
3066
|
+
)
|
|
3067
|
+
);
|
|
3068
|
+
}
|
|
3057
3069
|
function getCacheExpression(value) {
|
|
3058
3070
|
const exp = context.cache(value);
|
|
3059
3071
|
if (inFor && context.hmr) {
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { isString, NOOP, isObject,
|
|
6
|
+
import { isString, NOOP, isObject, extend, NO, isSymbol, isArray, capitalize, camelize, EMPTY_OBJ, PatchFlagNames, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared';
|
|
7
7
|
export { generateCodeFrame } from '@vue/shared';
|
|
8
8
|
|
|
9
9
|
const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``);
|
|
@@ -1535,7 +1535,7 @@ function isForStatement(stmt) {
|
|
|
1535
1535
|
}
|
|
1536
1536
|
function walkForStatement(stmt, isVar, onIdent) {
|
|
1537
1537
|
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
1538
|
-
if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar :
|
|
1538
|
+
if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : false)) {
|
|
1539
1539
|
for (const decl of variable.declarations) {
|
|
1540
1540
|
for (const id of extractIdentifiers(decl.id)) {
|
|
1541
1541
|
onIdent(id);
|
|
@@ -2153,7 +2153,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2153
2153
|
"COMPILER_V_BIND_SYNC",
|
|
2154
2154
|
currentOptions,
|
|
2155
2155
|
currentProp.loc,
|
|
2156
|
-
currentProp.
|
|
2156
|
+
currentProp.arg.loc.source
|
|
2157
2157
|
)) {
|
|
2158
2158
|
currentProp.name = "model";
|
|
2159
2159
|
currentProp.modifiers.splice(syncIndex, 1);
|
|
@@ -2729,6 +2729,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2729
2729
|
}
|
|
2730
2730
|
}
|
|
2731
2731
|
let cachedAsArray = false;
|
|
2732
|
+
const slotCacheKeys = [];
|
|
2732
2733
|
if (toCache.length === children.length && node.type === 1) {
|
|
2733
2734
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
2734
2735
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -2738,6 +2739,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2738
2739
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
2739
2740
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
2740
2741
|
if (slot) {
|
|
2742
|
+
slotCacheKeys.push(context.cached.length);
|
|
2741
2743
|
slot.returns = getCacheExpression(
|
|
2742
2744
|
createArrayExpression(slot.returns)
|
|
2743
2745
|
);
|
|
@@ -2747,6 +2749,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2747
2749
|
const slotName = findDir(node, "slot", true);
|
|
2748
2750
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
2749
2751
|
if (slot) {
|
|
2752
|
+
slotCacheKeys.push(context.cached.length);
|
|
2750
2753
|
slot.returns = getCacheExpression(
|
|
2751
2754
|
createArrayExpression(slot.returns)
|
|
2752
2755
|
);
|
|
@@ -2756,9 +2759,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2756
2759
|
}
|
|
2757
2760
|
if (!cachedAsArray) {
|
|
2758
2761
|
for (const child of toCache) {
|
|
2762
|
+
slotCacheKeys.push(context.cached.length);
|
|
2759
2763
|
child.codegenNode = context.cache(child.codegenNode);
|
|
2760
2764
|
}
|
|
2761
2765
|
}
|
|
2766
|
+
if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
2767
|
+
node.codegenNode.children.properties.push(
|
|
2768
|
+
createObjectProperty(
|
|
2769
|
+
`__`,
|
|
2770
|
+
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
2771
|
+
)
|
|
2772
|
+
);
|
|
2773
|
+
}
|
|
2762
2774
|
function getCacheExpression(value) {
|
|
2763
2775
|
const exp = context.cache(value);
|
|
2764
2776
|
if (inFor && context.hmr) {
|
|
@@ -5490,8 +5502,7 @@ const transformModel = (dir, node, context) => {
|
|
|
5490
5502
|
context.onError(createCompilerError(44, exp.loc));
|
|
5491
5503
|
return createTransformProps();
|
|
5492
5504
|
}
|
|
5493
|
-
|
|
5494
|
-
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
5505
|
+
if (!expString.trim() || !isMemberExpression(exp) && true) {
|
|
5495
5506
|
context.onError(
|
|
5496
5507
|
createCompilerError(42, exp.loc)
|
|
5497
5508
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.14",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@babel/parser": "^7.
|
|
49
|
+
"@babel/parser": "^7.27.2",
|
|
50
50
|
"entities": "^4.5.0",
|
|
51
51
|
"estree-walker": "^2.0.2",
|
|
52
|
-
"source-map-js": "^1.2.
|
|
53
|
-
"@vue/shared": "3.5.
|
|
52
|
+
"source-map-js": "^1.2.1",
|
|
53
|
+
"@vue/shared": "3.5.14"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/types": "^7.
|
|
56
|
+
"@babel/types": "^7.27.1"
|
|
57
57
|
}
|
|
58
58
|
}
|