@vue/compiler-sfc 3.4.0-beta.3 → 3.4.0-beta.4
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-sfc.cjs.js
CHANGED
|
@@ -20258,6 +20258,7 @@ let __temp${any}, __restore${any}
|
|
|
20258
20258
|
}
|
|
20259
20259
|
const { code, ast, preamble, tips, errors } = compileTemplate({
|
|
20260
20260
|
filename,
|
|
20261
|
+
ast: sfc.template.ast,
|
|
20261
20262
|
source: sfc.template.content,
|
|
20262
20263
|
inMap: sfc.template.map,
|
|
20263
20264
|
...options.templateOptions,
|
|
@@ -20559,7 +20560,7 @@ function isStaticNode(node) {
|
|
|
20559
20560
|
return false;
|
|
20560
20561
|
}
|
|
20561
20562
|
|
|
20562
|
-
const version = "3.4.0-beta.
|
|
20563
|
+
const version = "3.4.0-beta.4";
|
|
20563
20564
|
const parseCache = parseCache$1;
|
|
20564
20565
|
const walk = estreeWalker.walk;
|
|
20565
20566
|
const shouldTransformRef = () => false;
|
|
@@ -17032,12 +17032,23 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|
|
17032
17032
|
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
|
|
17033
17033
|
node.inPattern = true;
|
|
17034
17034
|
} else if (isFunctionType(node)) {
|
|
17035
|
-
|
|
17035
|
+
if (node.scopeIds) {
|
|
17036
|
+
node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
17037
|
+
} else {
|
|
17038
|
+
walkFunctionParams(
|
|
17039
|
+
node,
|
|
17040
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
17041
|
+
);
|
|
17042
|
+
}
|
|
17036
17043
|
} else if (node.type === "BlockStatement") {
|
|
17037
|
-
|
|
17038
|
-
node,
|
|
17039
|
-
|
|
17040
|
-
|
|
17044
|
+
if (node.scopeIds) {
|
|
17045
|
+
node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
17046
|
+
} else {
|
|
17047
|
+
walkBlockDeclarations(
|
|
17048
|
+
node,
|
|
17049
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
17050
|
+
);
|
|
17051
|
+
}
|
|
17041
17052
|
}
|
|
17042
17053
|
},
|
|
17043
17054
|
leave(node, parent) {
|
|
@@ -17156,16 +17167,19 @@ function extractIdentifiers$1(param, nodes = []) {
|
|
|
17156
17167
|
}
|
|
17157
17168
|
return nodes;
|
|
17158
17169
|
}
|
|
17159
|
-
function
|
|
17160
|
-
const { name } = child;
|
|
17161
|
-
if (node.scopeIds && node.scopeIds.has(name)) {
|
|
17162
|
-
return;
|
|
17163
|
-
}
|
|
17170
|
+
function markKnownIds(name, knownIds) {
|
|
17164
17171
|
if (name in knownIds) {
|
|
17165
17172
|
knownIds[name]++;
|
|
17166
17173
|
} else {
|
|
17167
17174
|
knownIds[name] = 1;
|
|
17168
17175
|
}
|
|
17176
|
+
}
|
|
17177
|
+
function markScopeIdentifier(node, child, knownIds) {
|
|
17178
|
+
const { name } = child;
|
|
17179
|
+
if (node.scopeIds && node.scopeIds.has(name)) {
|
|
17180
|
+
return;
|
|
17181
|
+
}
|
|
17182
|
+
markKnownIds(name, knownIds);
|
|
17169
17183
|
(node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name);
|
|
17170
17184
|
}
|
|
17171
17185
|
const isFunctionType = (node) => {
|
|
@@ -17370,7 +17384,7 @@ const isMemberExpressionNode = (path, context) => {
|
|
|
17370
17384
|
plugins: context.expressionPlugins
|
|
17371
17385
|
});
|
|
17372
17386
|
ret = unwrapTSNode(ret);
|
|
17373
|
-
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier";
|
|
17387
|
+
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
|
|
17374
17388
|
} catch (e) {
|
|
17375
17389
|
return false;
|
|
17376
17390
|
}
|
|
@@ -48245,6 +48259,7 @@ let __temp${any}, __restore${any}
|
|
|
48245
48259
|
}
|
|
48246
48260
|
const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues({
|
|
48247
48261
|
filename,
|
|
48262
|
+
ast: sfc.template.ast,
|
|
48248
48263
|
source: sfc.template.content,
|
|
48249
48264
|
inMap: sfc.template.map
|
|
48250
48265
|
}, options.templateOptions), {
|
|
@@ -48544,7 +48559,7 @@ function isStaticNode(node) {
|
|
|
48544
48559
|
return false;
|
|
48545
48560
|
}
|
|
48546
48561
|
|
|
48547
|
-
const version = "3.4.0-beta.
|
|
48562
|
+
const version = "3.4.0-beta.4";
|
|
48548
48563
|
const parseCache = parseCache$1;
|
|
48549
48564
|
const walk = walk$2;
|
|
48550
48565
|
const shouldTransformRef = () => false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-sfc",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.4",
|
|
4
4
|
"description": "@vue/compiler-sfc",
|
|
5
5
|
"main": "dist/compiler-sfc.cjs.js",
|
|
6
6
|
"module": "dist/compiler-sfc.esm-browser.js",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"magic-string": "^0.30.5",
|
|
38
38
|
"postcss": "^8.4.32",
|
|
39
39
|
"source-map-js": "^1.0.2",
|
|
40
|
-
"@vue/compiler-
|
|
41
|
-
"@vue/compiler-
|
|
42
|
-
"@vue/
|
|
43
|
-
"@vue/
|
|
40
|
+
"@vue/compiler-core": "3.4.0-beta.4",
|
|
41
|
+
"@vue/compiler-ssr": "3.4.0-beta.4",
|
|
42
|
+
"@vue/compiler-dom": "3.4.0-beta.4",
|
|
43
|
+
"@vue/shared": "3.4.0-beta.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/types": "^7.23.5",
|