@vue/compiler-core 3.6.0-alpha.1 → 3.6.0-alpha.3
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/compiler-core.cjs.js +168 -128
- package/dist/compiler-core.cjs.prod.js +168 -128
- package/dist/compiler-core.d.ts +6 -2
- package/dist/compiler-core.esm-bundler.js +119 -106
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.6.0-alpha.
|
|
2
|
+
* @vue/compiler-core v3.6.0-alpha.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { isString, NOOP, isObject, extend, NO, isSymbol, isArray, EMPTY_OBJ, capitalize, camelize,
|
|
6
|
+
import { isString, NOOP, isObject, extend, NO, isSymbol, PatchFlagNames, isArray, EMPTY_OBJ, capitalize, camelize, makeMap, 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` : ``);
|
|
@@ -1514,7 +1514,8 @@ function walkFunctionParams(node, onIdent) {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
function walkBlockDeclarations(block, onIdent) {
|
|
1517
|
-
|
|
1517
|
+
const body = block.type === "SwitchCase" ? block.consequent : block.body;
|
|
1518
|
+
for (const stmt of body) {
|
|
1518
1519
|
if (stmt.type === "VariableDeclaration") {
|
|
1519
1520
|
if (stmt.declare) continue;
|
|
1520
1521
|
for (const decl of stmt.declarations) {
|
|
@@ -1527,6 +1528,8 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
1527
1528
|
onIdent(stmt.id);
|
|
1528
1529
|
} else if (isForStatement(stmt)) {
|
|
1529
1530
|
walkForStatement(stmt, true, onIdent);
|
|
1531
|
+
} else if (stmt.type === "SwitchStatement") {
|
|
1532
|
+
walkSwitchStatement(stmt, true, onIdent);
|
|
1530
1533
|
}
|
|
1531
1534
|
}
|
|
1532
1535
|
}
|
|
@@ -1543,6 +1546,20 @@ function walkForStatement(stmt, isVar, onIdent) {
|
|
|
1543
1546
|
}
|
|
1544
1547
|
}
|
|
1545
1548
|
}
|
|
1549
|
+
function walkSwitchStatement(stmt, isVar, onIdent) {
|
|
1550
|
+
for (const cs of stmt.cases) {
|
|
1551
|
+
for (const stmt2 of cs.consequent) {
|
|
1552
|
+
if (stmt2.type === "VariableDeclaration" && (stmt2.kind === "var" ? isVar : !isVar)) {
|
|
1553
|
+
for (const decl of stmt2.declarations) {
|
|
1554
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
1555
|
+
onIdent(id);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
walkBlockDeclarations(cs, onIdent);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1546
1563
|
function extractIdentifiers(param, nodes = []) {
|
|
1547
1564
|
switch (param.type) {
|
|
1548
1565
|
case "Identifier":
|
|
@@ -1673,7 +1690,7 @@ function isCoreComponent(tag) {
|
|
|
1673
1690
|
return BASE_TRANSITION;
|
|
1674
1691
|
}
|
|
1675
1692
|
}
|
|
1676
|
-
const nonIdentifierRE =
|
|
1693
|
+
const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
|
|
1677
1694
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
1678
1695
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
1679
1696
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
@@ -1743,7 +1760,7 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
1743
1760
|
};
|
|
1744
1761
|
const isMemberExpressionNode = NOOP ;
|
|
1745
1762
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
1746
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
1763
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
1747
1764
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
1748
1765
|
const isFnExpressionNode = NOOP ;
|
|
1749
1766
|
const isFnExpression = isFnExpressionBrowser ;
|
|
@@ -1812,6 +1829,9 @@ function hasDynamicKeyVBind(node) {
|
|
|
1812
1829
|
function isText$1(node) {
|
|
1813
1830
|
return node.type === 5 || node.type === 2;
|
|
1814
1831
|
}
|
|
1832
|
+
function isVPre(p) {
|
|
1833
|
+
return p.type === 7 && p.name === "pre";
|
|
1834
|
+
}
|
|
1815
1835
|
function isVSlot(p) {
|
|
1816
1836
|
return p.type === 7 && p.name === "slot";
|
|
1817
1837
|
}
|
|
@@ -2111,7 +2131,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2111
2131
|
ondirarg(start, end) {
|
|
2112
2132
|
if (start === end) return;
|
|
2113
2133
|
const arg = getSlice(start, end);
|
|
2114
|
-
if (inVPre) {
|
|
2134
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
2115
2135
|
currentProp.name += arg;
|
|
2116
2136
|
setLocEnd(currentProp.nameLoc, end);
|
|
2117
2137
|
} else {
|
|
@@ -2126,7 +2146,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2126
2146
|
},
|
|
2127
2147
|
ondirmodifier(start, end) {
|
|
2128
2148
|
const mod = getSlice(start, end);
|
|
2129
|
-
if (inVPre) {
|
|
2149
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
2130
2150
|
currentProp.name += "." + mod;
|
|
2131
2151
|
setLocEnd(currentProp.nameLoc, end);
|
|
2132
2152
|
} else if (currentProp.name === "slot") {
|
|
@@ -2754,6 +2774,11 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2754
2774
|
} else if (child.type === 12) {
|
|
2755
2775
|
const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
|
|
2756
2776
|
if (constantType >= 2) {
|
|
2777
|
+
if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
|
|
2778
|
+
child.codegenNode.arguments.push(
|
|
2779
|
+
-1 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[-1]} */` : ``)
|
|
2780
|
+
);
|
|
2781
|
+
}
|
|
2757
2782
|
toCache.push(child);
|
|
2758
2783
|
continue;
|
|
2759
2784
|
}
|
|
@@ -2782,7 +2807,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2782
2807
|
}
|
|
2783
2808
|
}
|
|
2784
2809
|
let cachedAsArray = false;
|
|
2785
|
-
const slotCacheKeys = [];
|
|
2786
2810
|
if (toCache.length === children.length && node.type === 1) {
|
|
2787
2811
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
2788
2812
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -2792,7 +2816,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2792
2816
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
2793
2817
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
2794
2818
|
if (slot) {
|
|
2795
|
-
slotCacheKeys.push(context.cached.length);
|
|
2796
2819
|
slot.returns = getCacheExpression(
|
|
2797
2820
|
createArrayExpression(slot.returns)
|
|
2798
2821
|
);
|
|
@@ -2802,7 +2825,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2802
2825
|
const slotName = findDir(node, "slot", true);
|
|
2803
2826
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
2804
2827
|
if (slot) {
|
|
2805
|
-
slotCacheKeys.push(context.cached.length);
|
|
2806
2828
|
slot.returns = getCacheExpression(
|
|
2807
2829
|
createArrayExpression(slot.returns)
|
|
2808
2830
|
);
|
|
@@ -2812,23 +2834,12 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
2812
2834
|
}
|
|
2813
2835
|
if (!cachedAsArray) {
|
|
2814
2836
|
for (const child of toCache) {
|
|
2815
|
-
slotCacheKeys.push(context.cached.length);
|
|
2816
2837
|
child.codegenNode = context.cache(child.codegenNode);
|
|
2817
2838
|
}
|
|
2818
2839
|
}
|
|
2819
|
-
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) {
|
|
2820
|
-
node.codegenNode.children.properties.push(
|
|
2821
|
-
createObjectProperty(
|
|
2822
|
-
`__`,
|
|
2823
|
-
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
2824
|
-
)
|
|
2825
|
-
);
|
|
2826
|
-
}
|
|
2827
2840
|
function getCacheExpression(value) {
|
|
2828
2841
|
const exp = context.cache(value);
|
|
2829
|
-
|
|
2830
|
-
exp.needArraySpread = true;
|
|
2831
|
-
}
|
|
2842
|
+
exp.needArraySpread = true;
|
|
2832
2843
|
return exp;
|
|
2833
2844
|
}
|
|
2834
2845
|
function getSlotNode(node2, name) {
|
|
@@ -3982,7 +3993,7 @@ function stringifyExpression(exp) {
|
|
|
3982
3993
|
}
|
|
3983
3994
|
|
|
3984
3995
|
const transformIf = createStructuralDirectiveTransform(
|
|
3985
|
-
/^(if|else|else-if)$/,
|
|
3996
|
+
/^(?:if|else|else-if)$/,
|
|
3986
3997
|
(node, dir, context) => {
|
|
3987
3998
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
3988
3999
|
const siblings = context.parent.children;
|
|
@@ -4051,7 +4062,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
4051
4062
|
continue;
|
|
4052
4063
|
}
|
|
4053
4064
|
if (sibling && sibling.type === 9) {
|
|
4054
|
-
if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
4065
|
+
if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
4055
4066
|
context.onError(
|
|
4056
4067
|
createCompilerError(30, node.loc)
|
|
4057
4068
|
);
|
|
@@ -4200,80 +4211,6 @@ function getParentCondition(node) {
|
|
|
4200
4211
|
}
|
|
4201
4212
|
}
|
|
4202
4213
|
|
|
4203
|
-
const transformBind = (dir, _node, context) => {
|
|
4204
|
-
const { modifiers, loc } = dir;
|
|
4205
|
-
const arg = dir.arg;
|
|
4206
|
-
let { exp } = dir;
|
|
4207
|
-
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
4208
|
-
{
|
|
4209
|
-
exp = void 0;
|
|
4210
|
-
}
|
|
4211
|
-
}
|
|
4212
|
-
if (!exp) {
|
|
4213
|
-
if (arg.type !== 4 || !arg.isStatic) {
|
|
4214
|
-
context.onError(
|
|
4215
|
-
createCompilerError(
|
|
4216
|
-
52,
|
|
4217
|
-
arg.loc
|
|
4218
|
-
)
|
|
4219
|
-
);
|
|
4220
|
-
return {
|
|
4221
|
-
props: [
|
|
4222
|
-
createObjectProperty(arg, createSimpleExpression("", true, loc))
|
|
4223
|
-
]
|
|
4224
|
-
};
|
|
4225
|
-
}
|
|
4226
|
-
transformBindShorthand(dir);
|
|
4227
|
-
exp = dir.exp;
|
|
4228
|
-
}
|
|
4229
|
-
if (arg.type !== 4) {
|
|
4230
|
-
arg.children.unshift(`(`);
|
|
4231
|
-
arg.children.push(`) || ""`);
|
|
4232
|
-
} else if (!arg.isStatic) {
|
|
4233
|
-
arg.content = `${arg.content} || ""`;
|
|
4234
|
-
}
|
|
4235
|
-
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
4236
|
-
if (arg.type === 4) {
|
|
4237
|
-
if (arg.isStatic) {
|
|
4238
|
-
arg.content = camelize(arg.content);
|
|
4239
|
-
} else {
|
|
4240
|
-
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
4241
|
-
}
|
|
4242
|
-
} else {
|
|
4243
|
-
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
4244
|
-
arg.children.push(`)`);
|
|
4245
|
-
}
|
|
4246
|
-
}
|
|
4247
|
-
if (!context.inSSR) {
|
|
4248
|
-
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
4249
|
-
injectPrefix(arg, ".");
|
|
4250
|
-
}
|
|
4251
|
-
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
4252
|
-
injectPrefix(arg, "^");
|
|
4253
|
-
}
|
|
4254
|
-
}
|
|
4255
|
-
return {
|
|
4256
|
-
props: [createObjectProperty(arg, exp)]
|
|
4257
|
-
};
|
|
4258
|
-
};
|
|
4259
|
-
const transformBindShorthand = (dir, context) => {
|
|
4260
|
-
const arg = dir.arg;
|
|
4261
|
-
const propName = camelize(arg.content);
|
|
4262
|
-
dir.exp = createSimpleExpression(propName, false, arg.loc);
|
|
4263
|
-
};
|
|
4264
|
-
const injectPrefix = (arg, prefix) => {
|
|
4265
|
-
if (arg.type === 4) {
|
|
4266
|
-
if (arg.isStatic) {
|
|
4267
|
-
arg.content = prefix + arg.content;
|
|
4268
|
-
} else {
|
|
4269
|
-
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
4270
|
-
}
|
|
4271
|
-
} else {
|
|
4272
|
-
arg.children.unshift(`'${prefix}' + (`);
|
|
4273
|
-
arg.children.push(`)`);
|
|
4274
|
-
}
|
|
4275
|
-
};
|
|
4276
|
-
|
|
4277
4214
|
const transformFor = createStructuralDirectiveTransform(
|
|
4278
4215
|
"for",
|
|
4279
4216
|
(node, dir, context) => {
|
|
@@ -4285,10 +4222,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
4285
4222
|
const isTemplate = isTemplateNode(node);
|
|
4286
4223
|
const memo = findDir(node, "memo");
|
|
4287
4224
|
const keyProp = findProp(node, `key`, false, true);
|
|
4288
|
-
|
|
4289
|
-
if (isDirKey && !keyProp.exp) {
|
|
4290
|
-
transformBindShorthand(keyProp);
|
|
4291
|
-
}
|
|
4225
|
+
keyProp && keyProp.type === 7;
|
|
4292
4226
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
4293
4227
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
4294
4228
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
@@ -4588,7 +4522,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
4588
4522
|
);
|
|
4589
4523
|
} else if (vElse = findDir(
|
|
4590
4524
|
slotElement,
|
|
4591
|
-
/^else(
|
|
4525
|
+
/^else(?:-if)?$/,
|
|
4592
4526
|
true
|
|
4593
4527
|
/* allowEmpty */
|
|
4594
4528
|
)) {
|
|
@@ -4600,7 +4534,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
4600
4534
|
break;
|
|
4601
4535
|
}
|
|
4602
4536
|
}
|
|
4603
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
4537
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
4604
4538
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
4605
4539
|
while (conditional.alternate.type === 19) {
|
|
4606
4540
|
conditional = conditional.alternate;
|
|
@@ -5460,6 +5394,58 @@ const transformOn = (dir, node, context, augmentor) => {
|
|
|
5460
5394
|
return ret;
|
|
5461
5395
|
};
|
|
5462
5396
|
|
|
5397
|
+
const transformBind = (dir, _node, context) => {
|
|
5398
|
+
const { modifiers, loc } = dir;
|
|
5399
|
+
const arg = dir.arg;
|
|
5400
|
+
let { exp } = dir;
|
|
5401
|
+
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
5402
|
+
{
|
|
5403
|
+
exp = void 0;
|
|
5404
|
+
}
|
|
5405
|
+
}
|
|
5406
|
+
if (arg.type !== 4) {
|
|
5407
|
+
arg.children.unshift(`(`);
|
|
5408
|
+
arg.children.push(`) || ""`);
|
|
5409
|
+
} else if (!arg.isStatic) {
|
|
5410
|
+
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
5411
|
+
}
|
|
5412
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
5413
|
+
if (arg.type === 4) {
|
|
5414
|
+
if (arg.isStatic) {
|
|
5415
|
+
arg.content = camelize(arg.content);
|
|
5416
|
+
} else {
|
|
5417
|
+
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
5418
|
+
}
|
|
5419
|
+
} else {
|
|
5420
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
5421
|
+
arg.children.push(`)`);
|
|
5422
|
+
}
|
|
5423
|
+
}
|
|
5424
|
+
if (!context.inSSR) {
|
|
5425
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
5426
|
+
injectPrefix(arg, ".");
|
|
5427
|
+
}
|
|
5428
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
5429
|
+
injectPrefix(arg, "^");
|
|
5430
|
+
}
|
|
5431
|
+
}
|
|
5432
|
+
return {
|
|
5433
|
+
props: [createObjectProperty(arg, exp)]
|
|
5434
|
+
};
|
|
5435
|
+
};
|
|
5436
|
+
const injectPrefix = (arg, prefix) => {
|
|
5437
|
+
if (arg.type === 4) {
|
|
5438
|
+
if (arg.isStatic) {
|
|
5439
|
+
arg.content = prefix + arg.content;
|
|
5440
|
+
} else {
|
|
5441
|
+
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
5442
|
+
}
|
|
5443
|
+
} else {
|
|
5444
|
+
arg.children.unshift(`'${prefix}' + (`);
|
|
5445
|
+
arg.children.push(`)`);
|
|
5446
|
+
}
|
|
5447
|
+
};
|
|
5448
|
+
|
|
5463
5449
|
const transformText = (node, context) => {
|
|
5464
5450
|
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
5465
5451
|
return () => {
|
|
@@ -5768,7 +5754,7 @@ const seen = /* @__PURE__ */ new WeakSet();
|
|
|
5768
5754
|
const transformMemo = (node, context) => {
|
|
5769
5755
|
if (node.type === 1) {
|
|
5770
5756
|
const dir = findDir(node, "memo");
|
|
5771
|
-
if (!dir || seen.has(node)) {
|
|
5757
|
+
if (!dir || seen.has(node) || context.inSSR) {
|
|
5772
5758
|
return;
|
|
5773
5759
|
}
|
|
5774
5760
|
seen.add(node);
|
|
@@ -5790,9 +5776,36 @@ const transformMemo = (node, context) => {
|
|
|
5790
5776
|
}
|
|
5791
5777
|
};
|
|
5792
5778
|
|
|
5779
|
+
const transformVBindShorthand = (node, context) => {
|
|
5780
|
+
if (node.type === 1) {
|
|
5781
|
+
for (const prop of node.props) {
|
|
5782
|
+
if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
|
|
5783
|
+
prop.exp.type === 4 && !prop.exp.content.trim()) && prop.arg) {
|
|
5784
|
+
const arg = prop.arg;
|
|
5785
|
+
if (arg.type !== 4 || !arg.isStatic) {
|
|
5786
|
+
context.onError(
|
|
5787
|
+
createCompilerError(
|
|
5788
|
+
52,
|
|
5789
|
+
arg.loc
|
|
5790
|
+
)
|
|
5791
|
+
);
|
|
5792
|
+
prop.exp = createSimpleExpression("", true, arg.loc);
|
|
5793
|
+
} else {
|
|
5794
|
+
const propName = camelize(arg.content);
|
|
5795
|
+
if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
|
|
5796
|
+
propName[0] === "-") {
|
|
5797
|
+
prop.exp = createSimpleExpression(propName, false, arg.loc);
|
|
5798
|
+
}
|
|
5799
|
+
}
|
|
5800
|
+
}
|
|
5801
|
+
}
|
|
5802
|
+
}
|
|
5803
|
+
};
|
|
5804
|
+
|
|
5793
5805
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
5794
5806
|
return [
|
|
5795
5807
|
[
|
|
5808
|
+
transformVBindShorthand,
|
|
5796
5809
|
transformOnce,
|
|
5797
5810
|
transformIf,
|
|
5798
5811
|
transformMemo,
|
|
@@ -5867,4 +5880,4 @@ const BindingTypes = {
|
|
|
5867
5880
|
|
|
5868
5881
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
5869
5882
|
|
|
5870
|
-
export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NewlineType, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TS_NODE_TYPES, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, defaultOnError, defaultOnWarn, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getSelfName, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isConstantNode, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isLiteralWhitelisted, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticNode, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
|
5883
|
+
export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NewlineType, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TS_NODE_TYPES, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, defaultOnError, defaultOnWarn, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getSelfName, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isConstantNode, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isLiteralWhitelisted, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticNode, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVPre, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, transformVBindShorthand, traverseNode, unwrapTSNode, validFirstIdentCharRE, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.6.0-alpha.
|
|
3
|
+
"version": "3.6.0-alpha.3",
|
|
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.28.5",
|
|
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.6.0-alpha.
|
|
53
|
+
"@vue/shared": "3.6.0-alpha.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/types": "^7.
|
|
56
|
+
"@babel/types": "^7.28.5"
|
|
57
57
|
}
|
|
58
58
|
}
|