@vue/compiler-core 3.5.0-beta.1 → 3.5.0-beta.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 +101 -11
- package/dist/compiler-core.cjs.prod.js +100 -11
- package/dist/compiler-core.d.ts +6 -3
- package/dist/compiler-core.esm-bundler.js +25 -8
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.0-beta.
|
|
2
|
+
* @vue/compiler-core v3.5.0-beta.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
10
|
var shared = require('@vue/shared');
|
|
11
|
-
var decode_js = require('entities/
|
|
11
|
+
var decode_js = require('entities/lib/decode.js');
|
|
12
12
|
var parser = require('@babel/parser');
|
|
13
13
|
var estreeWalker = require('estree-walker');
|
|
14
14
|
var sourceMapJs = require('source-map-js');
|
|
@@ -1738,6 +1738,9 @@ const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || no
|
|
|
1738
1738
|
const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
|
|
1739
1739
|
function isReferenced(node, parent, grandparent) {
|
|
1740
1740
|
switch (parent.type) {
|
|
1741
|
+
// yes: PARENT[NODE]
|
|
1742
|
+
// yes: NODE.child
|
|
1743
|
+
// no: parent.NODE
|
|
1741
1744
|
case "MemberExpression":
|
|
1742
1745
|
case "OptionalMemberExpression":
|
|
1743
1746
|
if (parent.property === node) {
|
|
@@ -1746,12 +1749,23 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1746
1749
|
return parent.object === node;
|
|
1747
1750
|
case "JSXMemberExpression":
|
|
1748
1751
|
return parent.object === node;
|
|
1752
|
+
// no: let NODE = init;
|
|
1753
|
+
// yes: let id = NODE;
|
|
1749
1754
|
case "VariableDeclarator":
|
|
1750
1755
|
return parent.init === node;
|
|
1756
|
+
// yes: () => NODE
|
|
1757
|
+
// no: (NODE) => {}
|
|
1751
1758
|
case "ArrowFunctionExpression":
|
|
1752
1759
|
return parent.body === node;
|
|
1760
|
+
// no: class { #NODE; }
|
|
1761
|
+
// no: class { get #NODE() {} }
|
|
1762
|
+
// no: class { #NODE() {} }
|
|
1763
|
+
// no: class { fn() { return this.#NODE; } }
|
|
1753
1764
|
case "PrivateName":
|
|
1754
1765
|
return false;
|
|
1766
|
+
// no: class { NODE() {} }
|
|
1767
|
+
// yes: class { [NODE]() {} }
|
|
1768
|
+
// no: class { foo(NODE) {} }
|
|
1755
1769
|
case "ClassMethod":
|
|
1756
1770
|
case "ClassPrivateMethod":
|
|
1757
1771
|
case "ObjectMethod":
|
|
@@ -1759,11 +1773,18 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1759
1773
|
return !!parent.computed;
|
|
1760
1774
|
}
|
|
1761
1775
|
return false;
|
|
1776
|
+
// yes: { [NODE]: "" }
|
|
1777
|
+
// no: { NODE: "" }
|
|
1778
|
+
// depends: { NODE }
|
|
1779
|
+
// depends: { key: NODE }
|
|
1762
1780
|
case "ObjectProperty":
|
|
1763
1781
|
if (parent.key === node) {
|
|
1764
1782
|
return !!parent.computed;
|
|
1765
1783
|
}
|
|
1766
1784
|
return !grandparent;
|
|
1785
|
+
// no: class { NODE = value; }
|
|
1786
|
+
// yes: class { [NODE] = value; }
|
|
1787
|
+
// yes: class { key = NODE; }
|
|
1767
1788
|
case "ClassProperty":
|
|
1768
1789
|
if (parent.key === node) {
|
|
1769
1790
|
return !!parent.computed;
|
|
@@ -1771,47 +1792,80 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1771
1792
|
return true;
|
|
1772
1793
|
case "ClassPrivateProperty":
|
|
1773
1794
|
return parent.key !== node;
|
|
1795
|
+
// no: class NODE {}
|
|
1796
|
+
// yes: class Foo extends NODE {}
|
|
1774
1797
|
case "ClassDeclaration":
|
|
1775
1798
|
case "ClassExpression":
|
|
1776
1799
|
return parent.superClass === node;
|
|
1800
|
+
// yes: left = NODE;
|
|
1801
|
+
// no: NODE = right;
|
|
1777
1802
|
case "AssignmentExpression":
|
|
1778
1803
|
return parent.right === node;
|
|
1804
|
+
// no: [NODE = foo] = [];
|
|
1805
|
+
// yes: [foo = NODE] = [];
|
|
1779
1806
|
case "AssignmentPattern":
|
|
1780
1807
|
return parent.right === node;
|
|
1808
|
+
// no: NODE: for (;;) {}
|
|
1781
1809
|
case "LabeledStatement":
|
|
1782
1810
|
return false;
|
|
1811
|
+
// no: try {} catch (NODE) {}
|
|
1783
1812
|
case "CatchClause":
|
|
1784
1813
|
return false;
|
|
1814
|
+
// no: function foo(...NODE) {}
|
|
1785
1815
|
case "RestElement":
|
|
1786
1816
|
return false;
|
|
1787
1817
|
case "BreakStatement":
|
|
1788
1818
|
case "ContinueStatement":
|
|
1789
1819
|
return false;
|
|
1820
|
+
// no: function NODE() {}
|
|
1821
|
+
// no: function foo(NODE) {}
|
|
1790
1822
|
case "FunctionDeclaration":
|
|
1791
1823
|
case "FunctionExpression":
|
|
1792
1824
|
return false;
|
|
1825
|
+
// no: export NODE from "foo";
|
|
1826
|
+
// no: export * as NODE from "foo";
|
|
1793
1827
|
case "ExportNamespaceSpecifier":
|
|
1794
1828
|
case "ExportDefaultSpecifier":
|
|
1795
1829
|
return false;
|
|
1830
|
+
// no: export { foo as NODE };
|
|
1831
|
+
// yes: export { NODE as foo };
|
|
1832
|
+
// no: export { NODE as foo } from "foo";
|
|
1796
1833
|
case "ExportSpecifier":
|
|
1797
1834
|
return parent.local === node;
|
|
1835
|
+
// no: import NODE from "foo";
|
|
1836
|
+
// no: import * as NODE from "foo";
|
|
1837
|
+
// no: import { NODE as foo } from "foo";
|
|
1838
|
+
// no: import { foo as NODE } from "foo";
|
|
1839
|
+
// no: import NODE from "bar";
|
|
1798
1840
|
case "ImportDefaultSpecifier":
|
|
1799
1841
|
case "ImportNamespaceSpecifier":
|
|
1800
1842
|
case "ImportSpecifier":
|
|
1801
1843
|
return false;
|
|
1844
|
+
// no: import "foo" assert { NODE: "json" }
|
|
1802
1845
|
case "ImportAttribute":
|
|
1803
1846
|
return false;
|
|
1847
|
+
// no: <div NODE="foo" />
|
|
1804
1848
|
case "JSXAttribute":
|
|
1805
1849
|
return false;
|
|
1850
|
+
// no: [NODE] = [];
|
|
1851
|
+
// no: ({ NODE }) = [];
|
|
1806
1852
|
case "ObjectPattern":
|
|
1807
1853
|
case "ArrayPattern":
|
|
1808
1854
|
return false;
|
|
1855
|
+
// no: new.NODE
|
|
1856
|
+
// no: NODE.target
|
|
1809
1857
|
case "MetaProperty":
|
|
1810
1858
|
return false;
|
|
1859
|
+
// yes: type X = { someProperty: NODE }
|
|
1860
|
+
// no: type X = { NODE: OtherType }
|
|
1811
1861
|
case "ObjectTypeProperty":
|
|
1812
1862
|
return parent.key !== node;
|
|
1863
|
+
// yes: enum X { Foo = NODE }
|
|
1864
|
+
// no: enum X { NODE }
|
|
1813
1865
|
case "TSEnumMember":
|
|
1814
1866
|
return parent.id !== node;
|
|
1867
|
+
// yes: { [NODE]: value }
|
|
1868
|
+
// no: { NODE: value }
|
|
1815
1869
|
case "TSPropertySignature":
|
|
1816
1870
|
if (parent.key === node) {
|
|
1817
1871
|
return !!parent.computed;
|
|
@@ -1862,8 +1916,9 @@ const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
|
1862
1916
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
1863
1917
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
1864
1918
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1919
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
1920
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
1921
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
1867
1922
|
let state = 0 /* inMemberExp */;
|
|
1868
1923
|
let stateStack = [];
|
|
1869
1924
|
let currentOpenBracketCount = 0;
|
|
@@ -1924,10 +1979,10 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
1924
1979
|
}
|
|
1925
1980
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
1926
1981
|
};
|
|
1927
|
-
const isMemberExpressionNode = (
|
|
1982
|
+
const isMemberExpressionNode = (exp, context) => {
|
|
1928
1983
|
try {
|
|
1929
|
-
let ret = parser.parseExpression(
|
|
1930
|
-
plugins: context.expressionPlugins
|
|
1984
|
+
let ret = exp.ast || parser.parseExpression(getExpSource(exp), {
|
|
1985
|
+
plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"]
|
|
1931
1986
|
});
|
|
1932
1987
|
ret = unwrapTSNode(ret);
|
|
1933
1988
|
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
|
|
@@ -1936,6 +1991,26 @@ const isMemberExpressionNode = (path, context) => {
|
|
|
1936
1991
|
}
|
|
1937
1992
|
};
|
|
1938
1993
|
const isMemberExpression = isMemberExpressionNode;
|
|
1994
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
1995
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
1996
|
+
const isFnExpressionNode = (exp, context) => {
|
|
1997
|
+
try {
|
|
1998
|
+
let ret = exp.ast || parser.parseExpression(getExpSource(exp), {
|
|
1999
|
+
plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"]
|
|
2000
|
+
});
|
|
2001
|
+
if (ret.type === "Program") {
|
|
2002
|
+
ret = ret.body[0];
|
|
2003
|
+
if (ret.type === "ExpressionStatement") {
|
|
2004
|
+
ret = ret.expression;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
ret = unwrapTSNode(ret);
|
|
2008
|
+
return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression";
|
|
2009
|
+
} catch (e) {
|
|
2010
|
+
return false;
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
2013
|
+
const isFnExpression = isFnExpressionNode;
|
|
1939
2014
|
function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
|
|
1940
2015
|
return advancePositionWithMutation(
|
|
1941
2016
|
{
|
|
@@ -2450,7 +2525,9 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2450
2525
|
case 17:
|
|
2451
2526
|
case 18:
|
|
2452
2527
|
case 19:
|
|
2528
|
+
// "
|
|
2453
2529
|
case 20:
|
|
2530
|
+
// '
|
|
2454
2531
|
case 21:
|
|
2455
2532
|
emitError(9, end);
|
|
2456
2533
|
break;
|
|
@@ -3476,6 +3553,7 @@ function traverseNode(node, context) {
|
|
|
3476
3553
|
context.helper(TO_DISPLAY_STRING);
|
|
3477
3554
|
}
|
|
3478
3555
|
break;
|
|
3556
|
+
// for container types, further traverse downwards
|
|
3479
3557
|
case 9:
|
|
3480
3558
|
for (let i2 = 0; i2 < node.branches.length; i2++) {
|
|
3481
3559
|
traverseNode(node.branches[i2], context);
|
|
@@ -3956,6 +4034,7 @@ function genNode(node, context) {
|
|
|
3956
4034
|
case 21:
|
|
3957
4035
|
genNodeList(node.body, context, true, false);
|
|
3958
4036
|
break;
|
|
4037
|
+
// SSR only types
|
|
3959
4038
|
case 22:
|
|
3960
4039
|
genTemplateLiteral(node, context);
|
|
3961
4040
|
break;
|
|
@@ -3971,6 +4050,7 @@ function genNode(node, context) {
|
|
|
3971
4050
|
case 26:
|
|
3972
4051
|
genReturnStatement(node, context);
|
|
3973
4052
|
break;
|
|
4053
|
+
/* istanbul ignore next */
|
|
3974
4054
|
case 10:
|
|
3975
4055
|
break;
|
|
3976
4056
|
default:
|
|
@@ -6037,7 +6117,6 @@ function processSlotOutlet(node, context) {
|
|
|
6037
6117
|
};
|
|
6038
6118
|
}
|
|
6039
6119
|
|
|
6040
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
6041
6120
|
const transformOn = (dir, node, context, augmentor) => {
|
|
6042
6121
|
const { loc, modifiers, arg } = dir;
|
|
6043
6122
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -6081,8 +6160,8 @@ const transformOn = (dir, node, context, augmentor) => {
|
|
|
6081
6160
|
}
|
|
6082
6161
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
6083
6162
|
if (exp) {
|
|
6084
|
-
const isMemberExp = isMemberExpression(exp
|
|
6085
|
-
const isInlineStatement = !(isMemberExp ||
|
|
6163
|
+
const isMemberExp = isMemberExpression(exp, context);
|
|
6164
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp, context));
|
|
6086
6165
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
6087
6166
|
if (context.prefixIdentifiers) {
|
|
6088
6167
|
isInlineStatement && context.addIdentifiers(`$event`);
|
|
@@ -6252,7 +6331,7 @@ const transformModel = (dir, node, context) => {
|
|
|
6252
6331
|
return createTransformProps();
|
|
6253
6332
|
}
|
|
6254
6333
|
const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
|
|
6255
|
-
if (!expString.trim() || !isMemberExpression(
|
|
6334
|
+
if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
|
|
6256
6335
|
context.onError(
|
|
6257
6336
|
createCompilerError(42, exp.loc)
|
|
6258
6337
|
);
|
|
@@ -6387,27 +6466,35 @@ function parseFilter(node, context) {
|
|
|
6387
6466
|
case 34:
|
|
6388
6467
|
inDouble = true;
|
|
6389
6468
|
break;
|
|
6469
|
+
// "
|
|
6390
6470
|
case 39:
|
|
6391
6471
|
inSingle = true;
|
|
6392
6472
|
break;
|
|
6473
|
+
// '
|
|
6393
6474
|
case 96:
|
|
6394
6475
|
inTemplateString = true;
|
|
6395
6476
|
break;
|
|
6477
|
+
// `
|
|
6396
6478
|
case 40:
|
|
6397
6479
|
paren++;
|
|
6398
6480
|
break;
|
|
6481
|
+
// (
|
|
6399
6482
|
case 41:
|
|
6400
6483
|
paren--;
|
|
6401
6484
|
break;
|
|
6485
|
+
// )
|
|
6402
6486
|
case 91:
|
|
6403
6487
|
square++;
|
|
6404
6488
|
break;
|
|
6489
|
+
// [
|
|
6405
6490
|
case 93:
|
|
6406
6491
|
square--;
|
|
6407
6492
|
break;
|
|
6493
|
+
// ]
|
|
6408
6494
|
case 123:
|
|
6409
6495
|
curly++;
|
|
6410
6496
|
break;
|
|
6497
|
+
// {
|
|
6411
6498
|
case 125:
|
|
6412
6499
|
curly--;
|
|
6413
6500
|
break;
|
|
@@ -6663,6 +6750,9 @@ exports.hasScopeRef = hasScopeRef;
|
|
|
6663
6750
|
exports.helperNameMap = helperNameMap;
|
|
6664
6751
|
exports.injectProp = injectProp;
|
|
6665
6752
|
exports.isCoreComponent = isCoreComponent;
|
|
6753
|
+
exports.isFnExpression = isFnExpression;
|
|
6754
|
+
exports.isFnExpressionBrowser = isFnExpressionBrowser;
|
|
6755
|
+
exports.isFnExpressionNode = isFnExpressionNode;
|
|
6666
6756
|
exports.isFunctionType = isFunctionType;
|
|
6667
6757
|
exports.isInDestructureAssignment = isInDestructureAssignment;
|
|
6668
6758
|
exports.isInNewExpression = isInNewExpression;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.0-beta.
|
|
2
|
+
* @vue/compiler-core v3.5.0-beta.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
10
|
var shared = require('@vue/shared');
|
|
11
|
-
var decode_js = require('entities/
|
|
11
|
+
var decode_js = require('entities/lib/decode.js');
|
|
12
12
|
var parser = require('@babel/parser');
|
|
13
13
|
var estreeWalker = require('estree-walker');
|
|
14
14
|
var sourceMapJs = require('source-map-js');
|
|
@@ -1734,6 +1734,9 @@ const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || no
|
|
|
1734
1734
|
const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
|
|
1735
1735
|
function isReferenced(node, parent, grandparent) {
|
|
1736
1736
|
switch (parent.type) {
|
|
1737
|
+
// yes: PARENT[NODE]
|
|
1738
|
+
// yes: NODE.child
|
|
1739
|
+
// no: parent.NODE
|
|
1737
1740
|
case "MemberExpression":
|
|
1738
1741
|
case "OptionalMemberExpression":
|
|
1739
1742
|
if (parent.property === node) {
|
|
@@ -1742,12 +1745,23 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1742
1745
|
return parent.object === node;
|
|
1743
1746
|
case "JSXMemberExpression":
|
|
1744
1747
|
return parent.object === node;
|
|
1748
|
+
// no: let NODE = init;
|
|
1749
|
+
// yes: let id = NODE;
|
|
1745
1750
|
case "VariableDeclarator":
|
|
1746
1751
|
return parent.init === node;
|
|
1752
|
+
// yes: () => NODE
|
|
1753
|
+
// no: (NODE) => {}
|
|
1747
1754
|
case "ArrowFunctionExpression":
|
|
1748
1755
|
return parent.body === node;
|
|
1756
|
+
// no: class { #NODE; }
|
|
1757
|
+
// no: class { get #NODE() {} }
|
|
1758
|
+
// no: class { #NODE() {} }
|
|
1759
|
+
// no: class { fn() { return this.#NODE; } }
|
|
1749
1760
|
case "PrivateName":
|
|
1750
1761
|
return false;
|
|
1762
|
+
// no: class { NODE() {} }
|
|
1763
|
+
// yes: class { [NODE]() {} }
|
|
1764
|
+
// no: class { foo(NODE) {} }
|
|
1751
1765
|
case "ClassMethod":
|
|
1752
1766
|
case "ClassPrivateMethod":
|
|
1753
1767
|
case "ObjectMethod":
|
|
@@ -1755,11 +1769,18 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1755
1769
|
return !!parent.computed;
|
|
1756
1770
|
}
|
|
1757
1771
|
return false;
|
|
1772
|
+
// yes: { [NODE]: "" }
|
|
1773
|
+
// no: { NODE: "" }
|
|
1774
|
+
// depends: { NODE }
|
|
1775
|
+
// depends: { key: NODE }
|
|
1758
1776
|
case "ObjectProperty":
|
|
1759
1777
|
if (parent.key === node) {
|
|
1760
1778
|
return !!parent.computed;
|
|
1761
1779
|
}
|
|
1762
1780
|
return !grandparent;
|
|
1781
|
+
// no: class { NODE = value; }
|
|
1782
|
+
// yes: class { [NODE] = value; }
|
|
1783
|
+
// yes: class { key = NODE; }
|
|
1763
1784
|
case "ClassProperty":
|
|
1764
1785
|
if (parent.key === node) {
|
|
1765
1786
|
return !!parent.computed;
|
|
@@ -1767,47 +1788,80 @@ function isReferenced(node, parent, grandparent) {
|
|
|
1767
1788
|
return true;
|
|
1768
1789
|
case "ClassPrivateProperty":
|
|
1769
1790
|
return parent.key !== node;
|
|
1791
|
+
// no: class NODE {}
|
|
1792
|
+
// yes: class Foo extends NODE {}
|
|
1770
1793
|
case "ClassDeclaration":
|
|
1771
1794
|
case "ClassExpression":
|
|
1772
1795
|
return parent.superClass === node;
|
|
1796
|
+
// yes: left = NODE;
|
|
1797
|
+
// no: NODE = right;
|
|
1773
1798
|
case "AssignmentExpression":
|
|
1774
1799
|
return parent.right === node;
|
|
1800
|
+
// no: [NODE = foo] = [];
|
|
1801
|
+
// yes: [foo = NODE] = [];
|
|
1775
1802
|
case "AssignmentPattern":
|
|
1776
1803
|
return parent.right === node;
|
|
1804
|
+
// no: NODE: for (;;) {}
|
|
1777
1805
|
case "LabeledStatement":
|
|
1778
1806
|
return false;
|
|
1807
|
+
// no: try {} catch (NODE) {}
|
|
1779
1808
|
case "CatchClause":
|
|
1780
1809
|
return false;
|
|
1810
|
+
// no: function foo(...NODE) {}
|
|
1781
1811
|
case "RestElement":
|
|
1782
1812
|
return false;
|
|
1783
1813
|
case "BreakStatement":
|
|
1784
1814
|
case "ContinueStatement":
|
|
1785
1815
|
return false;
|
|
1816
|
+
// no: function NODE() {}
|
|
1817
|
+
// no: function foo(NODE) {}
|
|
1786
1818
|
case "FunctionDeclaration":
|
|
1787
1819
|
case "FunctionExpression":
|
|
1788
1820
|
return false;
|
|
1821
|
+
// no: export NODE from "foo";
|
|
1822
|
+
// no: export * as NODE from "foo";
|
|
1789
1823
|
case "ExportNamespaceSpecifier":
|
|
1790
1824
|
case "ExportDefaultSpecifier":
|
|
1791
1825
|
return false;
|
|
1826
|
+
// no: export { foo as NODE };
|
|
1827
|
+
// yes: export { NODE as foo };
|
|
1828
|
+
// no: export { NODE as foo } from "foo";
|
|
1792
1829
|
case "ExportSpecifier":
|
|
1793
1830
|
return parent.local === node;
|
|
1831
|
+
// no: import NODE from "foo";
|
|
1832
|
+
// no: import * as NODE from "foo";
|
|
1833
|
+
// no: import { NODE as foo } from "foo";
|
|
1834
|
+
// no: import { foo as NODE } from "foo";
|
|
1835
|
+
// no: import NODE from "bar";
|
|
1794
1836
|
case "ImportDefaultSpecifier":
|
|
1795
1837
|
case "ImportNamespaceSpecifier":
|
|
1796
1838
|
case "ImportSpecifier":
|
|
1797
1839
|
return false;
|
|
1840
|
+
// no: import "foo" assert { NODE: "json" }
|
|
1798
1841
|
case "ImportAttribute":
|
|
1799
1842
|
return false;
|
|
1843
|
+
// no: <div NODE="foo" />
|
|
1800
1844
|
case "JSXAttribute":
|
|
1801
1845
|
return false;
|
|
1846
|
+
// no: [NODE] = [];
|
|
1847
|
+
// no: ({ NODE }) = [];
|
|
1802
1848
|
case "ObjectPattern":
|
|
1803
1849
|
case "ArrayPattern":
|
|
1804
1850
|
return false;
|
|
1851
|
+
// no: new.NODE
|
|
1852
|
+
// no: NODE.target
|
|
1805
1853
|
case "MetaProperty":
|
|
1806
1854
|
return false;
|
|
1855
|
+
// yes: type X = { someProperty: NODE }
|
|
1856
|
+
// no: type X = { NODE: OtherType }
|
|
1807
1857
|
case "ObjectTypeProperty":
|
|
1808
1858
|
return parent.key !== node;
|
|
1859
|
+
// yes: enum X { Foo = NODE }
|
|
1860
|
+
// no: enum X { NODE }
|
|
1809
1861
|
case "TSEnumMember":
|
|
1810
1862
|
return parent.id !== node;
|
|
1863
|
+
// yes: { [NODE]: value }
|
|
1864
|
+
// no: { NODE: value }
|
|
1811
1865
|
case "TSPropertySignature":
|
|
1812
1866
|
if (parent.key === node) {
|
|
1813
1867
|
return !!parent.computed;
|
|
@@ -1858,8 +1912,9 @@ const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
|
1858
1912
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
1859
1913
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
1860
1914
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1915
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
1916
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
1917
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
1863
1918
|
let state = 0 /* inMemberExp */;
|
|
1864
1919
|
let stateStack = [];
|
|
1865
1920
|
let currentOpenBracketCount = 0;
|
|
@@ -1920,10 +1975,10 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
1920
1975
|
}
|
|
1921
1976
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
1922
1977
|
};
|
|
1923
|
-
const isMemberExpressionNode = (
|
|
1978
|
+
const isMemberExpressionNode = (exp, context) => {
|
|
1924
1979
|
try {
|
|
1925
|
-
let ret = parser.parseExpression(
|
|
1926
|
-
plugins: context.expressionPlugins
|
|
1980
|
+
let ret = exp.ast || parser.parseExpression(getExpSource(exp), {
|
|
1981
|
+
plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"]
|
|
1927
1982
|
});
|
|
1928
1983
|
ret = unwrapTSNode(ret);
|
|
1929
1984
|
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
|
|
@@ -1932,6 +1987,26 @@ const isMemberExpressionNode = (path, context) => {
|
|
|
1932
1987
|
}
|
|
1933
1988
|
};
|
|
1934
1989
|
const isMemberExpression = isMemberExpressionNode;
|
|
1990
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
1991
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
1992
|
+
const isFnExpressionNode = (exp, context) => {
|
|
1993
|
+
try {
|
|
1994
|
+
let ret = exp.ast || parser.parseExpression(getExpSource(exp), {
|
|
1995
|
+
plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"]
|
|
1996
|
+
});
|
|
1997
|
+
if (ret.type === "Program") {
|
|
1998
|
+
ret = ret.body[0];
|
|
1999
|
+
if (ret.type === "ExpressionStatement") {
|
|
2000
|
+
ret = ret.expression;
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
ret = unwrapTSNode(ret);
|
|
2004
|
+
return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression";
|
|
2005
|
+
} catch (e) {
|
|
2006
|
+
return false;
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
const isFnExpression = isFnExpressionNode;
|
|
1935
2010
|
function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
|
|
1936
2011
|
return advancePositionWithMutation(
|
|
1937
2012
|
{
|
|
@@ -2446,7 +2521,9 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2446
2521
|
case 17:
|
|
2447
2522
|
case 18:
|
|
2448
2523
|
case 19:
|
|
2524
|
+
// "
|
|
2449
2525
|
case 20:
|
|
2526
|
+
// '
|
|
2450
2527
|
case 21:
|
|
2451
2528
|
emitError(9, end);
|
|
2452
2529
|
break;
|
|
@@ -3417,6 +3494,7 @@ function traverseNode(node, context) {
|
|
|
3417
3494
|
context.helper(TO_DISPLAY_STRING);
|
|
3418
3495
|
}
|
|
3419
3496
|
break;
|
|
3497
|
+
// for container types, further traverse downwards
|
|
3420
3498
|
case 9:
|
|
3421
3499
|
for (let i2 = 0; i2 < node.branches.length; i2++) {
|
|
3422
3500
|
traverseNode(node.branches[i2], context);
|
|
@@ -3893,6 +3971,7 @@ function genNode(node, context) {
|
|
|
3893
3971
|
case 21:
|
|
3894
3972
|
genNodeList(node.body, context, true, false);
|
|
3895
3973
|
break;
|
|
3974
|
+
// SSR only types
|
|
3896
3975
|
case 22:
|
|
3897
3976
|
genTemplateLiteral(node, context);
|
|
3898
3977
|
break;
|
|
@@ -5921,7 +6000,6 @@ function processSlotOutlet(node, context) {
|
|
|
5921
6000
|
};
|
|
5922
6001
|
}
|
|
5923
6002
|
|
|
5924
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
5925
6003
|
const transformOn = (dir, node, context, augmentor) => {
|
|
5926
6004
|
const { loc, modifiers, arg } = dir;
|
|
5927
6005
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -5962,8 +6040,8 @@ const transformOn = (dir, node, context, augmentor) => {
|
|
|
5962
6040
|
}
|
|
5963
6041
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
5964
6042
|
if (exp) {
|
|
5965
|
-
const isMemberExp = isMemberExpression(exp
|
|
5966
|
-
const isInlineStatement = !(isMemberExp ||
|
|
6043
|
+
const isMemberExp = isMemberExpression(exp, context);
|
|
6044
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp, context));
|
|
5967
6045
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
5968
6046
|
if (context.prefixIdentifiers) {
|
|
5969
6047
|
isInlineStatement && context.addIdentifiers(`$event`);
|
|
@@ -6133,7 +6211,7 @@ const transformModel = (dir, node, context) => {
|
|
|
6133
6211
|
return createTransformProps();
|
|
6134
6212
|
}
|
|
6135
6213
|
const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
|
|
6136
|
-
if (!expString.trim() || !isMemberExpression(
|
|
6214
|
+
if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
|
|
6137
6215
|
context.onError(
|
|
6138
6216
|
createCompilerError(42, exp.loc)
|
|
6139
6217
|
);
|
|
@@ -6268,27 +6346,35 @@ function parseFilter(node, context) {
|
|
|
6268
6346
|
case 34:
|
|
6269
6347
|
inDouble = true;
|
|
6270
6348
|
break;
|
|
6349
|
+
// "
|
|
6271
6350
|
case 39:
|
|
6272
6351
|
inSingle = true;
|
|
6273
6352
|
break;
|
|
6353
|
+
// '
|
|
6274
6354
|
case 96:
|
|
6275
6355
|
inTemplateString = true;
|
|
6276
6356
|
break;
|
|
6357
|
+
// `
|
|
6277
6358
|
case 40:
|
|
6278
6359
|
paren++;
|
|
6279
6360
|
break;
|
|
6361
|
+
// (
|
|
6280
6362
|
case 41:
|
|
6281
6363
|
paren--;
|
|
6282
6364
|
break;
|
|
6365
|
+
// )
|
|
6283
6366
|
case 91:
|
|
6284
6367
|
square++;
|
|
6285
6368
|
break;
|
|
6369
|
+
// [
|
|
6286
6370
|
case 93:
|
|
6287
6371
|
square--;
|
|
6288
6372
|
break;
|
|
6373
|
+
// ]
|
|
6289
6374
|
case 123:
|
|
6290
6375
|
curly++;
|
|
6291
6376
|
break;
|
|
6377
|
+
// {
|
|
6292
6378
|
case 125:
|
|
6293
6379
|
curly--;
|
|
6294
6380
|
break;
|
|
@@ -6539,6 +6625,9 @@ exports.hasScopeRef = hasScopeRef;
|
|
|
6539
6625
|
exports.helperNameMap = helperNameMap;
|
|
6540
6626
|
exports.injectProp = injectProp;
|
|
6541
6627
|
exports.isCoreComponent = isCoreComponent;
|
|
6628
|
+
exports.isFnExpression = isFnExpression;
|
|
6629
|
+
exports.isFnExpressionBrowser = isFnExpressionBrowser;
|
|
6630
|
+
exports.isFnExpressionNode = isFnExpressionNode;
|
|
6542
6631
|
exports.isFunctionType = isFunctionType;
|
|
6543
6632
|
exports.isInDestructureAssignment = isInDestructureAssignment;
|
|
6544
6633
|
exports.isInNewExpression = isInNewExpression;
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -1011,9 +1011,12 @@ export declare const isSimpleIdentifier: (name: string) => boolean;
|
|
|
1011
1011
|
* inside square brackets), but it's ok since these are only used on template
|
|
1012
1012
|
* expressions and false positives are invalid expressions in the first place.
|
|
1013
1013
|
*/
|
|
1014
|
-
export declare const isMemberExpressionBrowser: (
|
|
1015
|
-
export declare const isMemberExpressionNode: (
|
|
1016
|
-
export declare const isMemberExpression: (
|
|
1014
|
+
export declare const isMemberExpressionBrowser: (exp: ExpressionNode) => boolean;
|
|
1015
|
+
export declare const isMemberExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean;
|
|
1016
|
+
export declare const isMemberExpression: (exp: ExpressionNode, context: TransformContext) => boolean;
|
|
1017
|
+
export declare const isFnExpressionBrowser: (exp: ExpressionNode) => boolean;
|
|
1018
|
+
export declare const isFnExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean;
|
|
1019
|
+
export declare const isFnExpression: (exp: ExpressionNode, context: TransformContext) => boolean;
|
|
1017
1020
|
export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position;
|
|
1018
1021
|
export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position;
|
|
1019
1022
|
export declare function assert(condition: boolean, msg?: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.0-beta.
|
|
2
|
+
* @vue/compiler-core v3.5.0-beta.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1624,8 +1624,9 @@ const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
|
1624
1624
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
1625
1625
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
1626
1626
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
1627
|
-
const
|
|
1628
|
-
|
|
1627
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
1628
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
1629
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
1629
1630
|
let state = 0 /* inMemberExp */;
|
|
1630
1631
|
let stateStack = [];
|
|
1631
1632
|
let currentOpenBracketCount = 0;
|
|
@@ -1688,6 +1689,10 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
1688
1689
|
};
|
|
1689
1690
|
const isMemberExpressionNode = NOOP ;
|
|
1690
1691
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
1692
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
1693
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
1694
|
+
const isFnExpressionNode = NOOP ;
|
|
1695
|
+
const isFnExpression = isFnExpressionBrowser ;
|
|
1691
1696
|
function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
|
|
1692
1697
|
return advancePositionWithMutation(
|
|
1693
1698
|
{
|
|
@@ -2200,7 +2205,9 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2200
2205
|
case 17:
|
|
2201
2206
|
case 18:
|
|
2202
2207
|
case 19:
|
|
2208
|
+
// "
|
|
2203
2209
|
case 20:
|
|
2210
|
+
// '
|
|
2204
2211
|
case 21:
|
|
2205
2212
|
emitError(9, end);
|
|
2206
2213
|
break;
|
|
@@ -3183,6 +3190,7 @@ function traverseNode(node, context) {
|
|
|
3183
3190
|
context.helper(TO_DISPLAY_STRING);
|
|
3184
3191
|
}
|
|
3185
3192
|
break;
|
|
3193
|
+
// for container types, further traverse downwards
|
|
3186
3194
|
case 9:
|
|
3187
3195
|
for (let i2 = 0; i2 < node.branches.length; i2++) {
|
|
3188
3196
|
traverseNode(node.branches[i2], context);
|
|
@@ -3535,6 +3543,7 @@ function genNode(node, context) {
|
|
|
3535
3543
|
case 21:
|
|
3536
3544
|
genNodeList(node.body, context, true, false);
|
|
3537
3545
|
break;
|
|
3546
|
+
// SSR only types
|
|
3538
3547
|
case 22:
|
|
3539
3548
|
break;
|
|
3540
3549
|
case 23:
|
|
@@ -3545,6 +3554,7 @@ function genNode(node, context) {
|
|
|
3545
3554
|
break;
|
|
3546
3555
|
case 26:
|
|
3547
3556
|
break;
|
|
3557
|
+
/* istanbul ignore next */
|
|
3548
3558
|
case 10:
|
|
3549
3559
|
break;
|
|
3550
3560
|
default:
|
|
@@ -5279,7 +5289,6 @@ function processSlotOutlet(node, context) {
|
|
|
5279
5289
|
};
|
|
5280
5290
|
}
|
|
5281
5291
|
|
|
5282
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
5283
5292
|
const transformOn = (dir, node, context, augmentor) => {
|
|
5284
5293
|
const { loc, modifiers, arg } = dir;
|
|
5285
5294
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -5323,8 +5332,8 @@ const transformOn = (dir, node, context, augmentor) => {
|
|
|
5323
5332
|
}
|
|
5324
5333
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
5325
5334
|
if (exp) {
|
|
5326
|
-
const isMemberExp = isMemberExpression(exp
|
|
5327
|
-
const isInlineStatement = !(isMemberExp ||
|
|
5335
|
+
const isMemberExp = isMemberExpression(exp);
|
|
5336
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp));
|
|
5328
5337
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
5329
5338
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
5330
5339
|
validateBrowserExpression(
|
|
@@ -5472,7 +5481,7 @@ const transformModel = (dir, node, context) => {
|
|
|
5472
5481
|
return createTransformProps();
|
|
5473
5482
|
}
|
|
5474
5483
|
const maybeRef = false;
|
|
5475
|
-
if (!expString.trim() || !isMemberExpression(
|
|
5484
|
+
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
5476
5485
|
context.onError(
|
|
5477
5486
|
createCompilerError(42, exp.loc)
|
|
5478
5487
|
);
|
|
@@ -5583,27 +5592,35 @@ function parseFilter(node, context) {
|
|
|
5583
5592
|
case 34:
|
|
5584
5593
|
inDouble = true;
|
|
5585
5594
|
break;
|
|
5595
|
+
// "
|
|
5586
5596
|
case 39:
|
|
5587
5597
|
inSingle = true;
|
|
5588
5598
|
break;
|
|
5599
|
+
// '
|
|
5589
5600
|
case 96:
|
|
5590
5601
|
inTemplateString = true;
|
|
5591
5602
|
break;
|
|
5603
|
+
// `
|
|
5592
5604
|
case 40:
|
|
5593
5605
|
paren++;
|
|
5594
5606
|
break;
|
|
5607
|
+
// (
|
|
5595
5608
|
case 41:
|
|
5596
5609
|
paren--;
|
|
5597
5610
|
break;
|
|
5611
|
+
// )
|
|
5598
5612
|
case 91:
|
|
5599
5613
|
square++;
|
|
5600
5614
|
break;
|
|
5615
|
+
// [
|
|
5601
5616
|
case 93:
|
|
5602
5617
|
square--;
|
|
5603
5618
|
break;
|
|
5619
|
+
// ]
|
|
5604
5620
|
case 123:
|
|
5605
5621
|
curly++;
|
|
5606
5622
|
break;
|
|
5623
|
+
// {
|
|
5607
5624
|
case 125:
|
|
5608
5625
|
curly--;
|
|
5609
5626
|
break;
|
|
@@ -5760,4 +5777,4 @@ const BindingTypes = {
|
|
|
5760
5777
|
|
|
5761
5778
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
5762
5779
|
|
|
5763
|
-
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, 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, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFunctionType, isInDestructureAssignment, isInNewExpression, 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, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
|
5780
|
+
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, 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, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, 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, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.5.0-beta.
|
|
3
|
+
"version": "3.5.0-beta.3",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/parser": "^7.25.3",
|
|
50
|
-
"entities": "^5.0
|
|
50
|
+
"entities": "^4.5.0",
|
|
51
51
|
"estree-walker": "^2.0.2",
|
|
52
52
|
"source-map-js": "^1.2.0",
|
|
53
|
-
"@vue/shared": "3.5.0-beta.
|
|
53
|
+
"@vue/shared": "3.5.0-beta.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.25.2"
|