@vue/compiler-core 3.3.4 → 3.3.6
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.
|
@@ -830,7 +830,7 @@ function parseChildren(context, mode, ancestors) {
|
|
|
830
830
|
continue;
|
|
831
831
|
} else if (/[a-z]/i.test(s[2])) {
|
|
832
832
|
emitError(context, 23);
|
|
833
|
-
parseTag(context,
|
|
833
|
+
parseTag(context, 1 /* End */, parent);
|
|
834
834
|
continue;
|
|
835
835
|
} else {
|
|
836
836
|
emitError(
|
|
@@ -991,7 +991,7 @@ function parseElement(context, ancestors) {
|
|
|
991
991
|
const wasInPre = context.inPre;
|
|
992
992
|
const wasInVPre = context.inVPre;
|
|
993
993
|
const parent = last(ancestors);
|
|
994
|
-
const element = parseTag(context,
|
|
994
|
+
const element = parseTag(context, 0 /* Start */, parent);
|
|
995
995
|
const isPreBoundary = context.inPre && !wasInPre;
|
|
996
996
|
const isVPreBoundary = context.inVPre && !wasInVPre;
|
|
997
997
|
if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
|
|
@@ -1026,7 +1026,7 @@ function parseElement(context, ancestors) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
element.children = children;
|
|
1028
1028
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
1029
|
-
parseTag(context,
|
|
1029
|
+
parseTag(context, 1 /* End */, parent);
|
|
1030
1030
|
} else {
|
|
1031
1031
|
emitError(context, 24, 0, element.loc.start);
|
|
1032
1032
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
@@ -1045,11 +1045,6 @@ function parseElement(context, ancestors) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
return element;
|
|
1047
1047
|
}
|
|
1048
|
-
var TagType = /* @__PURE__ */ ((TagType2) => {
|
|
1049
|
-
TagType2[TagType2["Start"] = 0] = "Start";
|
|
1050
|
-
TagType2[TagType2["End"] = 1] = "End";
|
|
1051
|
-
return TagType2;
|
|
1052
|
-
})(TagType || {});
|
|
1053
1048
|
const isSpecialTemplateDirective = /* @__PURE__ */ shared.makeMap(
|
|
1054
1049
|
`if,else,else-if,for,slot`
|
|
1055
1050
|
);
|
|
@@ -1817,7 +1812,7 @@ function createTransformContext(root, {
|
|
|
1817
1812
|
directives: /* @__PURE__ */ new Set(),
|
|
1818
1813
|
hoists: [],
|
|
1819
1814
|
imports: [],
|
|
1820
|
-
constantCache: /* @__PURE__ */ new
|
|
1815
|
+
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
1821
1816
|
temps: 0,
|
|
1822
1817
|
cached: 0,
|
|
1823
1818
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
@@ -3172,7 +3167,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
3172
3167
|
const bailConstant = constantBailRE.test(rawExp);
|
|
3173
3168
|
if (isSimpleIdentifier(rawExp)) {
|
|
3174
3169
|
const isScopeVarReference = context.identifiers[rawExp];
|
|
3175
|
-
const isAllowedGlobal = shared.
|
|
3170
|
+
const isAllowedGlobal = shared.isGloballyAllowed(rawExp);
|
|
3176
3171
|
const isLiteral = isLiteralWhitelisted(rawExp);
|
|
3177
3172
|
if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {
|
|
3178
3173
|
if (isConst(bindingMetadata[node.content])) {
|
|
@@ -3274,7 +3269,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
3274
3269
|
return ret;
|
|
3275
3270
|
}
|
|
3276
3271
|
function canPrefix(id) {
|
|
3277
|
-
if (shared.
|
|
3272
|
+
if (shared.isGloballyAllowed(id.name)) {
|
|
3278
3273
|
return false;
|
|
3279
3274
|
}
|
|
3280
3275
|
if (id.name === "require") {
|
|
@@ -826,7 +826,7 @@ function parseChildren(context, mode, ancestors) {
|
|
|
826
826
|
continue;
|
|
827
827
|
} else if (/[a-z]/i.test(s[2])) {
|
|
828
828
|
emitError(context, 23);
|
|
829
|
-
parseTag(context,
|
|
829
|
+
parseTag(context, 1 /* End */, parent);
|
|
830
830
|
continue;
|
|
831
831
|
} else {
|
|
832
832
|
emitError(
|
|
@@ -982,7 +982,7 @@ function parseElement(context, ancestors) {
|
|
|
982
982
|
const wasInPre = context.inPre;
|
|
983
983
|
const wasInVPre = context.inVPre;
|
|
984
984
|
const parent = last(ancestors);
|
|
985
|
-
const element = parseTag(context,
|
|
985
|
+
const element = parseTag(context, 0 /* Start */, parent);
|
|
986
986
|
const isPreBoundary = context.inPre && !wasInPre;
|
|
987
987
|
const isVPreBoundary = context.inVPre && !wasInVPre;
|
|
988
988
|
if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
|
|
@@ -1017,7 +1017,7 @@ function parseElement(context, ancestors) {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
element.children = children;
|
|
1019
1019
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
1020
|
-
parseTag(context,
|
|
1020
|
+
parseTag(context, 1 /* End */, parent);
|
|
1021
1021
|
} else {
|
|
1022
1022
|
emitError(context, 24, 0, element.loc.start);
|
|
1023
1023
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
@@ -1036,11 +1036,6 @@ function parseElement(context, ancestors) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
return element;
|
|
1038
1038
|
}
|
|
1039
|
-
var TagType = /* @__PURE__ */ ((TagType2) => {
|
|
1040
|
-
TagType2[TagType2["Start"] = 0] = "Start";
|
|
1041
|
-
TagType2[TagType2["End"] = 1] = "End";
|
|
1042
|
-
return TagType2;
|
|
1043
|
-
})(TagType || {});
|
|
1044
1039
|
const isSpecialTemplateDirective = /* @__PURE__ */ shared.makeMap(
|
|
1045
1040
|
`if,else,else-if,for,slot`
|
|
1046
1041
|
);
|
|
@@ -1776,7 +1771,7 @@ function createTransformContext(root, {
|
|
|
1776
1771
|
directives: /* @__PURE__ */ new Set(),
|
|
1777
1772
|
hoists: [],
|
|
1778
1773
|
imports: [],
|
|
1779
|
-
constantCache: /* @__PURE__ */ new
|
|
1774
|
+
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
1780
1775
|
temps: 0,
|
|
1781
1776
|
cached: 0,
|
|
1782
1777
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
@@ -3101,7 +3096,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
3101
3096
|
const bailConstant = constantBailRE.test(rawExp);
|
|
3102
3097
|
if (isSimpleIdentifier(rawExp)) {
|
|
3103
3098
|
const isScopeVarReference = context.identifiers[rawExp];
|
|
3104
|
-
const isAllowedGlobal = shared.
|
|
3099
|
+
const isAllowedGlobal = shared.isGloballyAllowed(rawExp);
|
|
3105
3100
|
const isLiteral = isLiteralWhitelisted(rawExp);
|
|
3106
3101
|
if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {
|
|
3107
3102
|
if (isConst(bindingMetadata[node.content])) {
|
|
@@ -3203,7 +3198,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
3203
3198
|
return ret;
|
|
3204
3199
|
}
|
|
3205
3200
|
function canPrefix(id) {
|
|
3206
|
-
if (shared.
|
|
3201
|
+
if (shared.isGloballyAllowed(id.name)) {
|
|
3207
3202
|
return false;
|
|
3208
3203
|
}
|
|
3209
3204
|
if (id.name === "require") {
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -90,7 +90,7 @@ export interface TransformContext extends Required<Omit<TransformOptions, 'filen
|
|
|
90
90
|
removeIdentifiers(exp: ExpressionNode | string): void;
|
|
91
91
|
hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode;
|
|
92
92
|
cache<T extends JSChildNode>(exp: T, isVNode?: boolean): CacheExpression | T;
|
|
93
|
-
constantCache:
|
|
93
|
+
constantCache: WeakMap<TemplateChildNode, ConstantTypes>;
|
|
94
94
|
filters?: Set<string>;
|
|
95
95
|
}
|
|
96
96
|
export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig }: TransformOptions): TransformContext;
|
|
@@ -813,7 +813,7 @@ function parseChildren(context, mode, ancestors) {
|
|
|
813
813
|
continue;
|
|
814
814
|
} else if (/[a-z]/i.test(s[2])) {
|
|
815
815
|
emitError(context, 23);
|
|
816
|
-
parseTag(context,
|
|
816
|
+
parseTag(context, 1 /* End */, parent);
|
|
817
817
|
continue;
|
|
818
818
|
} else {
|
|
819
819
|
emitError(
|
|
@@ -974,7 +974,7 @@ function parseElement(context, ancestors) {
|
|
|
974
974
|
const wasInPre = context.inPre;
|
|
975
975
|
const wasInVPre = context.inVPre;
|
|
976
976
|
const parent = last(ancestors);
|
|
977
|
-
const element = parseTag(context,
|
|
977
|
+
const element = parseTag(context, 0 /* Start */, parent);
|
|
978
978
|
const isPreBoundary = context.inPre && !wasInPre;
|
|
979
979
|
const isVPreBoundary = context.inVPre && !wasInVPre;
|
|
980
980
|
if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
|
|
@@ -1009,7 +1009,7 @@ function parseElement(context, ancestors) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
element.children = children;
|
|
1011
1011
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
1012
|
-
parseTag(context,
|
|
1012
|
+
parseTag(context, 1 /* End */, parent);
|
|
1013
1013
|
} else {
|
|
1014
1014
|
emitError(context, 24, 0, element.loc.start);
|
|
1015
1015
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
@@ -1028,11 +1028,6 @@ function parseElement(context, ancestors) {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
return element;
|
|
1030
1030
|
}
|
|
1031
|
-
var TagType = /* @__PURE__ */ ((TagType2) => {
|
|
1032
|
-
TagType2[TagType2["Start"] = 0] = "Start";
|
|
1033
|
-
TagType2[TagType2["End"] = 1] = "End";
|
|
1034
|
-
return TagType2;
|
|
1035
|
-
})(TagType || {});
|
|
1036
1031
|
const isSpecialTemplateDirective = /* @__PURE__ */ makeMap(
|
|
1037
1032
|
`if,else,else-if,for,slot`
|
|
1038
1033
|
);
|
|
@@ -1801,7 +1796,7 @@ function createTransformContext(root, {
|
|
|
1801
1796
|
directives: /* @__PURE__ */ new Set(),
|
|
1802
1797
|
hoists: [],
|
|
1803
1798
|
imports: [],
|
|
1804
|
-
constantCache: /* @__PURE__ */ new
|
|
1799
|
+
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
1805
1800
|
temps: 0,
|
|
1806
1801
|
cached: 0,
|
|
1807
1802
|
identifiers: /* @__PURE__ */ Object.create(null),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.6",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@babel/parser": "^7.
|
|
36
|
-
"@vue/shared": "3.3.
|
|
35
|
+
"@babel/parser": "^7.23.0",
|
|
36
|
+
"@vue/shared": "3.3.6",
|
|
37
37
|
"estree-walker": "^2.0.2",
|
|
38
38
|
"source-map-js": "^1.0.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/types": "^7.
|
|
41
|
+
"@babel/types": "^7.23.0"
|
|
42
42
|
}
|
|
43
43
|
}
|