@vue/compiler-core 3.5.20 → 3.5.21
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.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1996,7 +1996,7 @@ const isMemberExpressionNode = (exp, context) => {
|
|
|
1996
1996
|
}
|
|
1997
1997
|
};
|
|
1998
1998
|
const isMemberExpression = isMemberExpressionNode;
|
|
1999
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
1999
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
2000
2000
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
2001
2001
|
const isFnExpressionNode = (exp, context) => {
|
|
2002
2002
|
try {
|
|
@@ -4620,7 +4620,7 @@ function isConst(type) {
|
|
|
4620
4620
|
}
|
|
4621
4621
|
|
|
4622
4622
|
const transformIf = createStructuralDirectiveTransform(
|
|
4623
|
-
/^(if|else|else-if)$/,
|
|
4623
|
+
/^(?:if|else|else-if)$/,
|
|
4624
4624
|
(node, dir, context) => {
|
|
4625
4625
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
4626
4626
|
const siblings = context.parent.children;
|
|
@@ -5217,7 +5217,9 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
5217
5217
|
const dynamicSlots = [];
|
|
5218
5218
|
let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
|
|
5219
5219
|
if (!context.ssr && context.prefixIdentifiers) {
|
|
5220
|
-
hasDynamicSlots =
|
|
5220
|
+
hasDynamicSlots = node.props.some(
|
|
5221
|
+
(prop) => isVSlot(prop) && (hasScopeRef(prop.arg, context.identifiers) || hasScopeRef(prop.exp, context.identifiers))
|
|
5222
|
+
) || children.some((child) => hasScopeRef(child, context.identifiers));
|
|
5221
5223
|
}
|
|
5222
5224
|
const onComponentSlot = findDir(node, "slot", true);
|
|
5223
5225
|
if (onComponentSlot) {
|
|
@@ -5280,7 +5282,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
5280
5282
|
);
|
|
5281
5283
|
} else if (vElse = findDir(
|
|
5282
5284
|
slotElement,
|
|
5283
|
-
/^else(
|
|
5285
|
+
/^else(?:-if)?$/,
|
|
5284
5286
|
true
|
|
5285
5287
|
/* allowEmpty */
|
|
5286
5288
|
)) {
|
|
@@ -5292,7 +5294,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
5292
5294
|
break;
|
|
5293
5295
|
}
|
|
5294
5296
|
}
|
|
5295
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
5297
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
5296
5298
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
5297
5299
|
while (conditional.alternate.type === 19) {
|
|
5298
5300
|
conditional = conditional.alternate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1992,7 +1992,7 @@ const isMemberExpressionNode = (exp, context) => {
|
|
|
1992
1992
|
}
|
|
1993
1993
|
};
|
|
1994
1994
|
const isMemberExpression = isMemberExpressionNode;
|
|
1995
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
1995
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
1996
1996
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
1997
1997
|
const isFnExpressionNode = (exp, context) => {
|
|
1998
1998
|
try {
|
|
@@ -4544,7 +4544,7 @@ function isConst(type) {
|
|
|
4544
4544
|
}
|
|
4545
4545
|
|
|
4546
4546
|
const transformIf = createStructuralDirectiveTransform(
|
|
4547
|
-
/^(if|else|else-if)$/,
|
|
4547
|
+
/^(?:if|else|else-if)$/,
|
|
4548
4548
|
(node, dir, context) => {
|
|
4549
4549
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
4550
4550
|
const siblings = context.parent.children;
|
|
@@ -5132,7 +5132,9 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
5132
5132
|
const dynamicSlots = [];
|
|
5133
5133
|
let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
|
|
5134
5134
|
if (!context.ssr && context.prefixIdentifiers) {
|
|
5135
|
-
hasDynamicSlots =
|
|
5135
|
+
hasDynamicSlots = node.props.some(
|
|
5136
|
+
(prop) => isVSlot(prop) && (hasScopeRef(prop.arg, context.identifiers) || hasScopeRef(prop.exp, context.identifiers))
|
|
5137
|
+
) || children.some((child) => hasScopeRef(child, context.identifiers));
|
|
5136
5138
|
}
|
|
5137
5139
|
const onComponentSlot = findDir(node, "slot", true);
|
|
5138
5140
|
if (onComponentSlot) {
|
|
@@ -5195,7 +5197,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
5195
5197
|
);
|
|
5196
5198
|
} else if (vElse = findDir(
|
|
5197
5199
|
slotElement,
|
|
5198
|
-
/^else(
|
|
5200
|
+
/^else(?:-if)?$/,
|
|
5199
5201
|
true
|
|
5200
5202
|
/* allowEmpty */
|
|
5201
5203
|
)) {
|
|
@@ -5207,7 +5209,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
5207
5209
|
break;
|
|
5208
5210
|
}
|
|
5209
5211
|
}
|
|
5210
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
5212
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
5211
5213
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
5212
5214
|
while (conditional.alternate.type === 19) {
|
|
5213
5215
|
conditional = conditional.alternate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1690,7 +1690,7 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
1690
1690
|
};
|
|
1691
1691
|
const isMemberExpressionNode = NOOP ;
|
|
1692
1692
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
1693
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
1693
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
1694
1694
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
1695
1695
|
const isFnExpressionNode = NOOP ;
|
|
1696
1696
|
const isFnExpression = isFnExpressionBrowser ;
|
|
@@ -3908,7 +3908,7 @@ function stringifyExpression(exp) {
|
|
|
3908
3908
|
}
|
|
3909
3909
|
|
|
3910
3910
|
const transformIf = createStructuralDirectiveTransform(
|
|
3911
|
-
/^(if|else|else-if)$/,
|
|
3911
|
+
/^(?:if|else|else-if)$/,
|
|
3912
3912
|
(node, dir, context) => {
|
|
3913
3913
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
3914
3914
|
const siblings = context.parent.children;
|
|
@@ -4514,7 +4514,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
4514
4514
|
);
|
|
4515
4515
|
} else if (vElse = findDir(
|
|
4516
4516
|
slotElement,
|
|
4517
|
-
/^else(
|
|
4517
|
+
/^else(?:-if)?$/,
|
|
4518
4518
|
true
|
|
4519
4519
|
/* allowEmpty */
|
|
4520
4520
|
)) {
|
|
@@ -4526,7 +4526,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
4526
4526
|
break;
|
|
4527
4527
|
}
|
|
4528
4528
|
}
|
|
4529
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
4529
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
4530
4530
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
4531
4531
|
while (conditional.alternate.type === 19) {
|
|
4532
4532
|
conditional = conditional.alternate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.21",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"entities": "^4.5.0",
|
|
51
51
|
"estree-walker": "^2.0.2",
|
|
52
52
|
"source-map-js": "^1.2.1",
|
|
53
|
-
"@vue/shared": "3.5.
|
|
53
|
+
"@vue/shared": "3.5.21"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.28.2"
|