@vue/compiler-core 3.6.0-rc.13 → 3.6.0-rc.15
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.6.0-rc.
|
|
2
|
+
* @vue/compiler-core v3.6.0-rc.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2141,6 +2141,13 @@ const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
|
2141
2141
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
2142
2142
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
2143
2143
|
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
2144
|
+
const asciiIdentifierRE = /^[A-Za-z_$][\w$]*$/;
|
|
2145
|
+
const isReservedWord = /*@__PURE__*/ (0, _vue_shared.makeMap)("await,break,case,catch,class,const,continue,debugger,default,delete,do,else,enum,export,extends,false,finally,for,function,if,implements,import,in,instanceof,interface,let,new,null,package,private,protected,public,return,static,super,switch,this,throw,true,try,typeof,undefined,var,void,while,with,yield");
|
|
2146
|
+
const isUnparsedIdentifier = (exp) => {
|
|
2147
|
+
if (exp.ast !== null) return false;
|
|
2148
|
+
const content = getExpSource(exp);
|
|
2149
|
+
return asciiIdentifierRE.test(content) && !isReservedWord(content);
|
|
2150
|
+
};
|
|
2144
2151
|
/**
|
|
2145
2152
|
* Simple lexer to check if an expression is a member expression. This is
|
|
2146
2153
|
* lax and only checks validity at the root level (i.e. does not validate exps
|
|
@@ -2198,6 +2205,7 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
2198
2205
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
2199
2206
|
};
|
|
2200
2207
|
const isMemberExpressionNode = (exp, context) => {
|
|
2208
|
+
if (isUnparsedIdentifier(exp)) return true;
|
|
2201
2209
|
try {
|
|
2202
2210
|
let ret = exp.ast || (0, _babel_parser.parseExpression)(getExpSource(exp), { plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] });
|
|
2203
2211
|
ret = unwrapTSNode(ret);
|
|
@@ -2210,6 +2218,7 @@ const isMemberExpression = isMemberExpressionNode;
|
|
|
2210
2218
|
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
2211
2219
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
2212
2220
|
const isFnExpressionNode = (exp, context) => {
|
|
2221
|
+
if (isUnparsedIdentifier(exp)) return false;
|
|
2213
2222
|
try {
|
|
2214
2223
|
let ret = exp.ast || (0, _babel_parser.parseExpression)(getExpSource(exp), { plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] });
|
|
2215
2224
|
if (ret.type === "Program") {
|
|
@@ -2876,7 +2885,11 @@ function getLoc(start, end) {
|
|
|
2876
2885
|
};
|
|
2877
2886
|
}
|
|
2878
2887
|
function cloneLoc(loc) {
|
|
2879
|
-
return
|
|
2888
|
+
return {
|
|
2889
|
+
start: (0, _vue_shared.extend)({}, loc.start),
|
|
2890
|
+
end: (0, _vue_shared.extend)({}, loc.end),
|
|
2891
|
+
source: loc.source
|
|
2892
|
+
};
|
|
2880
2893
|
}
|
|
2881
2894
|
function setLocEnd(loc, end) {
|
|
2882
2895
|
loc.end = tokenizer.getPos(end);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.6.0-rc.
|
|
2
|
+
* @vue/compiler-core v3.6.0-rc.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2137,6 +2137,13 @@ const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
|
2137
2137
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
2138
2138
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
2139
2139
|
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
2140
|
+
const asciiIdentifierRE = /^[A-Za-z_$][\w$]*$/;
|
|
2141
|
+
const isReservedWord = /*@__PURE__*/ (0, _vue_shared.makeMap)("await,break,case,catch,class,const,continue,debugger,default,delete,do,else,enum,export,extends,false,finally,for,function,if,implements,import,in,instanceof,interface,let,new,null,package,private,protected,public,return,static,super,switch,this,throw,true,try,typeof,undefined,var,void,while,with,yield");
|
|
2142
|
+
const isUnparsedIdentifier = (exp) => {
|
|
2143
|
+
if (exp.ast !== null) return false;
|
|
2144
|
+
const content = getExpSource(exp);
|
|
2145
|
+
return asciiIdentifierRE.test(content) && !isReservedWord(content);
|
|
2146
|
+
};
|
|
2140
2147
|
/**
|
|
2141
2148
|
* Simple lexer to check if an expression is a member expression. This is
|
|
2142
2149
|
* lax and only checks validity at the root level (i.e. does not validate exps
|
|
@@ -2194,6 +2201,7 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
2194
2201
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
2195
2202
|
};
|
|
2196
2203
|
const isMemberExpressionNode = (exp, context) => {
|
|
2204
|
+
if (isUnparsedIdentifier(exp)) return true;
|
|
2197
2205
|
try {
|
|
2198
2206
|
let ret = exp.ast || (0, _babel_parser.parseExpression)(getExpSource(exp), { plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] });
|
|
2199
2207
|
ret = unwrapTSNode(ret);
|
|
@@ -2206,6 +2214,7 @@ const isMemberExpression = isMemberExpressionNode;
|
|
|
2206
2214
|
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
2207
2215
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
2208
2216
|
const isFnExpressionNode = (exp, context) => {
|
|
2217
|
+
if (isUnparsedIdentifier(exp)) return false;
|
|
2209
2218
|
try {
|
|
2210
2219
|
let ret = exp.ast || (0, _babel_parser.parseExpression)(getExpSource(exp), { plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] });
|
|
2211
2220
|
if (ret.type === "Program") {
|
|
@@ -2856,7 +2865,11 @@ function getLoc(start, end) {
|
|
|
2856
2865
|
};
|
|
2857
2866
|
}
|
|
2858
2867
|
function cloneLoc(loc) {
|
|
2859
|
-
return
|
|
2868
|
+
return {
|
|
2869
|
+
start: (0, _vue_shared.extend)({}, loc.start),
|
|
2870
|
+
end: (0, _vue_shared.extend)({}, loc.end),
|
|
2871
|
+
source: loc.source
|
|
2872
|
+
};
|
|
2860
2873
|
}
|
|
2861
2874
|
function setLocEnd(loc, end) {
|
|
2862
2875
|
loc.end = tokenizer.getPos(end);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.6.0-rc.
|
|
2
|
+
* @vue/compiler-core v3.6.0-rc.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2219,7 +2219,11 @@ function getLoc(start, end) {
|
|
|
2219
2219
|
};
|
|
2220
2220
|
}
|
|
2221
2221
|
function cloneLoc(loc) {
|
|
2222
|
-
return
|
|
2222
|
+
return {
|
|
2223
|
+
start: extend({}, loc.start),
|
|
2224
|
+
end: extend({}, loc.end),
|
|
2225
|
+
source: loc.source
|
|
2226
|
+
};
|
|
2223
2227
|
}
|
|
2224
2228
|
function setLocEnd(loc, end) {
|
|
2225
2229
|
loc.end = tokenizer.getPos(end);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.6.0-rc.
|
|
3
|
+
"version": "3.6.0-rc.15",
|
|
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.29.
|
|
50
|
-
"@vue/shared": "3.6.0-rc.
|
|
49
|
+
"@babel/parser": "^7.29.12",
|
|
50
|
+
"@vue/shared": "3.6.0-rc.15",
|
|
51
51
|
"entities": "^7.0.1",
|
|
52
52
|
"estree-walker": "^2.0.2",
|
|
53
53
|
"source-map-js": "^1.2.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/types": "^7.29.
|
|
56
|
+
"@babel/types": "^7.29.11"
|
|
57
57
|
}
|
|
58
58
|
}
|