@vue/compiler-core 3.5.0-alpha.5 → 3.5.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.0-
|
|
2
|
+
* @vue/compiler-core v3.5.0-beta.1
|
|
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/dist/decode.js');
|
|
12
12
|
var parser = require('@babel/parser');
|
|
13
13
|
var estreeWalker = require('estree-walker');
|
|
14
14
|
var sourceMapJs = require('source-map-js');
|
|
@@ -17,36 +17,70 @@ const FRAGMENT = Symbol(`Fragment` );
|
|
|
17
17
|
const TELEPORT = Symbol(`Teleport` );
|
|
18
18
|
const SUSPENSE = Symbol(`Suspense` );
|
|
19
19
|
const KEEP_ALIVE = Symbol(`KeepAlive` );
|
|
20
|
-
const BASE_TRANSITION = Symbol(
|
|
20
|
+
const BASE_TRANSITION = Symbol(
|
|
21
|
+
`BaseTransition`
|
|
22
|
+
);
|
|
21
23
|
const OPEN_BLOCK = Symbol(`openBlock` );
|
|
22
24
|
const CREATE_BLOCK = Symbol(`createBlock` );
|
|
23
|
-
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
25
|
+
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
26
|
+
`createElementBlock`
|
|
27
|
+
);
|
|
24
28
|
const CREATE_VNODE = Symbol(`createVNode` );
|
|
25
|
-
const CREATE_ELEMENT_VNODE = Symbol(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
29
|
+
const CREATE_ELEMENT_VNODE = Symbol(
|
|
30
|
+
`createElementVNode`
|
|
31
|
+
);
|
|
32
|
+
const CREATE_COMMENT = Symbol(
|
|
33
|
+
`createCommentVNode`
|
|
34
|
+
);
|
|
35
|
+
const CREATE_TEXT = Symbol(
|
|
36
|
+
`createTextVNode`
|
|
37
|
+
);
|
|
38
|
+
const CREATE_STATIC = Symbol(
|
|
39
|
+
`createStaticVNode`
|
|
40
|
+
);
|
|
41
|
+
const RESOLVE_COMPONENT = Symbol(
|
|
42
|
+
`resolveComponent`
|
|
43
|
+
);
|
|
30
44
|
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
31
45
|
`resolveDynamicComponent`
|
|
32
46
|
);
|
|
33
|
-
const RESOLVE_DIRECTIVE = Symbol(
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
const RESOLVE_DIRECTIVE = Symbol(
|
|
48
|
+
`resolveDirective`
|
|
49
|
+
);
|
|
50
|
+
const RESOLVE_FILTER = Symbol(
|
|
51
|
+
`resolveFilter`
|
|
52
|
+
);
|
|
53
|
+
const WITH_DIRECTIVES = Symbol(
|
|
54
|
+
`withDirectives`
|
|
55
|
+
);
|
|
36
56
|
const RENDER_LIST = Symbol(`renderList` );
|
|
37
57
|
const RENDER_SLOT = Symbol(`renderSlot` );
|
|
38
58
|
const CREATE_SLOTS = Symbol(`createSlots` );
|
|
39
|
-
const TO_DISPLAY_STRING = Symbol(
|
|
59
|
+
const TO_DISPLAY_STRING = Symbol(
|
|
60
|
+
`toDisplayString`
|
|
61
|
+
);
|
|
40
62
|
const MERGE_PROPS = Symbol(`mergeProps` );
|
|
41
|
-
const NORMALIZE_CLASS = Symbol(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
63
|
+
const NORMALIZE_CLASS = Symbol(
|
|
64
|
+
`normalizeClass`
|
|
65
|
+
);
|
|
66
|
+
const NORMALIZE_STYLE = Symbol(
|
|
67
|
+
`normalizeStyle`
|
|
68
|
+
);
|
|
69
|
+
const NORMALIZE_PROPS = Symbol(
|
|
70
|
+
`normalizeProps`
|
|
71
|
+
);
|
|
72
|
+
const GUARD_REACTIVE_PROPS = Symbol(
|
|
73
|
+
`guardReactiveProps`
|
|
74
|
+
);
|
|
45
75
|
const TO_HANDLERS = Symbol(`toHandlers` );
|
|
46
76
|
const CAMELIZE = Symbol(`camelize` );
|
|
47
77
|
const CAPITALIZE = Symbol(`capitalize` );
|
|
48
|
-
const TO_HANDLER_KEY = Symbol(
|
|
49
|
-
|
|
78
|
+
const TO_HANDLER_KEY = Symbol(
|
|
79
|
+
`toHandlerKey`
|
|
80
|
+
);
|
|
81
|
+
const SET_BLOCK_TRACKING = Symbol(
|
|
82
|
+
`setBlockTracking`
|
|
83
|
+
);
|
|
50
84
|
const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
|
|
51
85
|
const POP_SCOPE_ID = Symbol(`popScopeId` );
|
|
52
86
|
const WITH_CTX = Symbol(`withCtx` );
|
|
@@ -1539,6 +1573,16 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|
|
1539
1573
|
(id) => markScopeIdentifier(node, id, knownIds)
|
|
1540
1574
|
);
|
|
1541
1575
|
}
|
|
1576
|
+
} else if (node.type === "CatchClause" && node.param) {
|
|
1577
|
+
for (const id of extractIdentifiers(node.param)) {
|
|
1578
|
+
markScopeIdentifier(node, id, knownIds);
|
|
1579
|
+
}
|
|
1580
|
+
} else if (isForStatement(node)) {
|
|
1581
|
+
walkForStatement(
|
|
1582
|
+
node,
|
|
1583
|
+
false,
|
|
1584
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
1585
|
+
);
|
|
1542
1586
|
}
|
|
1543
1587
|
},
|
|
1544
1588
|
leave(node, parent) {
|
|
@@ -1619,14 +1663,20 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
1619
1663
|
} else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
|
|
1620
1664
|
if (stmt.declare || !stmt.id) continue;
|
|
1621
1665
|
onIdent(stmt.id);
|
|
1622
|
-
} else if (stmt
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1666
|
+
} else if (isForStatement(stmt)) {
|
|
1667
|
+
walkForStatement(stmt, true, onIdent);
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
function isForStatement(stmt) {
|
|
1672
|
+
return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
|
|
1673
|
+
}
|
|
1674
|
+
function walkForStatement(stmt, isVar, onIdent) {
|
|
1675
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
1676
|
+
if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
|
|
1677
|
+
for (const decl of variable.declarations) {
|
|
1678
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
1679
|
+
onIdent(id);
|
|
1630
1680
|
}
|
|
1631
1681
|
}
|
|
1632
1682
|
}
|
|
@@ -5407,7 +5457,7 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
5407
5457
|
} else {
|
|
5408
5458
|
exp = isProp.exp;
|
|
5409
5459
|
if (!exp) {
|
|
5410
|
-
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
5460
|
+
exp = createSimpleExpression(`is`, false, isProp.arg.loc);
|
|
5411
5461
|
{
|
|
5412
5462
|
exp = isProp.exp = processExpression(exp, context);
|
|
5413
5463
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.0-
|
|
2
|
+
* @vue/compiler-core v3.5.0-beta.1
|
|
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/dist/decode.js');
|
|
12
12
|
var parser = require('@babel/parser');
|
|
13
13
|
var estreeWalker = require('estree-walker');
|
|
14
14
|
var sourceMapJs = require('source-map-js');
|
|
@@ -17,36 +17,70 @@ const FRAGMENT = Symbol(``);
|
|
|
17
17
|
const TELEPORT = Symbol(``);
|
|
18
18
|
const SUSPENSE = Symbol(``);
|
|
19
19
|
const KEEP_ALIVE = Symbol(``);
|
|
20
|
-
const BASE_TRANSITION = Symbol(
|
|
20
|
+
const BASE_TRANSITION = Symbol(
|
|
21
|
+
``
|
|
22
|
+
);
|
|
21
23
|
const OPEN_BLOCK = Symbol(``);
|
|
22
24
|
const CREATE_BLOCK = Symbol(``);
|
|
23
|
-
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
25
|
+
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
26
|
+
``
|
|
27
|
+
);
|
|
24
28
|
const CREATE_VNODE = Symbol(``);
|
|
25
|
-
const CREATE_ELEMENT_VNODE = Symbol(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
29
|
+
const CREATE_ELEMENT_VNODE = Symbol(
|
|
30
|
+
``
|
|
31
|
+
);
|
|
32
|
+
const CREATE_COMMENT = Symbol(
|
|
33
|
+
``
|
|
34
|
+
);
|
|
35
|
+
const CREATE_TEXT = Symbol(
|
|
36
|
+
``
|
|
37
|
+
);
|
|
38
|
+
const CREATE_STATIC = Symbol(
|
|
39
|
+
``
|
|
40
|
+
);
|
|
41
|
+
const RESOLVE_COMPONENT = Symbol(
|
|
42
|
+
``
|
|
43
|
+
);
|
|
30
44
|
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
31
45
|
``
|
|
32
46
|
);
|
|
33
|
-
const RESOLVE_DIRECTIVE = Symbol(
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
const RESOLVE_DIRECTIVE = Symbol(
|
|
48
|
+
``
|
|
49
|
+
);
|
|
50
|
+
const RESOLVE_FILTER = Symbol(
|
|
51
|
+
``
|
|
52
|
+
);
|
|
53
|
+
const WITH_DIRECTIVES = Symbol(
|
|
54
|
+
``
|
|
55
|
+
);
|
|
36
56
|
const RENDER_LIST = Symbol(``);
|
|
37
57
|
const RENDER_SLOT = Symbol(``);
|
|
38
58
|
const CREATE_SLOTS = Symbol(``);
|
|
39
|
-
const TO_DISPLAY_STRING = Symbol(
|
|
59
|
+
const TO_DISPLAY_STRING = Symbol(
|
|
60
|
+
``
|
|
61
|
+
);
|
|
40
62
|
const MERGE_PROPS = Symbol(``);
|
|
41
|
-
const NORMALIZE_CLASS = Symbol(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
63
|
+
const NORMALIZE_CLASS = Symbol(
|
|
64
|
+
``
|
|
65
|
+
);
|
|
66
|
+
const NORMALIZE_STYLE = Symbol(
|
|
67
|
+
``
|
|
68
|
+
);
|
|
69
|
+
const NORMALIZE_PROPS = Symbol(
|
|
70
|
+
``
|
|
71
|
+
);
|
|
72
|
+
const GUARD_REACTIVE_PROPS = Symbol(
|
|
73
|
+
``
|
|
74
|
+
);
|
|
45
75
|
const TO_HANDLERS = Symbol(``);
|
|
46
76
|
const CAMELIZE = Symbol(``);
|
|
47
77
|
const CAPITALIZE = Symbol(``);
|
|
48
|
-
const TO_HANDLER_KEY = Symbol(
|
|
49
|
-
|
|
78
|
+
const TO_HANDLER_KEY = Symbol(
|
|
79
|
+
``
|
|
80
|
+
);
|
|
81
|
+
const SET_BLOCK_TRACKING = Symbol(
|
|
82
|
+
``
|
|
83
|
+
);
|
|
50
84
|
const PUSH_SCOPE_ID = Symbol(``);
|
|
51
85
|
const POP_SCOPE_ID = Symbol(``);
|
|
52
86
|
const WITH_CTX = Symbol(``);
|
|
@@ -1535,6 +1569,16 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|
|
1535
1569
|
(id) => markScopeIdentifier(node, id, knownIds)
|
|
1536
1570
|
);
|
|
1537
1571
|
}
|
|
1572
|
+
} else if (node.type === "CatchClause" && node.param) {
|
|
1573
|
+
for (const id of extractIdentifiers(node.param)) {
|
|
1574
|
+
markScopeIdentifier(node, id, knownIds);
|
|
1575
|
+
}
|
|
1576
|
+
} else if (isForStatement(node)) {
|
|
1577
|
+
walkForStatement(
|
|
1578
|
+
node,
|
|
1579
|
+
false,
|
|
1580
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
1581
|
+
);
|
|
1538
1582
|
}
|
|
1539
1583
|
},
|
|
1540
1584
|
leave(node, parent) {
|
|
@@ -1615,14 +1659,20 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
1615
1659
|
} else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
|
|
1616
1660
|
if (stmt.declare || !stmt.id) continue;
|
|
1617
1661
|
onIdent(stmt.id);
|
|
1618
|
-
} else if (stmt
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1662
|
+
} else if (isForStatement(stmt)) {
|
|
1663
|
+
walkForStatement(stmt, true, onIdent);
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
function isForStatement(stmt) {
|
|
1668
|
+
return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
|
|
1669
|
+
}
|
|
1670
|
+
function walkForStatement(stmt, isVar, onIdent) {
|
|
1671
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
1672
|
+
if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
|
|
1673
|
+
for (const decl of variable.declarations) {
|
|
1674
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
1675
|
+
onIdent(id);
|
|
1626
1676
|
}
|
|
1627
1677
|
}
|
|
1628
1678
|
}
|
|
@@ -5312,7 +5362,7 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
5312
5362
|
} else {
|
|
5313
5363
|
exp = isProp.exp;
|
|
5314
5364
|
if (!exp) {
|
|
5315
|
-
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
5365
|
+
exp = createSimpleExpression(`is`, false, isProp.arg.loc);
|
|
5316
5366
|
{
|
|
5317
5367
|
exp = isProp.exp = processExpression(exp, context);
|
|
5318
5368
|
}
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ export declare function createStructuralDirectiveTransform(name: string | RegExp
|
|
|
132
132
|
export declare const transformElement: NodeTransform;
|
|
133
133
|
export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression;
|
|
134
134
|
export type PropsExpression = ObjectExpression | CallExpression | ExpressionNode;
|
|
135
|
-
export declare function buildProps(node: ElementNode, context: TransformContext, props:
|
|
135
|
+
export declare function buildProps(node: ElementNode, context: TransformContext, props: ElementNode['props'] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): {
|
|
136
136
|
props: PropsExpression | undefined;
|
|
137
137
|
directives: DirectiveNode[];
|
|
138
138
|
patchFlag: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.0-
|
|
2
|
+
* @vue/compiler-core v3.5.0-beta.1
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -10,36 +10,70 @@ const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` :
|
|
|
10
10
|
const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``);
|
|
11
11
|
const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``);
|
|
12
12
|
const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``);
|
|
13
|
-
const BASE_TRANSITION = Symbol(
|
|
13
|
+
const BASE_TRANSITION = Symbol(
|
|
14
|
+
!!(process.env.NODE_ENV !== "production") ? `BaseTransition` : ``
|
|
15
|
+
);
|
|
14
16
|
const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``);
|
|
15
17
|
const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``);
|
|
16
|
-
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
18
|
+
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
19
|
+
!!(process.env.NODE_ENV !== "production") ? `createElementBlock` : ``
|
|
20
|
+
);
|
|
17
21
|
const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``);
|
|
18
|
-
const CREATE_ELEMENT_VNODE = Symbol(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
22
|
+
const CREATE_ELEMENT_VNODE = Symbol(
|
|
23
|
+
!!(process.env.NODE_ENV !== "production") ? `createElementVNode` : ``
|
|
24
|
+
);
|
|
25
|
+
const CREATE_COMMENT = Symbol(
|
|
26
|
+
!!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : ``
|
|
27
|
+
);
|
|
28
|
+
const CREATE_TEXT = Symbol(
|
|
29
|
+
!!(process.env.NODE_ENV !== "production") ? `createTextVNode` : ``
|
|
30
|
+
);
|
|
31
|
+
const CREATE_STATIC = Symbol(
|
|
32
|
+
!!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : ``
|
|
33
|
+
);
|
|
34
|
+
const RESOLVE_COMPONENT = Symbol(
|
|
35
|
+
!!(process.env.NODE_ENV !== "production") ? `resolveComponent` : ``
|
|
36
|
+
);
|
|
23
37
|
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
24
38
|
!!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : ``
|
|
25
39
|
);
|
|
26
|
-
const RESOLVE_DIRECTIVE = Symbol(
|
|
27
|
-
|
|
28
|
-
|
|
40
|
+
const RESOLVE_DIRECTIVE = Symbol(
|
|
41
|
+
!!(process.env.NODE_ENV !== "production") ? `resolveDirective` : ``
|
|
42
|
+
);
|
|
43
|
+
const RESOLVE_FILTER = Symbol(
|
|
44
|
+
!!(process.env.NODE_ENV !== "production") ? `resolveFilter` : ``
|
|
45
|
+
);
|
|
46
|
+
const WITH_DIRECTIVES = Symbol(
|
|
47
|
+
!!(process.env.NODE_ENV !== "production") ? `withDirectives` : ``
|
|
48
|
+
);
|
|
29
49
|
const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``);
|
|
30
50
|
const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``);
|
|
31
51
|
const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``);
|
|
32
|
-
const TO_DISPLAY_STRING = Symbol(
|
|
52
|
+
const TO_DISPLAY_STRING = Symbol(
|
|
53
|
+
!!(process.env.NODE_ENV !== "production") ? `toDisplayString` : ``
|
|
54
|
+
);
|
|
33
55
|
const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``);
|
|
34
|
-
const NORMALIZE_CLASS = Symbol(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
56
|
+
const NORMALIZE_CLASS = Symbol(
|
|
57
|
+
!!(process.env.NODE_ENV !== "production") ? `normalizeClass` : ``
|
|
58
|
+
);
|
|
59
|
+
const NORMALIZE_STYLE = Symbol(
|
|
60
|
+
!!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : ``
|
|
61
|
+
);
|
|
62
|
+
const NORMALIZE_PROPS = Symbol(
|
|
63
|
+
!!(process.env.NODE_ENV !== "production") ? `normalizeProps` : ``
|
|
64
|
+
);
|
|
65
|
+
const GUARD_REACTIVE_PROPS = Symbol(
|
|
66
|
+
!!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : ``
|
|
67
|
+
);
|
|
38
68
|
const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``);
|
|
39
69
|
const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``);
|
|
40
70
|
const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``);
|
|
41
|
-
const TO_HANDLER_KEY = Symbol(
|
|
42
|
-
|
|
71
|
+
const TO_HANDLER_KEY = Symbol(
|
|
72
|
+
!!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : ``
|
|
73
|
+
);
|
|
74
|
+
const SET_BLOCK_TRACKING = Symbol(
|
|
75
|
+
!!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : ``
|
|
76
|
+
);
|
|
43
77
|
const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``);
|
|
44
78
|
const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``);
|
|
45
79
|
const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``);
|
|
@@ -1490,14 +1524,20 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
1490
1524
|
} else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
|
|
1491
1525
|
if (stmt.declare || !stmt.id) continue;
|
|
1492
1526
|
onIdent(stmt.id);
|
|
1493
|
-
} else if (stmt
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1527
|
+
} else if (isForStatement(stmt)) {
|
|
1528
|
+
walkForStatement(stmt, true, onIdent);
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
function isForStatement(stmt) {
|
|
1533
|
+
return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
|
|
1534
|
+
}
|
|
1535
|
+
function walkForStatement(stmt, isVar, onIdent) {
|
|
1536
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
1537
|
+
if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
|
|
1538
|
+
for (const decl of variable.declarations) {
|
|
1539
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
1540
|
+
onIdent(id);
|
|
1501
1541
|
}
|
|
1502
1542
|
}
|
|
1503
1543
|
}
|
|
@@ -4735,7 +4775,7 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
4735
4775
|
} else {
|
|
4736
4776
|
exp = isProp.exp;
|
|
4737
4777
|
if (!exp) {
|
|
4738
|
-
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
4778
|
+
exp = createSimpleExpression(`is`, false, isProp.arg.loc);
|
|
4739
4779
|
}
|
|
4740
4780
|
}
|
|
4741
4781
|
if (exp) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.5.0-
|
|
3
|
+
"version": "3.5.0-beta.1",
|
|
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.
|
|
50
|
-
"entities": "^
|
|
49
|
+
"@babel/parser": "^7.25.3",
|
|
50
|
+
"entities": "^5.0.0",
|
|
51
51
|
"estree-walker": "^2.0.2",
|
|
52
52
|
"source-map-js": "^1.2.0",
|
|
53
|
-
"@vue/shared": "3.5.0-
|
|
53
|
+
"@vue/shared": "3.5.0-beta.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/types": "^7.
|
|
56
|
+
"@babel/types": "^7.25.2"
|
|
57
57
|
}
|
|
58
58
|
}
|