[be][tests] Move PropagateScopeDep fixtures to separate directory
Mofei Zhang committed
Mar 27, 2024 at 20:26 UTC
4d37a599e302ec11647c75b9cedfce52922256b8
51 files changed
+207
-103
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-condexpr.expect.md
renamed
+9
-1
@@ -36,4 +36,12 @@ function TestCondDepInConditionalExpr(props, other) {
36
}
37
38
```
39
-
\ No newline at end of file
39
+
40
+### Eval output
41
+(kind: exception) Fixture not implemented!
42
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
43
+ '\n' +
44
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
45
+ '\n' +
46
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
47
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-condexpr.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-ifelse.expect.md
renamed
+9
-1
@@ -45,4 +45,12 @@ function TestCondDepInDirectIfElse(props, other) {
45
}
46
47
```
48
-
\ No newline at end of file
48
+
49
+### Eval output
50
+(kind: exception) Fixture not implemented!
51
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
52
+ '\n' +
53
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
54
+ '\n' +
55
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
56
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-ifelse.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-nested-ifelse-missing.expect.md
renamed
+9
-1
@@ -47,4 +47,12 @@ function TestCondDepInNestedIfElse(props, other) {
47
}
48
49
```
50
-
\ No newline at end of file
50
+
51
+### Eval output
52
+(kind: exception) Fixture not implemented!
53
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
54
+ '\n' +
55
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
56
+ '\n' +
57
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
58
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-nested-ifelse-missing.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-nested-ifelse.expect.md
renamed
+9
-1
@@ -59,4 +59,12 @@ function TestCondDepInNestedIfElse(props, other) {
59
}
60
61
```
62
-
\ No newline at end of file
62
+
63
+### Eval output
64
+(kind: exception) Fixture not implemented!
65
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
66
+ '\n' +
67
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
68
+ '\n' +
69
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
70
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-nested-ifelse.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-exhaustive.expect.md
renamed
+9
-1
@@ -58,4 +58,12 @@ function TestCondDepInSwitch(props, other) {
58
}
59
60
```
61
-
\ No newline at end of file
61
+
62
+### Eval output
63
+(kind: exception) Fixture not implemented!
64
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
65
+ '\n' +
66
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
67
+ '\n' +
68
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
69
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-exhaustive.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-missing-case.expect.md
renamed
+9
-1
@@ -57,4 +57,12 @@ function TestCondDepInSwitchMissingCase(props, other) {
57
}
58
59
```
60
-
\ No newline at end of file
60
+
61
+### Eval output
62
+(kind: exception) Fixture not implemented!
63
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
64
+ '\n' +
65
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
66
+ '\n' +
67
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
68
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-missing-case.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-missing-default.expect.md
renamed
+9
-1
@@ -50,4 +50,12 @@ function TestCondDepInSwitchMissingDefault(props, other) {
50
}
51
52
```
53
-
\ No newline at end of file
53
+
54
+### Eval output
55
+(kind: exception) Fixture not implemented!
56
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
57
+ '\n' +
58
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
59
+ '\n' +
60
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
61
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-missing-default.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cond-scope.expect.md
renamed
+9
-1
@@ -78,4 +78,12 @@ function TestReactiveDepsInCondScope(props) {
78
}
79
80
```
81
-
\ No newline at end of file
81
+
82
+### Eval output
83
+(kind: exception) Fixture not implemented!
84
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
85
+ '\n' +
86
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
87
+ '\n' +
88
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
89
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/cond-scope.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/conditional-member-expr.expect.md
renamed
+5
-5
@@ -14,8 +14,7 @@ function Component(props) {
14
15
export const FIXTURE_ENTRYPOINT = {
16
fn: Component,
17
- params: ["TodoAdd"],
18
- isComponent: "TodoAdd",
17
+ params: [{ a: null }],
18
};
19
20
```
@@ -43,9 +42,10 @@ function Component(props) {
42
43
export const FIXTURE_ENTRYPOINT = {
44
fn: Component,
46
- params: ["TodoAdd"],
47
- isComponent: "TodoAdd",
45
+ params: [{ a: null }],
46
};
47
48
```
51
-
\ No newline at end of file
49
+
50
+### Eval output
51
+(kind: ok) [null]
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/conditional-member-expr.js
renamed
+1
-2
@@ -10,6 +10,5 @@ function Component(props) {
10
11
export const FIXTURE_ENTRYPOINT = {
12
fn: Component,
13
- params: ["TodoAdd"],
14
- isComponent: "TodoAdd",
13
+ params: [{ a: null }],
14
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/join-uncond-scopes-cond-deps.expect.md
renamed
+9
-1
@@ -89,4 +89,12 @@ function TestJoinCondDepsInUncondScopes(props) {
89
}
90
91
```
92
-
\ No newline at end of file
92
+
93
+### Eval output
94
+(kind: exception) Fixture not implemented!
95
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
96
+ '\n' +
97
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
98
+ '\n' +
99
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
100
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/join-uncond-scopes-cond-deps.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/memberexpr-join-optional-chain.expect.md
renamed
+5
-5
@@ -22,8 +22,7 @@ function Component(props) {
22
23
export const FIXTURE_ENTRYPOINT = {
24
fn: Component,
25
- params: ["TodoAdd"],
26
- isComponent: "TodoAdd",
25
+ params: [{ a: { b: { c: 1 } } }],
26
};
27
28
```
@@ -59,9 +58,10 @@ function Component(props) {
58
59
export const FIXTURE_ENTRYPOINT = {
60
fn: Component,
62
- params: ["TodoAdd"],
63
- isComponent: "TodoAdd",
61
+ params: [{ a: { b: { c: 1 } } }],
62
};
63
64
```
67
-
\ No newline at end of file
65
+
66
+### Eval output
67
+(kind: ok) [{"c":1},1]
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/memberexpr-join-optional-chain.ts
renamed
+1
-2
@@ -18,6 +18,5 @@ function Component(props) {
18
19
export const FIXTURE_ENTRYPOINT = {
20
fn: Component,
21
- params: ["TodoAdd"],
22
- isComponent: "TodoAdd",
21
+ params: [{ a: { b: { c: 1 } } }],
22
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/memberexpr-join-optional-chain2.expect.md
renamed
+13
-1
@@ -9,6 +9,11 @@ function Component(props) {
9
return x;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: [{ items: { edges: null, length: 0 } }],
15
+};
16
+
17
```
18
19
## Code
@@ -30,5 +35,12 @@ function Component(props) {
35
return x;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Component,
40
+ params: [{ items: { edges: null, length: 0 } }],
41
+};
42
+
43
```
34
-
\ No newline at end of file
44
+
45
+### Eval output
46
+(kind: ok) [0,[]]
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/memberexpr-join-optional-chain2.ts
renamed
+5
@@ -4,3 +4,8 @@ function Component(props) {
4
x.push(props.items?.edges?.map?.(render)?.filter?.(Boolean) ?? []);
5
return x;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: [{ items: { edges: null, length: 0 } }],
11
+};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/no-uncond.expect.md
renamed
+9
-1
@@ -39,4 +39,12 @@ function TestOnlyConditionalDependencies(props, other) {
39
}
40
41
```
42
-
\ No newline at end of file
42
+
43
+### Eval output
44
+(kind: exception) Fixture not implemented!
45
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
46
+ '\n' +
47
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
48
+ '\n' +
49
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
50
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/no-uncond.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/promote-uncond.expect.md
renamed
+9
-1
@@ -41,4 +41,12 @@ function TestPromoteUnconditionalAccessToDependency(props, other) {
41
}
42
43
```
44
-
\ No newline at end of file
44
+
45
+### Eval output
46
+(kind: exception) Fixture not implemented!
47
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
48
+ '\n' +
49
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
50
+ '\n' +
51
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
52
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/promote-uncond.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/subpath-order1.expect.md
renamed
+9
-1
@@ -45,4 +45,12 @@ function TestConditionalSubpath1(props, other) {
45
}
46
47
```
48
-
\ No newline at end of file
48
+
49
+### Eval output
50
+(kind: exception) Fixture not implemented!
51
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
52
+ '\n' +
53
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
54
+ '\n' +
55
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
56
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/subpath-order1.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/subpath-order2.expect.md
renamed
+9
-1
@@ -46,4 +46,12 @@ function TestConditionalSubpath2(props, other) {
46
}
47
48
```
49
-
\ No newline at end of file
49
+
50
+### Eval output
51
+(kind: exception) Fixture not implemented!
52
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
53
+ '\n' +
54
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
55
+ '\n' +
56
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
57
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/subpath-order2.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/superpath-order1.expect.md
renamed
+9
-1
@@ -43,4 +43,12 @@ function TestConditionalSuperpath1(props, other) {
43
}
44
45
```
46
-
\ No newline at end of file
46
+
47
+### Eval output
48
+(kind: exception) Fixture not implemented!
49
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
50
+ '\n' +
51
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
52
+ '\n' +
53
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
54
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/superpath-order1.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/superpath-order2.expect.md
renamed
+9
-1
@@ -44,4 +44,12 @@ function TestConditionalSuperpath2(props, other) {
44
}
45
46
```
47
-
\ No newline at end of file
47
+
48
+### Eval output
49
+(kind: exception) Fixture not implemented!
50
+logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
51
+ '\n' +
52
+ ' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
53
+ '\n' +
54
+ 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
55
+ 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/superpath-order2.js
renamed
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-nonoverlap-descendant.expect.md
renamed
+5
-5
@@ -14,8 +14,7 @@ function TestNonOverlappingDescendantTracked(props) {
14
15
export const FIXTURE_ENTRYPOINT = {
16
fn: TestNonOverlappingDescendantTracked,
17
- params: ["TodoAdd"],
18
- isComponent: "TodoAdd",
17
+ params: [{ a: { x: {}, c: { x: { y: { z: 3 } } } } }],
18
};
19
20
```
@@ -45,9 +44,10 @@ function TestNonOverlappingDescendantTracked(props) {
44
45
export const FIXTURE_ENTRYPOINT = {
46
fn: TestNonOverlappingDescendantTracked,
48
- params: ["TodoAdd"],
49
- isComponent: "TodoAdd",
47
+ params: [{ a: { x: {}, c: { x: { y: { z: 3 } } } } }],
48
};
49
50
```
53
-
\ No newline at end of file
51
+
52
+### Eval output
53
+(kind: ok) {"c":3}
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-nonoverlap-descendant.js
renamed
+1
-2
@@ -10,6 +10,5 @@ function TestNonOverlappingDescendantTracked(props) {
10
11
export const FIXTURE_ENTRYPOINT = {
12
fn: TestNonOverlappingDescendantTracked,
13
- params: ["TodoAdd"],
14
- isComponent: "TodoAdd",
13
+ params: [{ a: { x: {}, c: { x: { y: { z: 3 } } } } }],
14
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-nonoverlap-direct.expect.md
renamed
+5
-5
@@ -13,8 +13,7 @@ function TestNonOverlappingTracked(props) {
13
14
export const FIXTURE_ENTRYPOINT = {
15
fn: TestNonOverlappingTracked,
16
- params: ["TodoAdd"],
17
- isComponent: "TodoAdd",
16
+ params: [{ a: { b: 2, c: 3 } }],
17
};
18
19
```
@@ -42,9 +41,10 @@ function TestNonOverlappingTracked(props) {
41
42
export const FIXTURE_ENTRYPOINT = {
43
fn: TestNonOverlappingTracked,
45
- params: ["TodoAdd"],
46
- isComponent: "TodoAdd",
44
+ params: [{ a: { b: 2, c: 3 } }],
45
};
46
47
```
50
-
\ No newline at end of file
48
+
49
+### Eval output
50
+(kind: ok) {"b":2,"c":3}
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-nonoverlap-direct.js
renamed
+1
-2
@@ -9,6 +9,5 @@ function TestNonOverlappingTracked(props) {
9
10
export const FIXTURE_ENTRYPOINT = {
11
fn: TestNonOverlappingTracked,
12
- params: ["TodoAdd"],
13
- isComponent: "TodoAdd",
12
+ params: [{ a: { b: 2, c: 3 } }],
13
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-overlap-descendant.expect.md
renamed
+5
-5
@@ -14,8 +14,7 @@ function TestOverlappingDescendantTracked(props) {
14
15
export const FIXTURE_ENTRYPOINT = {
16
fn: TestOverlappingDescendantTracked,
17
- params: ["TodoAdd"],
18
- isComponent: "TodoAdd",
17
+ params: [{ a: { b: { c: { x: { y: 5 } } } } }],
18
};
19
20
```
@@ -43,9 +42,10 @@ function TestOverlappingDescendantTracked(props) {
42
43
export const FIXTURE_ENTRYPOINT = {
44
fn: TestOverlappingDescendantTracked,
46
- params: ["TodoAdd"],
47
- isComponent: "TodoAdd",
45
+ params: [{ a: { b: { c: { x: { y: 5 } } } } }],
46
};
47
48
```
51
-
\ No newline at end of file
49
+
50
+### Eval output
51
+(kind: ok) {"b":{"x":{"y":5}},"c":5,"a":{"b":{"c":"[[ cyclic ref *1 ]]"}}}
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-overlap-descendant.js
renamed
+1
-2
@@ -10,6 +10,5 @@ function TestOverlappingDescendantTracked(props) {
10
11
export const FIXTURE_ENTRYPOINT = {
12
fn: TestOverlappingDescendantTracked,
13
- params: ["TodoAdd"],
14
- isComponent: "TodoAdd",
13
+ params: [{ a: { b: { c: { x: { y: 5 } } } } }],
14
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-overlap-direct.expect.md
renamed
+5
-5
@@ -14,8 +14,7 @@ function TestOverlappingTracked(props) {
14
15
export const FIXTURE_ENTRYPOINT = {
16
fn: TestOverlappingTracked,
17
- params: ["TodoAdd"],
18
- isComponent: "TodoAdd",
17
+ params: [{ a: { c: 2 } }],
18
};
19
20
```
@@ -43,9 +42,10 @@ function TestOverlappingTracked(props) {
42
43
export const FIXTURE_ENTRYPOINT = {
44
fn: TestOverlappingTracked,
46
- params: ["TodoAdd"],
47
- isComponent: "TodoAdd",
45
+ params: [{ a: { c: 2 } }],
46
};
47
48
```
51
-
\ No newline at end of file
49
+
50
+### Eval output
51
+(kind: ok) {"c":2,"a":{"c":2}}
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-overlap-direct.js
renamed
+1
-2
@@ -10,6 +10,5 @@ function TestOverlappingTracked(props) {
10
11
export const FIXTURE_ENTRYPOINT = {
12
fn: TestOverlappingTracked,
13
- params: ["TodoAdd"],
14
- isComponent: "TodoAdd",
13
+ params: [{ a: { c: 2 } }],
14
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-subpath-order1.expect.md
renamed
+5
-5
@@ -14,8 +14,7 @@ function TestDepsSubpathOrder1(props) {
14
15
export const FIXTURE_ENTRYPOINT = {
16
fn: TestDepsSubpathOrder1,
17
- params: ["TodoAdd"],
18
- isComponent: "TodoAdd",
17
+ params: [{ a: { b: { c: 2 } } }],
18
};
19
20
```
@@ -43,9 +42,10 @@ function TestDepsSubpathOrder1(props) {
42
43
export const FIXTURE_ENTRYPOINT = {
44
fn: TestDepsSubpathOrder1,
46
- params: ["TodoAdd"],
47
- isComponent: "TodoAdd",
45
+ params: [{ a: { b: { c: 2 } } }],
46
};
47
48
```
51
-
\ No newline at end of file
49
+
50
+### Eval output
51
+(kind: ok) {"b":{"c":2},"a":{"b":"[[ cyclic ref *1 ]]"},"c":2}
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-subpath-order1.js
renamed
+1
-2
@@ -10,6 +10,5 @@ function TestDepsSubpathOrder1(props) {
10
11
export const FIXTURE_ENTRYPOINT = {
12
fn: TestDepsSubpathOrder1,
13
- params: ["TodoAdd"],
14
- isComponent: "TodoAdd",
13
+ params: [{ a: { b: { c: 2 } } }],
14
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-subpath-order2.expect.md
renamed
+5
-5
@@ -14,8 +14,7 @@ function TestDepsSubpathOrder2(props) {
14
15
export const FIXTURE_ENTRYPOINT = {
16
fn: TestDepsSubpathOrder2,
17
- params: ["TodoAdd"],
18
- isComponent: "TodoAdd",
17
+ params: [{ a: { b: { c: 2 } } }],
18
};
19
20
```
@@ -43,9 +42,10 @@ function TestDepsSubpathOrder2(props) {
42
43
export const FIXTURE_ENTRYPOINT = {
44
fn: TestDepsSubpathOrder2,
46
- params: ["TodoAdd"],
47
- isComponent: "TodoAdd",
45
+ params: [{ a: { b: { c: 2 } } }],
46
};
47
48
```
51
-
\ No newline at end of file
49
+
50
+### Eval output
51
+(kind: ok) {"a":{"b":{"c":2}},"b":"[[ cyclic ref *2 ]]","c":2}
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-subpath-order2.js
renamed
+1
-2
@@ -10,6 +10,5 @@ function TestDepsSubpathOrder2(props) {
10
11
export const FIXTURE_ENTRYPOINT = {
12
fn: TestDepsSubpathOrder2,
13
- params: ["TodoAdd"],
14
- isComponent: "TodoAdd",
13
+ params: [{ a: { b: { c: 2 } } }],
14
};
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-subpath-order3.expect.md
renamed
+5
-5
@@ -14,8 +14,7 @@ function TestDepsSubpathOrder3(props) {
14
15
export const FIXTURE_ENTRYPOINT = {
16
fn: TestDepsSubpathOrder3,
17
- params: ["TodoAdd"],
18
- isComponent: "TodoAdd",
17
+ params: [{ a: { b: { c: 2 } } }],
18
};
19
20
```
@@ -43,9 +42,10 @@ function TestDepsSubpathOrder3(props) {
42
43
export const FIXTURE_ENTRYPOINT = {
44
fn: TestDepsSubpathOrder3,
46
- params: ["TodoAdd"],
47
- isComponent: "TodoAdd",
45
+ params: [{ a: { b: { c: 2 } } }],
46
};
47
48
```
51
-
\ No newline at end of file
49
+
50
+### Eval output
51
+(kind: ok) {"c":2,"a":{"b":{"c":2}},"b":"[[ cyclic ref *2 ]]"}
\ No newline at end of file
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-deps/uncond-subpath-order3.js
renamed
+1
-2
@@ -10,6 +10,5 @@ function TestDepsSubpathOrder3(props) {
10
11
export const FIXTURE_ENTRYPOINT = {
12
fn: TestDepsSubpathOrder3,
13
- params: ["TodoAdd"],
14
- isComponent: "TodoAdd",
13
+ params: [{ a: { b: { c: 2 } } }],
14
};
compiler/packages/snap/src/SproutTodoFilter.ts
-24
@@ -128,14 +128,6 @@ const skipFilter = new Set([
128
"reactivity-analysis-interleaved-reactivity",
129
"reassign-object-in-context",
130
"reassignment-separate-scopes",
131
- "reduce-reactive-cond-memberexpr-join",
132
- "reduce-reactive-uncond-deps-nonoverlap-descendant",
133
- "reduce-reactive-uncond-deps-nonoverlap-direct",
134
- "reduce-reactive-uncond-deps-overlap-descendant",
135
- "reduce-reactive-uncond-deps-overlap-direct",
136
- "reduce-reactive-uncond-deps-subpath-order1",
137
- "reduce-reactive-uncond-deps-subpath-order2",
138
- "reduce-reactive-uncond-deps-subpath-order3",
131
"return-conditional",
132
"return-undefined",
133
"reverse-postorder",
@@ -328,22 +320,6 @@ const skipFilter = new Set([
320
"reassigned-phi-in-returned-function-expression",
321
"reassignment-conditional",
322
"reassignment",
331
- "reduce-reactive-cond-deps-cfg-condexpr",
332
- "reduce-reactive-cond-deps-cfg-ifelse",
333
- "reduce-reactive-cond-deps-cfg-nested-ifelse-missing",
334
- "reduce-reactive-cond-deps-cfg-nested-ifelse",
335
- "reduce-reactive-cond-deps-cfg-switch-missing-case",
336
- "reduce-reactive-cond-deps-cfg-switch-missing-default",
337
- "reduce-reactive-cond-deps-cfg-switch",
338
- "reduce-reactive-cond-deps-no-uncond",
339
- "reduce-reactive-cond-deps-promote-uncond",
340
- "reduce-reactive-cond-deps-subpath-order1",
341
- "reduce-reactive-cond-deps-subpath-order2",
342
- "reduce-reactive-cond-deps-superpath-order1",
343
- "reduce-reactive-cond-deps-superpath-order2",
344
- "reduce-reactive-dependencies-optional-member-expression",
345
- "reduce-reactive-deps-cond-scope",
346
- "reduce-reactive-deps-join-uncond-scopes-cond-deps",
323
"ref-current-aliased-not-added-to-dep-2",
324
"ref-current-not-added-to-dep-2",
325
"ref-in-effect",