@vue/compiler-core 3.3.0-alpha.9 → 3.3.0-beta.1
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.
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var shared = require('@vue/shared');
|
|
6
6
|
var parser = require('@babel/parser');
|
|
7
|
-
var
|
|
7
|
+
var sourceMapJs = require('source-map-js');
|
|
8
8
|
var estreeWalker = require('estree-walker');
|
|
9
9
|
|
|
10
10
|
function defaultOnError(error) {
|
|
@@ -77,8 +77,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
77
77
|
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
78
78
|
[49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
79
79
|
[50]: `"scopeId" option is only supported in module mode.`,
|
|
80
|
+
// deprecations
|
|
81
|
+
[51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
|
|
82
|
+
[52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
|
|
80
83
|
// just to fulfill types
|
|
81
|
-
[
|
|
84
|
+
[53]: ``
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
const FRAGMENT = Symbol(`Fragment` );
|
|
@@ -2079,7 +2082,7 @@ const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
|
|
|
2079
2082
|
function createCodegenContext(ast, {
|
|
2080
2083
|
mode = "function",
|
|
2081
2084
|
prefixIdentifiers = mode === "module",
|
|
2082
|
-
sourceMap
|
|
2085
|
+
sourceMap = false,
|
|
2083
2086
|
filename = `template.vue.html`,
|
|
2084
2087
|
scopeId = null,
|
|
2085
2088
|
optimizeImports = false,
|
|
@@ -2093,7 +2096,7 @@ function createCodegenContext(ast, {
|
|
|
2093
2096
|
const context = {
|
|
2094
2097
|
mode,
|
|
2095
2098
|
prefixIdentifiers,
|
|
2096
|
-
sourceMap
|
|
2099
|
+
sourceMap,
|
|
2097
2100
|
filename,
|
|
2098
2101
|
scopeId,
|
|
2099
2102
|
optimizeImports,
|
|
@@ -2165,8 +2168,8 @@ function createCodegenContext(ast, {
|
|
|
2165
2168
|
}
|
|
2166
2169
|
});
|
|
2167
2170
|
}
|
|
2168
|
-
if (sourceMap
|
|
2169
|
-
context.map = new
|
|
2171
|
+
if (sourceMap) {
|
|
2172
|
+
context.map = new sourceMapJs.SourceMapGenerator();
|
|
2170
2173
|
context.map.setSourceContent(filename, context.source);
|
|
2171
2174
|
}
|
|
2172
2175
|
return context;
|
|
@@ -2971,13 +2974,6 @@ const isFunctionType = (node) => {
|
|
|
2971
2974
|
};
|
|
2972
2975
|
const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed;
|
|
2973
2976
|
const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
|
|
2974
|
-
function getImportedName(specifier) {
|
|
2975
|
-
if (specifier.type === "ImportSpecifier")
|
|
2976
|
-
return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value;
|
|
2977
|
-
else if (specifier.type === "ImportNamespaceSpecifier")
|
|
2978
|
-
return "*";
|
|
2979
|
-
return "default";
|
|
2980
|
-
}
|
|
2981
2977
|
function isReferenced(node, parent, grandparent) {
|
|
2982
2978
|
switch (parent.type) {
|
|
2983
2979
|
case "MemberExpression":
|
|
@@ -3077,16 +3073,6 @@ const TS_NODE_TYPES = [
|
|
|
3077
3073
|
"TSSatisfiesExpression"
|
|
3078
3074
|
// foo satisfies T
|
|
3079
3075
|
];
|
|
3080
|
-
function unwrapTSNode(node) {
|
|
3081
|
-
if (TS_NODE_TYPES.includes(node.type)) {
|
|
3082
|
-
return unwrapTSNode(node.expression);
|
|
3083
|
-
} else {
|
|
3084
|
-
return node;
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
|
-
function isCallOf(node, test) {
|
|
3088
|
-
return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name)));
|
|
3089
|
-
}
|
|
3090
3076
|
|
|
3091
3077
|
const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this");
|
|
3092
3078
|
const transformExpression = (node, context) => {
|
|
@@ -3167,12 +3153,10 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
3167
3153
|
return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]);
|
|
3168
3154
|
}
|
|
3169
3155
|
} else {
|
|
3170
|
-
if (type && type.startsWith("setup")) {
|
|
3156
|
+
if (type && type.startsWith("setup") || type === "literal-const") {
|
|
3171
3157
|
return `$setup.${raw}`;
|
|
3172
3158
|
} else if (type === "props-aliased") {
|
|
3173
3159
|
return `$props['${bindingMetadata.__propsAliases[raw]}']`;
|
|
3174
|
-
} else if (type === "literal-const") {
|
|
3175
|
-
return raw;
|
|
3176
3160
|
} else if (type) {
|
|
3177
3161
|
return `$${type}.${raw}`;
|
|
3178
3162
|
}
|
|
@@ -4223,6 +4207,11 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
4223
4207
|
}
|
|
4224
4208
|
const isDir = !isExplicitDynamic && findDir(node, "is");
|
|
4225
4209
|
if (isDir && isDir.exp) {
|
|
4210
|
+
{
|
|
4211
|
+
context.onWarn(
|
|
4212
|
+
createCompilerError(52, isDir.loc)
|
|
4213
|
+
);
|
|
4214
|
+
}
|
|
4226
4215
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
4227
4216
|
isDir.exp
|
|
4228
4217
|
]);
|
|
@@ -4794,6 +4783,11 @@ const transformOn = (dir, node, context, augmentor) => {
|
|
|
4794
4783
|
if (arg.type === 4) {
|
|
4795
4784
|
if (arg.isStatic) {
|
|
4796
4785
|
let rawName = arg.content;
|
|
4786
|
+
if (rawName.startsWith("vnode")) {
|
|
4787
|
+
context.onWarn(
|
|
4788
|
+
createCompilerError(51, arg.loc)
|
|
4789
|
+
);
|
|
4790
|
+
}
|
|
4797
4791
|
if (rawName.startsWith("vue:")) {
|
|
4798
4792
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
4799
4793
|
}
|
|
@@ -5437,7 +5431,6 @@ exports.findProp = findProp;
|
|
|
5437
5431
|
exports.generate = generate;
|
|
5438
5432
|
exports.getBaseTransformPreset = getBaseTransformPreset;
|
|
5439
5433
|
exports.getConstantType = getConstantType;
|
|
5440
|
-
exports.getImportedName = getImportedName;
|
|
5441
5434
|
exports.getInnerRange = getInnerRange;
|
|
5442
5435
|
exports.getMemoedVNodeCall = getMemoedVNodeCall;
|
|
5443
5436
|
exports.getVNodeBlockHelper = getVNodeBlockHelper;
|
|
@@ -5447,7 +5440,6 @@ exports.hasScopeRef = hasScopeRef;
|
|
|
5447
5440
|
exports.helperNameMap = helperNameMap;
|
|
5448
5441
|
exports.injectProp = injectProp;
|
|
5449
5442
|
exports.isBuiltInType = isBuiltInType;
|
|
5450
|
-
exports.isCallOf = isCallOf;
|
|
5451
5443
|
exports.isCoreComponent = isCoreComponent;
|
|
5452
5444
|
exports.isFunctionType = isFunctionType;
|
|
5453
5445
|
exports.isInDestructureAssignment = isInDestructureAssignment;
|
|
@@ -5483,7 +5475,6 @@ exports.transformExpression = transformExpression;
|
|
|
5483
5475
|
exports.transformModel = transformModel;
|
|
5484
5476
|
exports.transformOn = transformOn;
|
|
5485
5477
|
exports.traverseNode = traverseNode;
|
|
5486
|
-
exports.unwrapTSNode = unwrapTSNode;
|
|
5487
5478
|
exports.walkBlockDeclarations = walkBlockDeclarations;
|
|
5488
5479
|
exports.walkFunctionParams = walkFunctionParams;
|
|
5489
5480
|
exports.walkIdentifiers = walkIdentifiers;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var shared = require('@vue/shared');
|
|
6
6
|
var parser = require('@babel/parser');
|
|
7
|
-
var
|
|
7
|
+
var sourceMapJs = require('source-map-js');
|
|
8
8
|
var estreeWalker = require('estree-walker');
|
|
9
9
|
|
|
10
10
|
function defaultOnError(error) {
|
|
@@ -76,8 +76,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
76
76
|
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
77
77
|
[49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
78
78
|
[50]: `"scopeId" option is only supported in module mode.`,
|
|
79
|
+
// deprecations
|
|
80
|
+
[51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
|
|
81
|
+
[52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
|
|
79
82
|
// just to fulfill types
|
|
80
|
-
[
|
|
83
|
+
[53]: ``
|
|
81
84
|
};
|
|
82
85
|
|
|
83
86
|
const FRAGMENT = Symbol(``);
|
|
@@ -2020,7 +2023,7 @@ const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
|
|
|
2020
2023
|
function createCodegenContext(ast, {
|
|
2021
2024
|
mode = "function",
|
|
2022
2025
|
prefixIdentifiers = mode === "module",
|
|
2023
|
-
sourceMap
|
|
2026
|
+
sourceMap = false,
|
|
2024
2027
|
filename = `template.vue.html`,
|
|
2025
2028
|
scopeId = null,
|
|
2026
2029
|
optimizeImports = false,
|
|
@@ -2034,7 +2037,7 @@ function createCodegenContext(ast, {
|
|
|
2034
2037
|
const context = {
|
|
2035
2038
|
mode,
|
|
2036
2039
|
prefixIdentifiers,
|
|
2037
|
-
sourceMap
|
|
2040
|
+
sourceMap,
|
|
2038
2041
|
filename,
|
|
2039
2042
|
scopeId,
|
|
2040
2043
|
optimizeImports,
|
|
@@ -2106,8 +2109,8 @@ function createCodegenContext(ast, {
|
|
|
2106
2109
|
}
|
|
2107
2110
|
});
|
|
2108
2111
|
}
|
|
2109
|
-
if (sourceMap
|
|
2110
|
-
context.map = new
|
|
2112
|
+
if (sourceMap) {
|
|
2113
|
+
context.map = new sourceMapJs.SourceMapGenerator();
|
|
2111
2114
|
context.map.setSourceContent(filename, context.source);
|
|
2112
2115
|
}
|
|
2113
2116
|
return context;
|
|
@@ -2900,13 +2903,6 @@ const isFunctionType = (node) => {
|
|
|
2900
2903
|
};
|
|
2901
2904
|
const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed;
|
|
2902
2905
|
const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
|
|
2903
|
-
function getImportedName(specifier) {
|
|
2904
|
-
if (specifier.type === "ImportSpecifier")
|
|
2905
|
-
return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value;
|
|
2906
|
-
else if (specifier.type === "ImportNamespaceSpecifier")
|
|
2907
|
-
return "*";
|
|
2908
|
-
return "default";
|
|
2909
|
-
}
|
|
2910
2906
|
function isReferenced(node, parent, grandparent) {
|
|
2911
2907
|
switch (parent.type) {
|
|
2912
2908
|
case "MemberExpression":
|
|
@@ -3006,16 +3002,6 @@ const TS_NODE_TYPES = [
|
|
|
3006
3002
|
"TSSatisfiesExpression"
|
|
3007
3003
|
// foo satisfies T
|
|
3008
3004
|
];
|
|
3009
|
-
function unwrapTSNode(node) {
|
|
3010
|
-
if (TS_NODE_TYPES.includes(node.type)) {
|
|
3011
|
-
return unwrapTSNode(node.expression);
|
|
3012
|
-
} else {
|
|
3013
|
-
return node;
|
|
3014
|
-
}
|
|
3015
|
-
}
|
|
3016
|
-
function isCallOf(node, test) {
|
|
3017
|
-
return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name)));
|
|
3018
|
-
}
|
|
3019
3005
|
|
|
3020
3006
|
const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this");
|
|
3021
3007
|
const transformExpression = (node, context) => {
|
|
@@ -3096,12 +3082,10 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
3096
3082
|
return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]);
|
|
3097
3083
|
}
|
|
3098
3084
|
} else {
|
|
3099
|
-
if (type && type.startsWith("setup")) {
|
|
3085
|
+
if (type && type.startsWith("setup") || type === "literal-const") {
|
|
3100
3086
|
return `$setup.${raw}`;
|
|
3101
3087
|
} else if (type === "props-aliased") {
|
|
3102
3088
|
return `$props['${bindingMetadata.__propsAliases[raw]}']`;
|
|
3103
|
-
} else if (type === "literal-const") {
|
|
3104
|
-
return raw;
|
|
3105
3089
|
} else if (type) {
|
|
3106
3090
|
return `$${type}.${raw}`;
|
|
3107
3091
|
}
|
|
@@ -5316,7 +5300,6 @@ exports.findProp = findProp;
|
|
|
5316
5300
|
exports.generate = generate;
|
|
5317
5301
|
exports.getBaseTransformPreset = getBaseTransformPreset;
|
|
5318
5302
|
exports.getConstantType = getConstantType;
|
|
5319
|
-
exports.getImportedName = getImportedName;
|
|
5320
5303
|
exports.getInnerRange = getInnerRange;
|
|
5321
5304
|
exports.getMemoedVNodeCall = getMemoedVNodeCall;
|
|
5322
5305
|
exports.getVNodeBlockHelper = getVNodeBlockHelper;
|
|
@@ -5326,7 +5309,6 @@ exports.hasScopeRef = hasScopeRef;
|
|
|
5326
5309
|
exports.helperNameMap = helperNameMap;
|
|
5327
5310
|
exports.injectProp = injectProp;
|
|
5328
5311
|
exports.isBuiltInType = isBuiltInType;
|
|
5329
|
-
exports.isCallOf = isCallOf;
|
|
5330
5312
|
exports.isCoreComponent = isCoreComponent;
|
|
5331
5313
|
exports.isFunctionType = isFunctionType;
|
|
5332
5314
|
exports.isInDestructureAssignment = isInDestructureAssignment;
|
|
@@ -5362,7 +5344,6 @@ exports.transformExpression = transformExpression;
|
|
|
5362
5344
|
exports.transformModel = transformModel;
|
|
5363
5345
|
exports.transformOn = transformOn;
|
|
5364
5346
|
exports.traverseNode = traverseNode;
|
|
5365
|
-
exports.unwrapTSNode = unwrapTSNode;
|
|
5366
5347
|
exports.walkBlockDeclarations = walkBlockDeclarations;
|
|
5367
5348
|
exports.walkFunctionParams = walkFunctionParams;
|
|
5368
5349
|
exports.walkIdentifiers = walkIdentifiers;
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ParserPlugin } from '@babel/parser';
|
|
2
|
-
import { RawSourceMap, SourceMapGenerator } from 'source-map';
|
|
3
|
-
import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty
|
|
2
|
+
import { RawSourceMap, SourceMapGenerator } from 'source-map-js';
|
|
3
|
+
import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types';
|
|
4
4
|
export { generateCodeFrame } from '@vue/shared';
|
|
5
5
|
|
|
6
6
|
type OptionalOptions = 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | keyof CompilerCompatOptions;
|
|
@@ -606,7 +606,9 @@ export declare const enum ErrorCodes {
|
|
|
606
606
|
X_MODULE_MODE_NOT_SUPPORTED = 48,
|
|
607
607
|
X_CACHE_HANDLER_NOT_SUPPORTED = 49,
|
|
608
608
|
X_SCOPE_ID_NOT_SUPPORTED = 50,
|
|
609
|
-
|
|
609
|
+
DEPRECATION_VNODE_HOOKS = 51,
|
|
610
|
+
DEPRECATION_V_IS = 52,
|
|
611
|
+
__EXTEND_POINT__ = 53
|
|
610
612
|
}
|
|
611
613
|
|
|
612
614
|
interface ErrorHandlingOptions {
|
|
@@ -956,10 +958,7 @@ export declare function extractIdentifiers(param: Node$1, nodes?: Identifier[]):
|
|
|
956
958
|
export declare const isFunctionType: (node: Node$1) => node is Function;
|
|
957
959
|
export declare const isStaticProperty: (node: Node$1) => node is ObjectProperty;
|
|
958
960
|
export declare const isStaticPropertyKey: (node: Node$1, parent: Node$1) => boolean;
|
|
959
|
-
export declare function getImportedName(specifier: ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier): string;
|
|
960
961
|
export declare const TS_NODE_TYPES: string[];
|
|
961
|
-
export declare function unwrapTSNode(node: Node$1): Node$1;
|
|
962
|
-
export declare function isCallOf(node: Node$1 | null | undefined, test: string | ((id: string) => boolean) | null | undefined): node is CallExpression$1;
|
|
963
962
|
|
|
964
963
|
export declare const transformModel: DirectiveTransform;
|
|
965
964
|
|
|
@@ -71,8 +71,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
71
71
|
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
72
72
|
[49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
73
73
|
[50]: `"scopeId" option is only supported in module mode.`,
|
|
74
|
+
// deprecations
|
|
75
|
+
[51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
|
|
76
|
+
[52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
|
|
74
77
|
// just to fulfill types
|
|
75
|
-
[
|
|
78
|
+
[53]: ``
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
const FRAGMENT = Symbol(process.env.NODE_ENV !== "production" ? `Fragment` : ``);
|
|
@@ -2676,13 +2679,6 @@ const isFunctionType = (node) => {
|
|
|
2676
2679
|
};
|
|
2677
2680
|
const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed;
|
|
2678
2681
|
const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
|
|
2679
|
-
function getImportedName(specifier) {
|
|
2680
|
-
if (specifier.type === "ImportSpecifier")
|
|
2681
|
-
return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value;
|
|
2682
|
-
else if (specifier.type === "ImportNamespaceSpecifier")
|
|
2683
|
-
return "*";
|
|
2684
|
-
return "default";
|
|
2685
|
-
}
|
|
2686
2682
|
const TS_NODE_TYPES = [
|
|
2687
2683
|
"TSAsExpression",
|
|
2688
2684
|
// foo as number
|
|
@@ -2695,16 +2691,6 @@ const TS_NODE_TYPES = [
|
|
|
2695
2691
|
"TSSatisfiesExpression"
|
|
2696
2692
|
// foo satisfies T
|
|
2697
2693
|
];
|
|
2698
|
-
function unwrapTSNode(node) {
|
|
2699
|
-
if (TS_NODE_TYPES.includes(node.type)) {
|
|
2700
|
-
return unwrapTSNode(node.expression);
|
|
2701
|
-
} else {
|
|
2702
|
-
return node;
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
function isCallOf(node, test) {
|
|
2706
|
-
return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name)));
|
|
2707
|
-
}
|
|
2708
2694
|
|
|
2709
2695
|
const prohibitedKeywordRE = new RegExp(
|
|
2710
2696
|
"\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b"
|
|
@@ -3676,6 +3662,11 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
3676
3662
|
}
|
|
3677
3663
|
const isDir = !isExplicitDynamic && findDir(node, "is");
|
|
3678
3664
|
if (isDir && isDir.exp) {
|
|
3665
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3666
|
+
context.onWarn(
|
|
3667
|
+
createCompilerError(52, isDir.loc)
|
|
3668
|
+
);
|
|
3669
|
+
}
|
|
3679
3670
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
3680
3671
|
isDir.exp
|
|
3681
3672
|
]);
|
|
@@ -4181,6 +4172,11 @@ const transformOn = (dir, node, context, augmentor) => {
|
|
|
4181
4172
|
if (arg.type === 4) {
|
|
4182
4173
|
if (arg.isStatic) {
|
|
4183
4174
|
let rawName = arg.content;
|
|
4175
|
+
if (process.env.NODE_ENV !== "production" && rawName.startsWith("vnode")) {
|
|
4176
|
+
context.onWarn(
|
|
4177
|
+
createCompilerError(51, arg.loc)
|
|
4178
|
+
);
|
|
4179
|
+
}
|
|
4184
4180
|
if (rawName.startsWith("vue:")) {
|
|
4185
4181
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
4186
4182
|
}
|
|
@@ -4696,4 +4692,4 @@ function baseCompile(template, options = {}) {
|
|
|
4696
4692
|
|
|
4697
4693
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
4698
4694
|
|
|
4699
|
-
export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, 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, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType,
|
|
4695
|
+
export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, 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, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, 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, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.3.0-
|
|
3
|
+
"version": "3.3.0-beta.1",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/parser": "^7.21.3",
|
|
36
|
-
"@vue/shared": "3.3.0-
|
|
36
|
+
"@vue/shared": "3.3.0-beta.1",
|
|
37
37
|
"estree-walker": "^2.0.2",
|
|
38
|
-
"source-map": "^0.
|
|
38
|
+
"source-map-js": "^1.0.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/types": "^7.21.3"
|