[sprout] Codemod: add todos for test fixtures
--- Codemod to add an `export FIXTURE_ENTRYPOINT` with todo values for params for tests with at least one param and 0 refs to external values
Mofei Zhang committed
Aug 16, 2023 at 15:32 UTC
9d1f2c86ed43df75639d41ed018190b895aad9db
354 files changed
+3188
-2
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-access-assignment.expect.md
+12
@@ -11,6 +11,12 @@ function foo(a, b, c) {
11
return [x, z];
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -62,5 +68,11 @@ function foo(a, b, c) {
68
return t1;
69
}
70
71
+export const FIXTURE_ENTRYPOINT = {
72
+ fn: foo,
73
+ params: ["TodoAdd"],
74
+ isComponent: "TodoAdd",
75
+};
76
+
77
```
78
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-access-assignment.js
+6
@@ -6,3 +6,9 @@ function foo(a, b, c) {
6
z[0][0] = x[0];
7
return [x, z];
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-expression-spread.expect.md
+12
@@ -7,6 +7,12 @@ function Component(props) {
7
return x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -30,5 +36,11 @@ function Component(props) {
36
return x;
37
}
38
39
+export const FIXTURE_ENTRYPOINT = {
40
+ fn: Component,
41
+ params: ["TodoAdd"],
42
+ isComponent: "TodoAdd",
43
+};
44
+
45
```
46
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-expression-spread.js
+6
@@ -2,3 +2,9 @@ function Component(props) {
2
const x = [0, ...props.foo, null, ...props.bar, "z"];
3
return x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: Component,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-map-frozen-array.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return [x, y];
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -50,5 +56,11 @@ function Component(props) {
56
return t3;
57
}
58
59
+export const FIXTURE_ENTRYPOINT = {
60
+ fn: Component,
61
+ params: ["TodoAdd"],
62
+ isComponent: "TodoAdd",
63
+};
64
+
65
```
66
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-map-frozen-array.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
const y = x.map((item) => item);
5
return [x, y];
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-map-mutable-array-mutating-lambda.expect.md
+12
@@ -11,6 +11,12 @@ function Component(props) {
11
return [x, y];
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -51,5 +57,11 @@ function Component(props) {
57
return t2;
58
}
59
60
+export const FIXTURE_ENTRYPOINT = {
61
+ fn: Component,
62
+ params: ["TodoAdd"],
63
+ isComponent: "TodoAdd",
64
+};
65
+
66
```
67
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-map-mutable-array-mutating-lambda.js
+6
@@ -6,3 +6,9 @@ function Component(props) {
6
});
7
return [x, y];
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-pattern-params.expect.md
+12
@@ -8,6 +8,12 @@ function component([a, b]) {
8
return [y, z];
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -51,5 +57,11 @@ function component(t16) {
57
return t2;
58
}
59
60
+export const FIXTURE_ENTRYPOINT = {
61
+ fn: component,
62
+ params: ["TodoAdd"],
63
+ isComponent: "TodoAdd",
64
+};
65
+
66
```
67
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-pattern-params.js
+6
@@ -3,3 +3,9 @@ function component([a, b]) {
3
let z = { b };
4
return [y, z];
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-properties.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return { a, x, y, z: a.concat };
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -47,5 +53,11 @@ function Component(props) {
53
return t1;
54
}
55
56
+export const FIXTURE_ENTRYPOINT = {
57
+ fn: Component,
58
+ params: ["TodoAdd"],
59
+ isComponent: "TodoAdd",
60
+};
61
+
62
```
63
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-properties.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
const y = a.push;
5
return { a, x, y, z: a.concat };
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-property-call.expect.md
+12
@@ -10,6 +10,12 @@ function Component(props) {
10
return { a, x, y };
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: Component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -62,5 +68,11 @@ function Component(props) {
68
return t2;
69
}
70
71
+export const FIXTURE_ENTRYPOINT = {
72
+ fn: Component,
73
+ params: ["TodoAdd"],
74
+ isComponent: "TodoAdd",
75
+};
76
+
77
```
78
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/array-property-call.js
+6
@@ -5,3 +5,9 @@ function Component(props) {
5
6
return { a, x, y };
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-expression-computed.expect.md
+12
@@ -10,6 +10,12 @@ function Component(props) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: Component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -33,5 +39,11 @@ function Component(props) {
39
return x;
40
}
41
42
+export const FIXTURE_ENTRYPOINT = {
43
+ fn: Component,
44
+ params: ["TodoAdd"],
45
+ isComponent: "TodoAdd",
46
+};
47
+
48
```
49
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-expression-computed.js
+6
@@ -5,3 +5,9 @@ function Component(props) {
5
x["0"] += 3;
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-expression-nested-path.expect.md
+12
@@ -9,6 +9,12 @@ function g(props) {
9
return a;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: g,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -31,5 +37,11 @@ function g(props) {
37
return a;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: g,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-expression-nested-path.js
+6
@@ -4,3 +4,9 @@ function g(props) {
4
a.b.c *= 2;
5
return a;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: g,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug.useMemo-deps-array-not-cleared.expect.md
+12
@@ -12,6 +12,12 @@ function App({ text, hasDeps }) {
12
return resolvedText;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: App,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -37,5 +43,11 @@ function App(t25) {
43
return resolvedText;
44
}
45
46
+export const FIXTURE_ENTRYPOINT = {
47
+ fn: App,
48
+ params: ["TodoAdd"],
49
+ isComponent: "TodoAdd",
50
+};
51
+
52
```
53
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug.useMemo-deps-array-not-cleared.js
+6
@@ -7,3 +7,9 @@ function App({ text, hasDeps }) {
7
);
8
return resolvedText;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: App,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug_object-pattern.expect.md
+12
@@ -8,6 +8,12 @@ function component(t) {
8
return y;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -30,5 +36,11 @@ function component(t) {
36
return y;
37
}
38
39
+export const FIXTURE_ENTRYPOINT = {
40
+ fn: component,
41
+ params: ["TodoAdd"],
42
+ isComponent: "TodoAdd",
43
+};
44
+
45
```
46
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug_object-pattern.js
+6
@@ -3,3 +3,9 @@ function component(t) {
3
let y = { a };
4
return y;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capture-indirect-mutate-alias.expect.md
+12
@@ -14,6 +14,12 @@ function component(a) {
14
return x;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: component,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -40,5 +46,11 @@ function component(a) {
46
return x;
47
}
48
49
+export const FIXTURE_ENTRYPOINT = {
50
+ fn: component,
51
+ params: ["TodoAdd"],
52
+ isComponent: "TodoAdd",
53
+};
54
+
55
```
56
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capture-indirect-mutate-alias.js
+6
@@ -9,3 +9,9 @@ function component(a) {
9
10
return x;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capture_mutate-across-fns.expect.md
+12
@@ -12,6 +12,12 @@ function component(a) {
12
return z;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -37,5 +43,11 @@ function component(a) {
43
return z;
44
}
45
46
+export const FIXTURE_ENTRYPOINT = {
47
+ fn: component,
48
+ params: ["TodoAdd"],
49
+ isComponent: "TodoAdd",
50
+};
51
+
52
```
53
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capture_mutate-across-fns.js
+6
@@ -7,3 +7,9 @@ function component(a) {
7
})();
8
return z;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-arrow-function-1.expect.md
+12
@@ -10,6 +10,12 @@ function component(a) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -43,5 +49,11 @@ function component(a) {
49
return x;
50
}
51
52
+export const FIXTURE_ENTRYPOINT = {
53
+ fn: component,
54
+ params: ["TodoAdd"],
55
+ isComponent: "TodoAdd",
56
+};
57
+
58
```
59
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-arrow-function-1.js
+6
@@ -5,3 +5,9 @@ function component(a) {
5
};
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate-2.expect.md
+12
@@ -13,6 +13,12 @@ function component(a, b) {
13
return z;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -50,5 +56,11 @@ function component(a, b) {
56
return z;
57
}
58
59
+export const FIXTURE_ENTRYPOINT = {
60
+ fn: component,
61
+ params: ["TodoAdd"],
62
+ isComponent: "TodoAdd",
63
+};
64
+
65
```
66
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate-2.js
+6
@@ -8,3 +8,9 @@ function component(a, b) {
8
x();
9
return z;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate-3.expect.md
+12
@@ -12,6 +12,12 @@ function component(a, b) {
12
return z;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -33,5 +39,11 @@ function component(a, b) {
39
return z;
40
}
41
42
+export const FIXTURE_ENTRYPOINT = {
43
+ fn: component,
44
+ params: ["TodoAdd"],
45
+ isComponent: "TodoAdd",
46
+};
47
+
48
```
49
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate-3.js
+6
@@ -7,3 +7,9 @@ function component(a, b) {
7
};
8
return z;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate-nested.expect.md
+12
@@ -11,6 +11,12 @@ function component(a) {
11
return y;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -36,5 +42,11 @@ function component(a) {
42
return y;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: component,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate-nested.js
+6
@@ -6,3 +6,9 @@ function component(a) {
6
x();
7
return y;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate.expect.md
+12
@@ -13,6 +13,12 @@ function component(a, b) {
13
return z;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -42,5 +48,11 @@ function component(a, b) {
48
return z;
49
}
50
51
+export const FIXTURE_ENTRYPOINT = {
52
+ fn: component,
53
+ params: ["TodoAdd"],
54
+ isComponent: "TodoAdd",
55
+};
56
+
57
```
58
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-func-mutate.js
+6
@@ -8,3 +8,9 @@ function component(a, b) {
8
x();
9
return z;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-1.expect.md
+12
@@ -10,6 +10,12 @@ function component(a) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -43,5 +49,11 @@ function component(a) {
49
return x;
50
}
51
52
+export const FIXTURE_ENTRYPOINT = {
53
+ fn: component,
54
+ params: ["TodoAdd"],
55
+ isComponent: "TodoAdd",
56
+};
57
+
58
```
59
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-1.js
+6
@@ -5,3 +5,9 @@ function component(a) {
5
};
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load-2.expect.md
+12
@@ -12,6 +12,12 @@ function bar(a) {
12
return y;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: bar,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function bar(a) {
42
return y;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: bar,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load-2.js
+6
@@ -7,3 +7,9 @@ function bar(a) {
7
8
return y;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: bar,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load-3.expect.md
+12
@@ -14,6 +14,12 @@ function bar(a, b) {
14
return y;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: bar,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -43,5 +49,11 @@ function bar(a, b) {
49
return y;
50
}
51
52
+export const FIXTURE_ENTRYPOINT = {
53
+ fn: bar,
54
+ params: ["TodoAdd"],
55
+ isComponent: "TodoAdd",
56
+};
57
+
58
```
59
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load-3.js
+6
@@ -9,3 +9,9 @@ function bar(a, b) {
9
10
return y;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: bar,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load-4.expect.md
+12
@@ -12,6 +12,12 @@ function bar(a) {
12
return y;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: bar,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function bar(a) {
42
return y;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: bar,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load-4.js
+6
@@ -7,3 +7,9 @@ function bar(a) {
7
8
return y;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: bar,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load.expect.md
+12
@@ -12,6 +12,12 @@ function bar(a) {
12
return y;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: bar,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function bar(a) {
42
return y;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: bar,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-alias-computed-load.js
+6
@@ -7,3 +7,9 @@ function bar(a) {
7
8
return y;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: bar,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-decl.expect.md
+12
@@ -11,6 +11,12 @@ function component(a) {
11
return t;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -36,5 +42,11 @@ function component(a) {
42
return t;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: component,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-decl.js
+6
@@ -6,3 +6,9 @@ function component(a) {
6
x(t);
7
return t;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-skip-computed-path.expect.md
+12
@@ -7,6 +7,12 @@ function StoreLandingUnseenGiftModalContainer(a) {
7
return ((gift) => (gift.id ? giftsSeen[gift.id] : false))();
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: StoreLandingUnseenGiftModalContainer,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -28,5 +34,11 @@ function StoreLandingUnseenGiftModalContainer(a) {
34
return t0;
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: StoreLandingUnseenGiftModalContainer,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-skip-computed-path.js
+6
@@ -2,3 +2,9 @@ function StoreLandingUnseenGiftModalContainer(a) {
2
const giftsSeen = { a };
3
return ((gift) => (gift.id ? giftsSeen[gift.id] : false))();
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: StoreLandingUnseenGiftModalContainer,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-within-block.expect.md
+12
@@ -13,6 +13,12 @@ function component(a) {
13
return x;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -46,5 +52,11 @@ function component(a) {
52
return x;
53
}
54
55
+export const FIXTURE_ENTRYPOINT = {
56
+ fn: component,
57
+ params: ["TodoAdd"],
58
+ isComponent: "TodoAdd",
59
+};
60
+
61
```
62
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-function-within-block.js
+6
@@ -8,3 +8,9 @@ function component(a) {
8
}
9
return x;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-member-expr.expect.md
+12
@@ -10,6 +10,12 @@ function component(a) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -43,5 +49,11 @@ function component(a) {
49
return x;
50
}
51
52
+export const FIXTURE_ENTRYPOINT = {
53
+ fn: component,
54
+ params: ["TodoAdd"],
55
+ isComponent: "TodoAdd",
56
+};
57
+
58
```
59
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-member-expr.js
+6
@@ -5,3 +5,9 @@ function component(a) {
5
};
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-nested-member-call.expect.md
+12
@@ -10,6 +10,12 @@ function component(a) {
10
return z;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -40,5 +46,11 @@ function component(a) {
46
return z;
47
}
48
49
+export const FIXTURE_ENTRYPOINT = {
50
+ fn: component,
51
+ params: ["TodoAdd"],
52
+ isComponent: "TodoAdd",
53
+};
54
+
55
```
56
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-nested-member-call.js
+6
@@ -5,3 +5,9 @@ function component(a) {
5
};
6
return z;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-nested-member-expr-in-nested-func.expect.md
+12
@@ -12,6 +12,12 @@ function component(a) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -56,5 +62,11 @@ function component(a) {
62
return x;
63
}
64
65
+export const FIXTURE_ENTRYPOINT = {
66
+ fn: component,
67
+ params: ["TodoAdd"],
68
+ isComponent: "TodoAdd",
69
+};
70
+
71
```
72
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-nested-member-expr-in-nested-func.js
+6
@@ -7,3 +7,9 @@ function component(a) {
7
};
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-nested-member-expr.expect.md
+12
@@ -10,6 +10,12 @@ function component(a) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -52,5 +58,11 @@ function component(a) {
58
return x;
59
}
60
61
+export const FIXTURE_ENTRYPOINT = {
62
+ fn: component,
63
+ params: ["TodoAdd"],
64
+ isComponent: "TodoAdd",
65
+};
66
+
67
```
68
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-nested-member-expr.js
+6
@@ -5,3 +5,9 @@ function component(a) {
5
};
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-variable-in-nested-block.expect.md
+12
@@ -12,6 +12,12 @@ function component(a) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -45,5 +51,11 @@ function component(a) {
51
return x;
52
}
53
54
+export const FIXTURE_ENTRYPOINT = {
55
+ fn: component,
56
+ params: ["TodoAdd"],
57
+ isComponent: "TodoAdd",
58
+};
59
+
60
```
61
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-variable-in-nested-block.js
+6
@@ -7,3 +7,9 @@ function component(a) {
7
};
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-variable-in-nested-function.expect.md
+12
@@ -12,6 +12,12 @@ function component(a) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -47,5 +53,11 @@ function component(a) {
53
return x;
54
}
55
56
+export const FIXTURE_ENTRYPOINT = {
57
+ fn: component,
58
+ params: ["TodoAdd"],
59
+ isComponent: "TodoAdd",
60
+};
61
+
62
```
63
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/capturing-variable-in-nested-function.js
+6
@@ -7,3 +7,9 @@ function component(a) {
7
};
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/complex-while.expect.md
+12
@@ -13,6 +13,12 @@ function foo(a, b, c) {
13
return c;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -29,5 +35,11 @@ function foo(a, b, c) {
35
return c;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: foo,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/complex-while.js
+6
@@ -8,3 +8,9 @@ function foo(a, b, c) {
8
}
9
return c;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/component.expect.md
+12
@@ -29,6 +29,12 @@ function Component(props) {
29
);
30
}
31
32
+export const FIXTURE_ENTRYPOINT = {
33
+ fn: Component,
34
+ params: ["TodoAdd"],
35
+ isComponent: "TodoAdd",
36
+};
37
+
38
```
39
40
## Code
@@ -94,5 +100,11 @@ function Component(props) {
100
return t1;
101
}
102
103
+export const FIXTURE_ENTRYPOINT = {
104
+ fn: Component,
105
+ params: ["TodoAdd"],
106
+ isComponent: "TodoAdd",
107
+};
108
+
109
```
110
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/component.js
+6
@@ -24,3 +24,9 @@ function Component(props) {
24
</div>
25
);
26
}
27
+
28
+export const FIXTURE_ENTRYPOINT = {
29
+ fn: Component,
30
+ params: ["TodoAdd"],
31
+ isComponent: "TodoAdd",
32
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/cond-deps-conditional-member-expr.expect.md
+12
@@ -12,6 +12,12 @@ function Component(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function Component(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: Component,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/cond-deps-conditional-member-expr.js
+6
@@ -7,3 +7,9 @@ function Component(props) {
7
x.push(props.a?.b);
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/conditional-break-labeled.expect.md
+12
@@ -18,6 +18,12 @@ function Component(props) {
18
return a;
19
}
20
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: Component,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
26
+
27
```
28
29
## Code
@@ -57,5 +63,11 @@ function Component(props) {
63
return a;
64
}
65
66
+export const FIXTURE_ENTRYPOINT = {
67
+ fn: Component,
68
+ params: ["TodoAdd"],
69
+ isComponent: "TodoAdd",
70
+};
71
+
72
```
73
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/conditional-break-labeled.js
+6
@@ -13,3 +13,9 @@ function Component(props) {
13
a.push(props.d);
14
return a;
15
}
16
+
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: Component,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/conditional-set-state-in-render.expect.md
+12
@@ -17,6 +17,12 @@ function Component(props) {
17
return x;
18
}
19
20
+export const FIXTURE_ENTRYPOINT = {
21
+ fn: Component,
22
+ params: ["TodoAdd"],
23
+ isComponent: "TodoAdd",
24
+};
25
+
26
```
27
28
## Code
@@ -35,5 +41,11 @@ function Component(props) {
41
return x;
42
}
43
44
+export const FIXTURE_ENTRYPOINT = {
45
+ fn: Component,
46
+ params: ["TodoAdd"],
47
+ isComponent: "TodoAdd",
48
+};
49
+
50
```
51
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/conditional-set-state-in-render.js
+6
@@ -12,3 +12,9 @@ function Component(props) {
12
13
return x;
14
}
15
+
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-computed.expect.md
+12
@@ -10,6 +10,12 @@ function Component(props) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: Component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -32,5 +38,11 @@ function Component(props) {
38
return x;
39
}
40
41
+export const FIXTURE_ENTRYPOINT = {
42
+ fn: Component,
43
+ params: ["TodoAdd"],
44
+ isComponent: "TodoAdd",
45
+};
46
+
47
```
48
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-computed.js
+6
@@ -5,3 +5,9 @@ function Component(props) {
5
x[index](props.foo);
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-phi.expect.md
+12
@@ -16,6 +16,12 @@ function foo(a, b, c) {
16
}
17
}
18
19
+export const FIXTURE_ENTRYPOINT = {
20
+ fn: foo,
21
+ params: ["TodoAdd"],
22
+ isComponent: "TodoAdd",
23
+};
24
+
25
```
26
27
## Code
@@ -27,5 +33,11 @@ function foo(a, b, c) {
33
return b;
34
}
35
36
+export const FIXTURE_ENTRYPOINT = {
37
+ fn: foo,
38
+ params: ["TodoAdd"],
39
+ isComponent: "TodoAdd",
40
+};
41
+
42
```
43
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-phi.js
+6
@@ -11,3 +11,9 @@ function foo(a, b, c) {
11
return c;
12
}
13
}
14
+
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: foo,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/controlled-input.expect.md
+14
-1
@@ -2,18 +2,25 @@
2
## Input
3
4
```javascript
5
+import { useState } from "react";
6
function component() {
7
let [x, setX] = useState(0);
8
const handler = (event) => setX(event.target.value);
9
return <input onChange={handler} value={x} />;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: component,
14
+ params: [],
15
+ isComponent: true,
16
+};
17
+
18
```
19
20
## Code
21
22
```javascript
16
-import { unstable_useMemoCache as useMemoCache } from "react";
23
+import { useState, unstable_useMemoCache as useMemoCache } from "react";
24
function component() {
25
const $ = useMemoCache(4);
26
const [x, setX] = useState(0);
@@ -39,5 +46,11 @@ function component() {
46
return t1;
47
}
48
49
+export const FIXTURE_ENTRYPOINT = {
50
+ fn: component,
51
+ params: [],
52
+ isComponent: true,
53
+};
54
+
55
```
56
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/controlled-input.js
+7
@@ -1,5 +1,12 @@
1
+import { useState } from "react";
2
function component() {
3
let [x, setX] = useState(0);
4
const handler = (event) => setX(event.target.value);
5
return <input onChange={handler} value={x} />;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: component,
10
+ params: [],
11
+ isComponent: true,
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dce-loop.expect.md
+12
@@ -12,6 +12,12 @@ function foo(props) {
12
return y;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: foo,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -25,5 +31,11 @@ function foo(props) {
31
return y;
32
}
33
34
+export const FIXTURE_ENTRYPOINT = {
35
+ fn: foo,
36
+ params: ["TodoAdd"],
37
+ isComponent: "TodoAdd",
38
+};
39
+
40
```
41
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dce-loop.js
+6
@@ -7,3 +7,9 @@ function foo(props) {
7
}
8
return y;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: foo,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/debugger-memoized.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return x;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -32,5 +38,11 @@ function Component(props) {
38
return x;
39
}
40
41
+export const FIXTURE_ENTRYPOINT = {
42
+ fn: Component,
43
+ params: ["TodoAdd"],
44
+ isComponent: "TodoAdd",
45
+};
46
+
47
```
48
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/debugger-memoized.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
x.push(props.value);
5
return x;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/debugger.expect.md
+12
@@ -14,6 +14,12 @@ function Component(props) {
14
debugger;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: Component,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -31,5 +37,11 @@ function Component(props) {
37
debugger;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: Component,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/debugger.js
+6
@@ -9,3 +9,9 @@ function Component(props) {
9
}
10
debugger;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: Component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/declare-reassign-variable-in-closure.expect.md
+12
@@ -12,6 +12,12 @@ function Component(p) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -34,5 +40,11 @@ function Component(p) {
40
return x;
41
}
42
43
+export const FIXTURE_ENTRYPOINT = {
44
+ fn: Component,
45
+ params: ["TodoAdd"],
46
+ isComponent: "TodoAdd",
47
+};
48
+
49
```
50
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/declare-reassign-variable-in-closure.js
+6
@@ -7,3 +7,9 @@ function Component(p) {
7
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/delete-computed-property.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return x;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -32,5 +38,11 @@ function Component(props) {
38
return x;
39
}
40
41
+export const FIXTURE_ENTRYPOINT = {
42
+ fn: Component,
43
+ params: ["TodoAdd"],
44
+ isComponent: "TodoAdd",
45
+};
46
+
47
```
48
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/delete-computed-property.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
delete x[key];
5
return x;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/delete-property.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
return x;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -31,5 +37,11 @@ function Component(props) {
37
return x;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: Component,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/delete-property.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
delete x.b;
4
return x;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dependencies-outputs.expect.md
+12
@@ -17,6 +17,12 @@ function foo(a, b) {
17
return y;
18
}
19
20
+export const FIXTURE_ENTRYPOINT = {
21
+ fn: foo,
22
+ params: ["TodoAdd"],
23
+ isComponent: "TodoAdd",
24
+};
25
+
26
```
27
28
## Code
@@ -55,5 +61,11 @@ function foo(a, b) {
61
return y;
62
}
63
64
+export const FIXTURE_ENTRYPOINT = {
65
+ fn: foo,
66
+ params: ["TodoAdd"],
67
+ isComponent: "TodoAdd",
68
+};
69
+
70
```
71
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dependencies-outputs.js
+6
@@ -12,3 +12,9 @@ function foo(a, b) {
12
}
13
return y;
14
}
15
+
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dependencies.expect.md
+12
@@ -18,6 +18,12 @@ function foo(x, y, z) {
18
return items2;
19
}
20
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: foo,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
26
+
27
```
28
29
## Code
@@ -48,5 +54,11 @@ function foo(x, y, z) {
54
return items2;
55
}
56
57
+export const FIXTURE_ENTRYPOINT = {
58
+ fn: foo,
59
+ params: ["TodoAdd"],
60
+ isComponent: "TodoAdd",
61
+};
62
+
63
```
64
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dependencies.js
+6
@@ -13,3 +13,9 @@ function foo(x, y, z) {
13
14
return items2;
15
}
16
+
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructure-direct-reassignment.expect.md
+12
@@ -10,6 +10,12 @@ function foo(props) {
10
return x + y;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -22,5 +28,11 @@ function foo(props) {
28
return x + y;
29
}
30
31
+export const FIXTURE_ENTRYPOINT = {
32
+ fn: foo,
33
+ params: ["TodoAdd"],
34
+ isComponent: "TodoAdd",
35
+};
36
+
37
```
38
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructure-direct-reassignment.js
+6
@@ -5,3 +5,9 @@ function foo(props) {
5
x = props.c;
6
return x + y;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: foo,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-array-default.expect.md
+12
@@ -7,6 +7,12 @@ function Component(props) {
7
return x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -29,5 +35,11 @@ function Component(props) {
35
return x;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Component,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-array-default.js
+6
@@ -2,3 +2,9 @@ function Component(props) {
2
const [[x] = ["default"]] = props.y;
3
return x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: Component,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-array-param-default.expect.md
+12
@@ -6,6 +6,12 @@ function Component([a = 2]) {
6
return a;
7
}
8
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
14
+
15
```
16
17
## Code
@@ -17,5 +23,11 @@ function Component(t13) {
23
return a;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: Component,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-array-param-default.js
+6
@@ -1,3 +1,9 @@
1
function Component([a = 2]) {
2
return a;
3
}
4
+
5
+export const FIXTURE_ENTRYPOINT = {
6
+ fn: Component,
7
+ params: ["TodoAdd"],
8
+ isComponent: "TodoAdd",
9
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-assignment-array-default.expect.md
+12
@@ -12,6 +12,12 @@ function Component(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -39,5 +45,11 @@ function Component(props) {
45
return x;
46
}
47
48
+export const FIXTURE_ENTRYPOINT = {
49
+ fn: Component,
50
+ params: ["TodoAdd"],
51
+ isComponent: "TodoAdd",
52
+};
53
+
54
```
55
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-assignment-array-default.js
+6
@@ -7,3 +7,9 @@ function Component(props) {
7
}
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-assignment.expect.md
+12
@@ -21,6 +21,12 @@ function foo(a, b, c) {
21
return { d, g, n, o };
22
}
23
24
+export const FIXTURE_ENTRYPOINT = {
25
+ fn: foo,
26
+ params: ["TodoAdd"],
27
+ isComponent: "TodoAdd",
28
+};
29
+
30
```
31
32
## Code
@@ -56,5 +62,11 @@ function foo(a, b, c) {
62
return t0;
63
}
64
65
+export const FIXTURE_ENTRYPOINT = {
66
+ fn: foo,
67
+ params: ["TodoAdd"],
68
+ isComponent: "TodoAdd",
69
+};
70
+
71
```
72
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-assignment.js
+6
@@ -16,3 +16,9 @@ function foo(a, b, c) {
16
} = b);
17
return { d, g, n, o };
18
}
19
+
20
+export const FIXTURE_ENTRYPOINT = {
21
+ fn: foo,
22
+ params: ["TodoAdd"],
23
+ isComponent: "TodoAdd",
24
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-object-default.expect.md
+12
@@ -7,6 +7,12 @@ function Component(props) {
7
return y;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -29,5 +35,11 @@ function Component(props) {
35
return y;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Component,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-object-default.js
+6
@@ -2,3 +2,9 @@ function Component(props) {
2
const { x: { y } = { y: "default" } } = props.y;
3
return y;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: Component,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-object-param-default.expect.md
+12
@@ -6,6 +6,12 @@ function Component({ a = 2 }) {
6
return a;
7
}
8
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
14
+
15
```
16
17
## Code
@@ -17,5 +23,11 @@ function Component(t13) {
23
return a;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: Component,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-object-param-default.js
+6
@@ -1,3 +1,9 @@
1
function Component({ a = 2 }) {
2
return a;
3
}
4
+
5
+export const FIXTURE_ENTRYPOINT = {
6
+ fn: Component,
7
+ params: ["TodoAdd"],
8
+ isComponent: "TodoAdd",
9
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring.expect.md
+12
@@ -22,6 +22,12 @@ function foo(a, b, c) {
22
return [d, f, g, h, n, o, p];
23
}
24
25
+export const FIXTURE_ENTRYPOINT = {
26
+ fn: foo,
27
+ params: ["TodoAdd"],
28
+ isComponent: "TodoAdd",
29
+};
30
+
31
```
32
33
## Code
@@ -98,5 +104,11 @@ function foo(a, b, c) {
104
return t5;
105
}
106
107
+export const FIXTURE_ENTRYPOINT = {
108
+ fn: foo,
109
+ params: ["TodoAdd"],
110
+ isComponent: "TodoAdd",
111
+};
112
+
113
```
114
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring.js
+6
@@ -17,3 +17,9 @@ function foo(a, b, c) {
17
} = b;
18
return [d, f, g, h, n, o, p];
19
}
20
+
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: foo,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/disable-jsx-memoization.expect.md
+12
@@ -15,6 +15,12 @@ function Component(props) {
15
);
16
}
17
18
+export const FIXTURE_ENTRYPOINT = {
19
+ fn: Component,
20
+ params: ["TodoAdd"],
21
+ isComponent: "TodoAdd",
22
+};
23
+
24
```
25
26
## Code
@@ -41,5 +47,11 @@ function Component(props) {
47
);
48
}
49
50
+export const FIXTURE_ENTRYPOINT = {
51
+ fn: Component,
52
+ params: ["TodoAdd"],
53
+ isComponent: "TodoAdd",
54
+};
55
+
56
```
57
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/disable-jsx-memoization.js
+6
@@ -10,3 +10,9 @@ function Component(props) {
10
</form>
11
);
12
}
13
+
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-break.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return props;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -18,5 +24,11 @@ function Component(props) {
24
return props;
25
}
26
27
+export const FIXTURE_ENTRYPOINT = {
28
+ fn: Component,
29
+ params: ["TodoAdd"],
30
+ isComponent: "TodoAdd",
31
+};
32
+
33
```
34
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-break.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
} while (props.cond);
5
return props;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-compound-test.expect.md
+12
@@ -12,6 +12,12 @@ function Component(props) {
12
return ret;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -37,5 +43,11 @@ function Component(props) {
43
return ret;
44
}
45
46
+export const FIXTURE_ENTRYPOINT = {
47
+ fn: Component,
48
+ params: ["TodoAdd"],
49
+ isComponent: "TodoAdd",
50
+};
51
+
52
```
53
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-compound-test.js
+6
@@ -7,3 +7,9 @@ function Component(props) {
7
} while (x.length && props.cond);
8
return ret;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dominator.expect.md
+12
@@ -36,6 +36,12 @@ function Component(props) {
36
return x;
37
}
38
39
+export const FIXTURE_ENTRYPOINT = {
40
+ fn: Component,
41
+ params: ["TodoAdd"],
42
+ isComponent: "TodoAdd",
43
+};
44
+
45
```
46
47
## Code
@@ -73,5 +79,11 @@ function Component(props) {
79
return x;
80
}
81
82
+export const FIXTURE_ENTRYPOINT = {
83
+ fn: Component,
84
+ params: ["TodoAdd"],
85
+ isComponent: "TodoAdd",
86
+};
87
+
88
```
89
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/dominator.js
+6
@@ -31,3 +31,9 @@ function Component(props) {
31
}
32
return x;
33
}
34
+
35
+export const FIXTURE_ENTRYPOINT = {
36
+ fn: Component,
37
+ params: ["TodoAdd"],
38
+ isComponent: "TodoAdd",
39
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/early-return.expect.md
+12
@@ -11,6 +11,12 @@ function MyApp(props) {
11
}
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: MyApp,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -22,5 +28,11 @@ function MyApp(props) {
28
}
29
}
30
31
+export const FIXTURE_ENTRYPOINT = {
32
+ fn: MyApp,
33
+ params: ["TodoAdd"],
34
+ isComponent: "TodoAdd",
35
+};
36
+
37
```
38
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/early-return.js
+6
@@ -6,3 +6,9 @@ function MyApp(props) {
6
res = 1;
7
}
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: MyApp,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-destructured-rest-element.expect.md
+12
@@ -10,6 +10,12 @@ function Component(props) {
10
return <div b={b} d={d}></div>;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: Component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -52,5 +58,11 @@ function Component(props) {
58
return t0;
59
}
60
61
+export const FIXTURE_ENTRYPOINT = {
62
+ fn: Component,
63
+ params: ["TodoAdd"],
64
+ isComponent: "TodoAdd",
65
+};
66
+
67
```
68
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-destructured-rest-element.js
+6
@@ -5,3 +5,9 @@ function Component(props) {
5
const [c, ...d] = props.c;
6
return <div b={b} d={d}></div>;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-jsx-child.expect.md
+12
@@ -14,6 +14,12 @@ function foo(a, b, c) {
14
return x;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -64,5 +70,11 @@ function foo(a, b, c) {
70
return x;
71
}
72
73
+export const FIXTURE_ENTRYPOINT = {
74
+ fn: foo,
75
+ params: ["TodoAdd"],
76
+ isComponent: "TodoAdd",
77
+};
78
+
79
```
80
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-jsx-child.js
+6
@@ -9,3 +9,9 @@ function foo(a, b, c) {
9
}
10
return x;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-logical.expect.md
+12
@@ -11,6 +11,12 @@ function Component(props) {
11
return (a && b) || c;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -65,5 +71,11 @@ function Component(props) {
71
return t3;
72
}
73
74
+export const FIXTURE_ENTRYPOINT = {
75
+ fn: Component,
76
+ params: ["TodoAdd"],
77
+ isComponent: "TodoAdd",
78
+};
79
+
80
```
81
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-logical.js
+6
@@ -6,3 +6,9 @@ function Component(props) {
6
// that any of a, b, or c could return here
7
return (a && b) || c;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-allocating-dependency.expect.md
+12
@@ -18,6 +18,12 @@ function Component(props) {
18
return b;
19
}
20
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: Component,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
26
+
27
```
28
29
## Code
@@ -53,5 +59,11 @@ function Component(props) {
59
return b;
60
}
61
62
+export const FIXTURE_ENTRYPOINT = {
63
+ fn: Component,
64
+ params: ["TodoAdd"],
65
+ isComponent: "TodoAdd",
66
+};
67
+
68
```
69
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-allocating-dependency.js
+6
@@ -13,3 +13,9 @@ function Component(props) {
13
14
return b;
15
}
16
+
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: Component,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-allocating-nested-dependency.expect.md
+12
@@ -27,6 +27,12 @@ function Component(props) {
27
return c;
28
}
29
30
+export const FIXTURE_ENTRYPOINT = {
31
+ fn: Component,
32
+ params: ["TodoAdd"],
33
+ isComponent: "TodoAdd",
34
+};
35
+
36
```
37
38
## Code
@@ -72,5 +78,11 @@ function Component(props) {
78
return c;
79
}
80
81
+export const FIXTURE_ENTRYPOINT = {
82
+ fn: Component,
83
+ params: ["TodoAdd"],
84
+ isComponent: "TodoAdd",
85
+};
86
+
87
```
88
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-allocating-nested-dependency.js
+6
@@ -22,3 +22,9 @@ function Component(props) {
22
23
return c;
24
}
25
+
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: Component,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-primitive-dependency.expect.md
+12
@@ -20,6 +20,12 @@ function Component(props) {
20
return b;
21
}
22
23
+export const FIXTURE_ENTRYPOINT = {
24
+ fn: Component,
25
+ params: ["TodoAdd"],
26
+ isComponent: "TodoAdd",
27
+};
28
+
29
```
30
31
## Code
@@ -47,5 +53,11 @@ function Component(props) {
53
return b;
54
}
55
56
+export const FIXTURE_ENTRYPOINT = {
57
+ fn: Component,
58
+ params: ["TodoAdd"],
59
+ isComponent: "TodoAdd",
60
+};
61
+
62
```
63
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-primitive-dependency.js
+6
@@ -15,3 +15,9 @@ function Component(props) {
15
16
return b;
17
}
18
+
19
+export const FIXTURE_ENTRYPOINT = {
20
+ fn: Component,
21
+ params: ["TodoAdd"],
22
+ isComponent: "TodoAdd",
23
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-conditional-test.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
return y;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -19,5 +25,11 @@ function Component(props) {
25
return y;
26
}
27
28
+export const FIXTURE_ENTRYPOINT = {
29
+ fn: Component,
30
+ params: ["TodoAdd"],
31
+ isComponent: "TodoAdd",
32
+};
33
+
34
```
35
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-conditional-test.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
const y = x ? props.b : props.c;
4
return y;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-if-test.expect.md
+12
@@ -13,6 +13,12 @@ function Component(props) {
13
return y;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -29,5 +35,11 @@ function Component(props) {
35
return y;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Component,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-if-test.js
+6
@@ -8,3 +8,9 @@ function Component(props) {
8
}
9
return y;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-switch-case.expect.md
+12
@@ -13,6 +13,12 @@ function Component(props) {
13
return x;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -29,5 +35,11 @@ function Component(props) {
35
return x;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Component,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-switch-case.js
+6
@@ -8,3 +8,9 @@ function Component(props) {
8
}
9
return x;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-switch-test.expect.md
+12
@@ -13,6 +13,12 @@ function Component(props) {
13
return x;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -29,5 +35,11 @@ function Component(props) {
35
return x;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Component,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/escape-analysis-not-switch-test.js
+6
@@ -8,3 +8,9 @@ function Component(props) {
8
}
9
return x;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment-dynamic.expect.md
+12
@@ -7,6 +7,12 @@ function f(y) {
7
return x + (x = 2) + x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: f,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -17,5 +23,11 @@ function f(y) {
23
return x + (x = 2) + 2;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: f,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment-dynamic.js
+6
@@ -2,3 +2,9 @@ function f(y) {
2
let x = y;
3
return x + (x = 2) + x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: f,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/extend-scopes-if.expect.md
+12
@@ -17,6 +17,12 @@ function foo(a, b, c) {
17
return null;
18
}
19
20
+export const FIXTURE_ENTRYPOINT = {
21
+ fn: foo,
22
+ params: ["TodoAdd"],
23
+ isComponent: "TodoAdd",
24
+};
25
+
26
```
27
28
## Code
@@ -51,5 +57,11 @@ function foo(a, b, c) {
57
return null;
58
}
59
60
+export const FIXTURE_ENTRYPOINT = {
61
+ fn: foo,
62
+ params: ["TodoAdd"],
63
+ isComponent: "TodoAdd",
64
+};
65
+
66
```
67
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/extend-scopes-if.js
+6
@@ -12,3 +12,9 @@ function foo(a, b, c) {
12
}
13
return null;
14
}
15
+
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt-params.expect.md
+12
@@ -12,6 +12,12 @@ function Component(props) {
12
);
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function Component(props) {
42
return t0;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: Component,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt-params.js
+6
@@ -7,3 +7,9 @@ function Component(props) {
7
</fbt>
8
);
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-empty-update-with-continue.expect.md
+12
@@ -12,6 +12,12 @@ function Component(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -26,5 +32,11 @@ function Component(props) {
32
return x;
33
}
34
35
+export const FIXTURE_ENTRYPOINT = {
36
+ fn: Component,
37
+ params: ["TodoAdd"],
38
+ isComponent: "TodoAdd",
39
+};
40
+
41
```
42
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-empty-update-with-continue.js
+6
@@ -7,3 +7,9 @@ function Component(props) {
7
}
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-empty-update.expect.md
+12
@@ -13,6 +13,12 @@ function Component(props) {
13
return x;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -29,5 +35,11 @@ function Component(props) {
35
return x;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Component,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-empty-update.js
+6
@@ -8,3 +8,9 @@ function Component(props) {
8
}
9
return x;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-logical.expect.md
+12
@@ -15,6 +15,12 @@ function foo(props) {
15
return y;
16
}
17
18
+export const FIXTURE_ENTRYPOINT = {
19
+ fn: foo,
20
+ params: ["TodoAdd"],
21
+ isComponent: "TodoAdd",
22
+};
23
+
24
```
25
26
## Code
@@ -33,5 +39,11 @@ function foo(props) {
39
return y;
40
}
41
42
+export const FIXTURE_ENTRYPOINT = {
43
+ fn: foo,
44
+ params: ["TodoAdd"],
45
+ isComponent: "TodoAdd",
46
+};
47
+
48
```
49
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-logical.js
+6
@@ -10,3 +10,9 @@ function foo(props) {
10
}
11
return y;
12
}
13
+
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-return.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
}
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -19,5 +25,11 @@ function Component(props) {
25
}
26
}
27
28
+export const FIXTURE_ENTRYPOINT = {
29
+ fn: Component,
30
+ params: ["TodoAdd"],
31
+ isComponent: "TodoAdd",
32
+};
33
+
34
```
35
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-return.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
return;
4
}
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-simple.expect.md
+12
@@ -11,6 +11,12 @@ function component(a) {
11
return t;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -43,5 +49,11 @@ function component(a) {
49
return t;
50
}
51
52
+export const FIXTURE_ENTRYPOINT = {
53
+ fn: component,
54
+ params: ["TodoAdd"],
55
+ isComponent: "TodoAdd",
56
+};
57
+
58
```
59
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-simple.js
+6
@@ -6,3 +6,9 @@ function component(a) {
6
x(t);
7
return t;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-param-assignment-pattern.expect.md
+12
@@ -6,6 +6,12 @@ function Component(x = "default", y = [{}]) {
6
return [x, y];
7
}
8
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
14
+
15
```
16
17
## Code
@@ -39,5 +45,11 @@ function Component(t23, t0) {
45
return t2;
46
}
47
48
+export const FIXTURE_ENTRYPOINT = {
49
+ fn: Component,
50
+ params: ["TodoAdd"],
51
+ isComponent: "TodoAdd",
52
+};
53
+
54
```
55
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-param-assignment-pattern.js
+6
@@ -1,3 +1,9 @@
1
function Component(x = "default", y = [{}]) {
2
return [x, y];
3
}
4
+
5
+export const FIXTURE_ENTRYPOINT = {
6
+ fn: Component,
7
+ params: ["TodoAdd"],
8
+ isComponent: "TodoAdd",
9
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/globals-Boolean.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
return [x, y];
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -35,5 +41,11 @@ function Component(props) {
41
return t1;
42
}
43
44
+export const FIXTURE_ENTRYPOINT = {
45
+ fn: Component,
46
+ params: ["TodoAdd"],
47
+ isComponent: "TodoAdd",
48
+};
49
+
50
```
51
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/globals-Boolean.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
const y = Boolean(x);
4
return [x, y];
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/globals-Number.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
return [x, y];
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -35,5 +41,11 @@ function Component(props) {
41
return t1;
42
}
43
44
+export const FIXTURE_ENTRYPOINT = {
45
+ fn: Component,
46
+ params: ["TodoAdd"],
47
+ isComponent: "TodoAdd",
48
+};
49
+
50
```
51
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/globals-Number.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
const y = Number(x);
4
return [x, y];
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/globals-String.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
return [x, y];
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -35,5 +41,11 @@ function Component(props) {
41
return t1;
42
}
43
44
+export const FIXTURE_ENTRYPOINT = {
45
+ fn: Component,
46
+ params: ["TodoAdd"],
47
+ isComponent: "TodoAdd",
48
+};
49
+
50
```
51
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/globals-String.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
const y = String(x);
4
return [x, y];
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/holey-array-pattern-dce-2.expect.md
+12
@@ -7,6 +7,12 @@ function t(props) {
7
return foo;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: t,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -17,5 +23,11 @@ function t(props) {
23
return foo;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: t,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/holey-array-pattern-dce-2.js
+6
@@ -2,3 +2,9 @@ function t(props) {
2
let [foo, bar, ,] = props;
3
return foo;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: t,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/holey-array-pattern-dce.expect.md
+12
@@ -7,6 +7,12 @@ function t(props) {
7
return foo;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: t,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -17,5 +23,11 @@ function t(props) {
23
return foo;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: t,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/holey-array-pattern-dce.js
+6
@@ -2,3 +2,9 @@ function t(props) {
2
let [, foo, bar] = props;
3
return foo;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: t,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/holey-array.expect.md
+12
@@ -8,6 +8,12 @@ function t(props) {
8
return props.foo;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: t,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -19,5 +25,11 @@ function t(props) {
25
return props.foo;
26
}
27
28
+export const FIXTURE_ENTRYPOINT = {
29
+ fn: t,
30
+ params: ["TodoAdd"],
31
+ isComponent: "TodoAdd",
32
+};
33
+
34
```
35
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/holey-array.js
+6
@@ -3,3 +3,9 @@ function t(props) {
3
setstate(1);
4
return props.foo;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: t,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/independently-memoize-object-property.expect.md
+12
@@ -10,6 +10,12 @@ function foo(a, b, c) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -46,5 +52,11 @@ function foo(a, b, c) {
52
return x;
53
}
54
55
+export const FIXTURE_ENTRYPOINT = {
56
+ fn: foo,
57
+ params: ["TodoAdd"],
58
+ isComponent: "TodoAdd",
59
+};
60
+
61
```
62
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/independently-memoize-object-property.js
+6
@@ -5,3 +5,9 @@ function foo(a, b, c) {
5
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: foo,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/infer-phi-primitive.expect.md
+12
@@ -14,6 +14,12 @@ function foo(a, b) {
14
return y;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -31,5 +37,11 @@ function foo(a, b) {
37
return y;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: foo,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/infer-phi-primitive.js
+6
@@ -9,3 +9,9 @@ function foo(a, b) {
9
let y = x;
10
return y;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/inverted-if-else.expect.md
+12
@@ -14,6 +14,12 @@ function foo(a, b, c) {
14
return x;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -32,5 +38,11 @@ function foo(a, b, c) {
38
return x;
39
}
40
41
+export const FIXTURE_ENTRYPOINT = {
42
+ fn: foo,
43
+ params: ["TodoAdd"],
44
+ isComponent: "TodoAdd",
45
+};
46
+
47
```
48
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/inverted-if-else.js
+6
@@ -9,3 +9,9 @@ function foo(a, b, c) {
9
}
10
return x;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/inverted-if.expect.md
+12
@@ -14,6 +14,12 @@ function foo(a, b, c, d) {
14
return y;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -48,5 +54,11 @@ function foo(a, b, c, d) {
54
return y;
55
}
56
57
+export const FIXTURE_ENTRYPOINT = {
58
+ fn: foo,
59
+ params: ["TodoAdd"],
60
+ isComponent: "TodoAdd",
61
+};
62
+
63
```
64
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/inverted-if.js
+6
@@ -9,3 +9,9 @@ function foo(a, b, c, d) {
9
}
10
return y;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-empty-expression.expect.md
+12
@@ -11,6 +11,12 @@ export function Component(props) {
11
);
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -31,5 +37,11 @@ export function Component(props) {
37
return t0;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: Component,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-empty-expression.js
+6
@@ -6,3 +6,9 @@ export function Component(props) {
6
</div>
7
);
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-fragment.expect.md
+11
@@ -13,6 +13,12 @@ function Foo(props) {
13
);
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -51,6 +57,11 @@ function Foo(props) {
57
}
58
return t2;
59
}
60
+export const FIXTURE_ENTRYPOINT = {
61
+ fn: Foo,
62
+ params: ["TodoAdd"],
63
+ isComponent: "TodoAdd",
64
+};
65
66
```
67
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-fragment.js
+6
@@ -8,3 +8,9 @@ function Foo(props) {
8
</>
9
);
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-namespaced-name.expect.md
+12
@@ -6,6 +6,12 @@ function Component(props) {
6
return <xml:http protocol:version={props.version} />;
7
}
8
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
14
+
15
```
16
17
## Code
@@ -26,5 +32,11 @@ function Component(props) {
32
return t0;
33
}
34
35
+export const FIXTURE_ENTRYPOINT = {
36
+ fn: Component,
37
+ params: ["TodoAdd"],
38
+ isComponent: "TodoAdd",
39
+};
40
+
41
```
42
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-namespaced-name.js
+6
@@ -1,3 +1,9 @@
1
function Component(props) {
2
return <xml:http protocol:version={props.version} />;
3
}
4
+
5
+export const FIXTURE_ENTRYPOINT = {
6
+ fn: Component,
7
+ params: ["TodoAdd"],
8
+ isComponent: "TodoAdd",
9
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-mutated-non-reactive-to-reactive.expect.md
+12
@@ -10,6 +10,12 @@ function f(a) {
10
return <div x={x} />;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: f,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -42,5 +48,11 @@ function f(a) {
48
return t1;
49
}
50
51
+export const FIXTURE_ENTRYPOINT = {
52
+ fn: f,
53
+ params: ["TodoAdd"],
54
+ isComponent: "TodoAdd",
55
+};
56
+
57
```
58
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-mutated-non-reactive-to-reactive.js
+6
@@ -5,3 +5,9 @@ function f(a) {
5
})();
6
return <div x={x} />;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: f,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-mutated-ref-non-reactive.expect.md
+12
@@ -11,6 +11,12 @@ function f(a) {
11
return <div x={x} />;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: f,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -38,5 +44,11 @@ function f(a) {
44
return t0;
45
}
46
47
+export const FIXTURE_ENTRYPOINT = {
48
+ fn: f,
49
+ params: ["TodoAdd"],
50
+ isComponent: "TodoAdd",
51
+};
52
+
53
```
54
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-mutated-ref-non-reactive.js
+6
@@ -6,3 +6,9 @@ function f(a) {
6
// this is not reactive on `x` as `x` is never reactive
7
return <div x={x} />;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: f,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/logical-expression-object.expect.md
+12
@@ -13,6 +13,12 @@ function component(props) {
13
return { a, b };
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -38,5 +44,11 @@ function component(props) {
44
return t0;
45
}
46
47
+export const FIXTURE_ENTRYPOINT = {
48
+ fn: component,
49
+ params: ["TodoAdd"],
50
+ isComponent: "TodoAdd",
51
+};
52
+
53
```
54
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/logical-expression-object.js
+6
@@ -8,3 +8,9 @@ function component(props) {
8
let b = (props.a && props.b && props.c) || props.d;
9
return { a, b };
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/logical-expression.expect.md
+12
@@ -8,6 +8,12 @@ function component(props) {
8
return a ? b : props.c;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -19,5 +25,11 @@ function component(props) {
25
return a ? b : props.c;
26
}
27
28
+export const FIXTURE_ENTRYPOINT = {
29
+ fn: component,
30
+ params: ["TodoAdd"],
31
+ isComponent: "TodoAdd",
32
+};
33
+
34
```
35
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/logical-expression.js
+6
@@ -3,3 +3,9 @@ function component(props) {
3
let b = (props.a && props.b && props.c) || props.d;
4
return a ? b : props.c;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/nested-function-shadowed-identifiers.expect.md
+12
@@ -13,6 +13,12 @@ function Component(props) {
13
return <input value={x} onChange={onChange} />;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -46,5 +52,11 @@ function Component(props) {
52
return t1;
53
}
54
55
+export const FIXTURE_ENTRYPOINT = {
56
+ fn: Component,
57
+ params: ["TodoAdd"],
58
+ isComponent: "TodoAdd",
59
+};
60
+
61
```
62
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/nested-function-shadowed-identifiers.js
+6
@@ -8,3 +8,9 @@ function Component(props) {
8
9
return <input value={x} onChange={onChange} />;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/nonoptional-load-from-optional-memberexpr.expect.md
+12
@@ -11,6 +11,12 @@ function Component(props) {
11
return x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -25,5 +31,11 @@ function Component(props) {
31
return x;
32
}
33
34
+export const FIXTURE_ENTRYPOINT = {
35
+ fn: Component,
36
+ params: ["TodoAdd"],
37
+ isComponent: "TodoAdd",
38
+};
39
+
40
```
41
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/nonoptional-load-from-optional-memberexpr.js
+6
@@ -6,3 +6,9 @@ function Component(props) {
6
let x = (props?.a).b;
7
return x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-computed-access-assignment.expect.md
+12
@@ -8,6 +8,12 @@ function foo(a, b, c) {
8
x[1 + 2] = c[b * 4];
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: foo,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -19,5 +25,11 @@ function foo(a, b, c) {
25
x[3] = c[b * 4];
26
}
27
28
+export const FIXTURE_ENTRYPOINT = {
29
+ fn: foo,
30
+ params: ["TodoAdd"],
31
+ isComponent: "TodoAdd",
32
+};
33
+
34
```
35
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-computed-access-assignment.js
+6
@@ -3,3 +3,9 @@ function foo(a, b, c) {
3
x[b] = c[b];
4
x[1 + 2] = c[b * 4];
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: foo,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-expression-string-literal-key.expect.md
+12
@@ -7,6 +7,12 @@ function Component(props) {
7
return x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -28,5 +34,11 @@ function Component(props) {
34
return x;
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: Component,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-expression-string-literal-key.js
+6
@@ -2,3 +2,9 @@ function Component(props) {
2
const x = { ["foo"]: props.foo };
3
return x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: Component,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-literal-spread-element.expect.md
+12
@@ -7,6 +7,12 @@ function Component(props) {
7
return x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -28,5 +34,11 @@ function Component(props) {
34
return x;
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: Component,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-literal-spread-element.js
+6
@@ -2,3 +2,9 @@ function Component(props) {
2
const x = { ...props.foo };
3
return x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: Component,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-pattern-params.expect.md
+12
@@ -8,6 +8,12 @@ function component({ a, b }) {
8
return { y, z };
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -51,5 +57,11 @@ function component(t16) {
57
return t2;
58
}
59
60
+export const FIXTURE_ENTRYPOINT = {
61
+ fn: component,
62
+ params: ["TodoAdd"],
63
+ isComponent: "TodoAdd",
64
+};
65
+
66
```
67
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/object-pattern-params.js
+6
@@ -3,3 +3,9 @@ function component({ a, b }) {
3
let z = { b };
4
return { y, z };
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/optional-member-expression-chain.expect.md
+12
@@ -10,6 +10,12 @@ function Component(props) {
10
return { x, y };
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: Component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -35,5 +41,11 @@ function Component(props) {
41
return t0;
42
}
43
44
+export const FIXTURE_ENTRYPOINT = {
45
+ fn: Component,
46
+ params: ["TodoAdd"],
47
+ isComponent: "TodoAdd",
48
+};
49
+
50
```
51
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/optional-member-expression-chain.js
+6
@@ -5,3 +5,9 @@ function Component(props) {
5
let y = props?.b.c.d?.e.f.g?.h;
6
return { x, y };
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: Component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-interleaved-by-terminal.expect.md
+12
@@ -13,6 +13,12 @@ function foo(a, b, c) {
13
x.push(b);
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -28,5 +34,11 @@ function foo(a, b, c) {
34
x.push(b);
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: foo,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-interleaved-by-terminal.js
+6
@@ -8,3 +8,9 @@ function foo(a, b, c) {
8
y.push(a);
9
x.push(b);
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-interleaved.expect.md
+12
@@ -9,6 +9,12 @@ function foo(a, b) {
9
y.push(b);
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -21,5 +27,11 @@ function foo(a, b) {
27
y.push(b);
28
}
29
30
+export const FIXTURE_ENTRYPOINT = {
31
+ fn: foo,
32
+ params: ["TodoAdd"],
33
+ isComponent: "TodoAdd",
34
+};
35
+
36
```
37
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-interleaved.js
+6
@@ -4,3 +4,9 @@ function foo(a, b) {
4
x.push(a);
5
y.push(b);
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: foo,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-shadowed.expect.md
+12
@@ -9,6 +9,12 @@ function foo(a, b) {
9
x.push(a);
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -21,5 +27,11 @@ function foo(a, b) {
27
x.push(a);
28
}
29
30
+export const FIXTURE_ENTRYPOINT = {
31
+ fn: foo,
32
+ params: ["TodoAdd"],
33
+ isComponent: "TodoAdd",
34
+};
35
+
36
```
37
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-shadowed.js
+6
@@ -4,3 +4,9 @@ function foo(a, b) {
4
y.push(b);
5
x.push(a);
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: foo,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-shadowing-within-block.expect.md
+12
@@ -15,6 +15,12 @@ function foo(a, b, c) {
15
return x;
16
}
17
18
+export const FIXTURE_ENTRYPOINT = {
19
+ fn: foo,
20
+ params: ["TodoAdd"],
21
+ isComponent: "TodoAdd",
22
+};
23
+
24
```
25
26
## Code
@@ -65,5 +71,11 @@ function foo(a, b, c) {
71
return x;
72
}
73
74
+export const FIXTURE_ENTRYPOINT = {
75
+ fn: foo,
76
+ params: ["TodoAdd"],
77
+ isComponent: "TodoAdd",
78
+};
79
+
80
```
81
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-shadowing-within-block.js
+6
@@ -10,3 +10,9 @@ function foo(a, b, c) {
10
}
11
return x;
12
}
13
+
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-while.expect.md
+12
@@ -11,6 +11,12 @@ function foo(a, b, c) {
11
}
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -25,5 +31,11 @@ function foo(a, b, c) {
31
}
32
}
33
34
+export const FIXTURE_ENTRYPOINT = {
35
+ fn: foo,
36
+ params: ["TodoAdd"],
37
+ isComponent: "TodoAdd",
38
+};
39
+
40
```
41
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-while.js
+6
@@ -6,3 +6,9 @@ function foo(a, b, c) {
6
x.push(a);
7
}
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-within-block.expect.md
+12
@@ -15,6 +15,12 @@ function foo(a, b, c) {
15
return x;
16
}
17
18
+export const FIXTURE_ENTRYPOINT = {
19
+ fn: foo,
20
+ params: ["TodoAdd"],
21
+ isComponent: "TodoAdd",
22
+};
23
+
24
```
25
26
## Code
@@ -57,5 +63,11 @@ function foo(a, b, c) {
63
return x;
64
}
65
66
+export const FIXTURE_ENTRYPOINT = {
67
+ fn: foo,
68
+ params: ["TodoAdd"],
69
+ isComponent: "TodoAdd",
70
+};
71
+
72
```
73
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/overlapping-scopes-within-block.js
+6
@@ -10,3 +10,9 @@ function foo(a, b, c) {
10
}
11
return x;
12
}
13
+
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/prop-capturing-function-1.expect.md
+12
@@ -10,6 +10,12 @@ function component(a, b) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -45,5 +51,11 @@ function component(a, b) {
51
return x;
52
}
53
54
+export const FIXTURE_ENTRYPOINT = {
55
+ fn: component,
56
+ params: ["TodoAdd"],
57
+ isComponent: "TodoAdd",
58
+};
59
+
60
```
61
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/prop-capturing-function-1.js
+6
@@ -5,3 +5,9 @@ function component(a, b) {
5
};
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: component,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scopes-if.expect.md
+12
@@ -14,6 +14,12 @@ function foo(a, b, c) {
14
return x;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -62,5 +68,11 @@ function foo(a, b, c) {
68
return x;
69
}
70
71
+export const FIXTURE_ENTRYPOINT = {
72
+ fn: foo,
73
+ params: ["TodoAdd"],
74
+ isComponent: "TodoAdd",
75
+};
76
+
77
```
78
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scopes-if.js
+6
@@ -9,3 +9,9 @@ function foo(a, b, c) {
9
}
10
return x;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scopes.expect.md
+12
@@ -13,6 +13,12 @@ function f(a, b) {
13
return <div>{x}</div>;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: f,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -49,5 +55,11 @@ function f(a, b) {
55
return t0;
56
}
57
58
+export const FIXTURE_ENTRYPOINT = {
59
+ fn: f,
60
+ params: ["TodoAdd"],
61
+ isComponent: "TodoAdd",
62
+};
63
+
64
```
65
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scopes.js
+6
@@ -8,3 +8,9 @@ function f(a, b) {
8
9
return <div>{x}</div>;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: f,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactivity-analysis-interleaved-reactivity.expect.md
+12
@@ -22,6 +22,12 @@ function Component(props) {
22
return [c, a];
23
}
24
25
+export const FIXTURE_ENTRYPOINT = {
26
+ fn: Component,
27
+ params: ["TodoAdd"],
28
+ isComponent: "TodoAdd",
29
+};
30
+
31
```
32
33
## Code
@@ -64,5 +70,11 @@ function Component(props) {
70
return t1;
71
}
72
73
+export const FIXTURE_ENTRYPOINT = {
74
+ fn: Component,
75
+ params: ["TodoAdd"],
76
+ isComponent: "TodoAdd",
77
+};
78
+
79
```
80
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactivity-analysis-interleaved-reactivity.js
+6
@@ -17,3 +17,9 @@ function Component(props) {
17
// assert(c[0] === a);
18
return [c, a];
19
}
20
+
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: Component,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reassign-object-in-context.expect.md
+12
@@ -11,6 +11,12 @@ function Component(props) {
11
return x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -34,5 +40,11 @@ function Component(props) {
40
return x;
41
}
42
43
+export const FIXTURE_ENTRYPOINT = {
44
+ fn: Component,
45
+ params: ["TodoAdd"],
46
+ isComponent: "TodoAdd",
47
+};
48
+
49
```
50
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reassign-object-in-context.js
+6
@@ -6,3 +6,9 @@ function Component(props) {
6
foo();
7
return x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reassign-primitive-in-context.expect.md
+12
@@ -11,6 +11,12 @@ function Component(props) {
11
return x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -34,5 +40,11 @@ function Component(props) {
40
return x;
41
}
42
43
+export const FIXTURE_ENTRYPOINT = {
44
+ fn: Component,
45
+ params: ["TodoAdd"],
46
+ isComponent: "TodoAdd",
47
+};
48
+
49
```
50
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reassign-primitive-in-context.js
+6
@@ -6,3 +6,9 @@ function Component(props) {
6
foo();
7
return x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reassignment-separate-scopes.expect.md
+12
@@ -28,6 +28,12 @@ function foo(a, b, c) {
28
);
29
}
30
31
+export const FIXTURE_ENTRYPOINT = {
32
+ fn: foo,
33
+ params: ["TodoAdd"],
34
+ isComponent: "TodoAdd",
35
+};
36
+
37
```
38
39
## Code
@@ -102,5 +108,11 @@ function foo(a, b, c) {
108
return t1;
109
}
110
111
+export const FIXTURE_ENTRYPOINT = {
112
+ fn: foo,
113
+ params: ["TodoAdd"],
114
+ isComponent: "TodoAdd",
115
+};
116
+
117
```
118
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reassignment-separate-scopes.js
+6
@@ -23,3 +23,9 @@ function foo(a, b, c) {
23
</div>
24
);
25
}
26
+
27
+export const FIXTURE_ENTRYPOINT = {
28
+ fn: foo,
29
+ params: ["TodoAdd"],
30
+ isComponent: "TodoAdd",
31
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-cond-memberexpr-join.expect.md
+12
@@ -20,6 +20,12 @@ function Component(props) {
20
return x;
21
}
22
23
+export const FIXTURE_ENTRYPOINT = {
24
+ fn: Component,
25
+ params: ["TodoAdd"],
26
+ isComponent: "TodoAdd",
27
+};
28
+
29
```
30
31
## Code
@@ -52,5 +58,11 @@ function Component(props) {
58
return x;
59
}
60
61
+export const FIXTURE_ENTRYPOINT = {
62
+ fn: Component,
63
+ params: ["TodoAdd"],
64
+ isComponent: "TodoAdd",
65
+};
66
+
67
```
68
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-cond-memberexpr-join.js
+6
@@ -15,3 +15,9 @@ function Component(props) {
15
x.push(props.a.b.c);
16
return x;
17
}
18
+
19
+export const FIXTURE_ENTRYPOINT = {
20
+ fn: Component,
21
+ params: ["TodoAdd"],
22
+ isComponent: "TodoAdd",
23
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-nonoverlap-descendant.expect.md
+12
@@ -12,6 +12,12 @@ function TestNonOverlappingDescendantTracked(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: TestNonOverlappingDescendantTracked,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -40,5 +46,11 @@ function TestNonOverlappingDescendantTracked(props) {
46
return x;
47
}
48
49
+export const FIXTURE_ENTRYPOINT = {
50
+ fn: TestNonOverlappingDescendantTracked,
51
+ params: ["TodoAdd"],
52
+ isComponent: "TodoAdd",
53
+};
54
+
55
```
56
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-nonoverlap-descendant.js
+6
@@ -7,3 +7,9 @@ function TestNonOverlappingDescendantTracked(props) {
7
x.c = props.a.c.x.y.z;
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: TestNonOverlappingDescendantTracked,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-nonoverlap-direct.expect.md
+12
@@ -11,6 +11,12 @@ function TestNonOverlappingTracked(props) {
11
return x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: TestNonOverlappingTracked,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -36,5 +42,11 @@ function TestNonOverlappingTracked(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: TestNonOverlappingTracked,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-nonoverlap-direct.js
+6
@@ -6,3 +6,9 @@ function TestNonOverlappingTracked(props) {
6
x.c = props.a.c;
7
return x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: TestNonOverlappingTracked,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-overlap-descendant.expect.md
+12
@@ -12,6 +12,12 @@ function TestOverlappingDescendantTracked(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: TestOverlappingDescendantTracked,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function TestOverlappingDescendantTracked(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: TestOverlappingDescendantTracked,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-overlap-descendant.js
+6
@@ -7,3 +7,9 @@ function TestOverlappingDescendantTracked(props) {
7
x.a = props.a;
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: TestOverlappingDescendantTracked,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-overlap-direct.expect.md
+12
@@ -12,6 +12,12 @@ function TestOverlappingTracked(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: TestOverlappingTracked,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function TestOverlappingTracked(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: TestOverlappingTracked,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-overlap-direct.js
+6
@@ -7,3 +7,9 @@ function TestOverlappingTracked(props) {
7
x.a = props.a;
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: TestOverlappingTracked,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-subpath-order1.expect.md
+12
@@ -12,6 +12,12 @@ function TestDepsSubpathOrder1(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: TestDepsSubpathOrder1,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function TestDepsSubpathOrder1(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: TestDepsSubpathOrder1,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-subpath-order1.js
+6
@@ -7,3 +7,9 @@ function TestDepsSubpathOrder1(props) {
7
x.c = props.a.b.c;
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: TestDepsSubpathOrder1,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-subpath-order2.expect.md
+12
@@ -12,6 +12,12 @@ function TestDepsSubpathOrder2(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: TestDepsSubpathOrder2,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function TestDepsSubpathOrder2(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: TestDepsSubpathOrder2,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-subpath-order2.js
+6
@@ -7,3 +7,9 @@ function TestDepsSubpathOrder2(props) {
7
x.c = props.a.b.c;
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: TestDepsSubpathOrder2,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-subpath-order3.expect.md
+12
@@ -12,6 +12,12 @@ function TestDepsSubpathOrder3(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: TestDepsSubpathOrder3,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function TestDepsSubpathOrder3(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: TestDepsSubpathOrder3,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reduce-reactive-uncond-deps-subpath-order3.js
+6
@@ -7,3 +7,9 @@ function TestDepsSubpathOrder3(props) {
7
x.b = props.a.b;
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: TestDepsSubpathOrder3,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/return-conditional.expect.md
+12
@@ -10,6 +10,12 @@ function foo(a, b) {
10
}
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -23,5 +29,11 @@ function foo(a, b) {
29
}
30
}
31
32
+export const FIXTURE_ENTRYPOINT = {
33
+ fn: foo,
34
+ params: ["TodoAdd"],
35
+ isComponent: "TodoAdd",
36
+};
37
+
38
```
39
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/return-conditional.js
+6
@@ -5,3 +5,9 @@ function foo(a, b) {
5
return b;
6
}
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: foo,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/return-undefined.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return props.value;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -21,5 +27,11 @@ function Component(props) {
27
return props.value;
28
}
29
30
+export const FIXTURE_ENTRYPOINT = {
31
+ fn: Component,
32
+ params: ["TodoAdd"],
33
+ isComponent: "TodoAdd",
34
+};
35
+
36
```
37
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/return-undefined.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
}
5
return props.value;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reverse-postorder.expect.md
+12
@@ -30,6 +30,12 @@ function Component(props) {
30
x;
31
}
32
33
+export const FIXTURE_ENTRYPOINT = {
34
+ fn: Component,
35
+ params: ["TodoAdd"],
36
+ isComponent: "TodoAdd",
37
+};
38
+
39
```
40
41
## Code
@@ -55,5 +61,11 @@ function Component(props) {
61
}
62
}
63
64
+export const FIXTURE_ENTRYPOINT = {
65
+ fn: Component,
66
+ params: ["TodoAdd"],
67
+ isComponent: "TodoAdd",
68
+};
69
+
70
```
71
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reverse-postorder.js
+6
@@ -25,3 +25,9 @@ function Component(props) {
25
}
26
x;
27
}
28
+
29
+export const FIXTURE_ENTRYPOINT = {
30
+ fn: Component,
31
+ params: ["TodoAdd"],
32
+ isComponent: "TodoAdd",
33
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/same-variable-as-dep-and-redeclare-maybe-frozen.expect.md
+12
@@ -38,6 +38,12 @@ function foo(props) {
38
);
39
}
40
41
+export const FIXTURE_ENTRYPOINT = {
42
+ fn: foo,
43
+ params: ["TodoAdd"],
44
+ isComponent: "TodoAdd",
45
+};
46
+
47
```
48
49
## Code
@@ -123,5 +129,11 @@ function foo(props) {
129
return t2;
130
}
131
132
+export const FIXTURE_ENTRYPOINT = {
133
+ fn: foo,
134
+ params: ["TodoAdd"],
135
+ isComponent: "TodoAdd",
136
+};
137
+
138
```
139
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/same-variable-as-dep-and-redeclare-maybe-frozen.js
+6
@@ -33,3 +33,9 @@ function foo(props) {
33
</>
34
);
35
}
36
+
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: foo,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/same-variable-as-dep-and-redeclare.expect.md
+12
@@ -38,6 +38,12 @@ function foo(props) {
38
);
39
}
40
41
+export const FIXTURE_ENTRYPOINT = {
42
+ fn: foo,
43
+ params: ["TodoAdd"],
44
+ isComponent: "TodoAdd",
45
+};
46
+
47
```
48
49
## Code
@@ -121,5 +127,11 @@ function foo(props) {
127
return t2;
128
}
129
130
+export const FIXTURE_ENTRYPOINT = {
131
+ fn: foo,
132
+ params: ["TodoAdd"],
133
+ isComponent: "TodoAdd",
134
+};
135
+
136
```
137
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/same-variable-as-dep-and-redeclare.js
+6
@@ -33,3 +33,9 @@ function foo(props) {
33
</>
34
);
35
}
36
+
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: foo,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-scope.expect.md
+12
@@ -7,6 +7,12 @@ function foo(a) {
7
return x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -28,5 +34,11 @@ function foo(a) {
34
return x;
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: foo,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-scope.js
+6
@@ -2,3 +2,9 @@ function foo(a) {
2
const x = [a.b];
3
return x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: foo,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-arrayexpression.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return x;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -28,5 +34,11 @@ function Component(props) {
34
return x;
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: Component,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-arrayexpression.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
const x = [a, b];
5
return x;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-cascading-eliminated-phis.expect.md
+12
@@ -18,6 +18,12 @@ function Component(props) {
18
return values;
19
}
20
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: Component,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
26
+
27
```
28
29
## Code
@@ -53,5 +59,11 @@ function Component(props) {
59
return values;
60
}
61
62
+export const FIXTURE_ENTRYPOINT = {
63
+ fn: Component,
64
+ params: ["TodoAdd"],
65
+ isComponent: "TodoAdd",
66
+};
67
+
68
```
69
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-cascading-eliminated-phis.js
+6
@@ -13,3 +13,9 @@ function Component(props) {
13
values.push(x);
14
return values;
15
}
16
+
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: Component,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-of.expect.md
+12
@@ -13,6 +13,12 @@ function foo(cond) {
13
return items;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -36,5 +42,11 @@ function foo(cond) {
42
return items;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: foo,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-of.js
+6
@@ -8,3 +8,9 @@ function foo(cond) {
8
}
9
return items;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-multiple-phis.expect.md
+12
@@ -22,6 +22,12 @@ function foo(a, b, c, d) {
22
return x;
23
}
24
25
+export const FIXTURE_ENTRYPOINT = {
26
+ fn: foo,
27
+ params: ["TodoAdd"],
28
+ isComponent: "TodoAdd",
29
+};
30
+
31
```
32
33
## Code
@@ -32,5 +38,11 @@ function foo(a, b, c, d) {
38
return x;
39
}
40
41
+export const FIXTURE_ENTRYPOINT = {
42
+ fn: foo,
43
+ params: ["TodoAdd"],
44
+ isComponent: "TodoAdd",
45
+};
46
+
47
```
48
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-multiple-phis.js
+6
@@ -17,3 +17,9 @@ function foo(a, b, c, d) {
17
}
18
return x;
19
}
20
+
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: foo,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-nested-loops-no-reassign.expect.md
+12
@@ -15,6 +15,12 @@ function foo(a, b, c) {
15
return x;
16
}
17
18
+export const FIXTURE_ENTRYPOINT = {
19
+ fn: foo,
20
+ params: ["TodoAdd"],
21
+ isComponent: "TodoAdd",
22
+};
23
+
24
```
25
26
## Code
@@ -30,5 +36,11 @@ function foo(a, b, c) {
36
return 0;
37
}
38
39
+export const FIXTURE_ENTRYPOINT = {
40
+ fn: foo,
41
+ params: ["TodoAdd"],
42
+ isComponent: "TodoAdd",
43
+};
44
+
45
```
46
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-nested-loops-no-reassign.js
+6
@@ -10,3 +10,9 @@ function foo(a, b, c) {
10
}
11
return x;
12
}
13
+
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-nested-partial-phi.expect.md
+12
@@ -13,6 +13,12 @@ function foo(a, b, c) {
13
}
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -28,5 +34,11 @@ function foo(a, b, c) {
34
}
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: foo,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-nested-partial-phi.js
+6
@@ -8,3 +8,9 @@ function foo(a, b, c) {
8
return x;
9
}
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-nested-partial-reassignment.expect.md
+12
@@ -14,6 +14,12 @@ function foo(a, b, c, d, e) {
14
return x;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -31,5 +37,11 @@ function foo(a, b, c, d, e) {
37
return x;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: foo,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-nested-partial-reassignment.js
+6
@@ -9,3 +9,9 @@ function foo(a, b, c, d, e) {
9
}
10
return x;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-non-empty-initializer.expect.md
+12
@@ -12,6 +12,12 @@ function foo(a, b) {
12
return y;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: foo,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -36,5 +42,11 @@ function foo(a, b) {
42
return y;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: foo,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-non-empty-initializer.js
+6
@@ -7,3 +7,9 @@ function foo(a, b) {
7
let y = x;
8
return y;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: foo,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression.expect.md
+12
@@ -9,6 +9,12 @@ function Component(props) {
9
return x;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -28,5 +34,11 @@ function Component(props) {
34
return x;
35
}
36
37
+export const FIXTURE_ENTRYPOINT = {
38
+ fn: Component,
39
+ params: ["TodoAdd"],
40
+ isComponent: "TodoAdd",
41
+};
42
+
43
```
44
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression.js
+6
@@ -4,3 +4,9 @@ function Component(props) {
4
const x = { a: a, b: b };
5
return x;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: Component,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-alias-if.expect.md
+12
@@ -14,6 +14,12 @@ function foo(a) {
14
return x;
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: foo,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -55,5 +61,11 @@ function foo(a) {
61
return x;
62
}
63
64
+export const FIXTURE_ENTRYPOINT = {
65
+ fn: foo,
66
+ params: ["TodoAdd"],
67
+ isComponent: "TodoAdd",
68
+};
69
+
70
```
71
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-alias-if.js
+6
@@ -9,3 +9,9 @@ function foo(a) {
9
}
10
return x;
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-reassign.expect.md
+12
@@ -10,6 +10,12 @@ function foo(a, b, c) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -20,5 +26,11 @@ function foo(a, b, c) {
26
return x;
27
}
28
29
+export const FIXTURE_ENTRYPOINT = {
30
+ fn: foo,
31
+ params: ["TodoAdd"],
32
+ isComponent: "TodoAdd",
33
+};
34
+
35
```
36
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-reassign.js
+6
@@ -5,3 +5,9 @@ function foo(a, b, c) {
5
x = c;
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: foo,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-destruction.expect.md
+12
@@ -9,6 +9,12 @@ function foo(props) {
9
return x;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -31,5 +37,11 @@ function foo(props) {
37
return x;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: foo,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-destruction.js
+6
@@ -4,3 +4,9 @@ function foo(props) {
4
props.cond ? (({ x } = { x: {} }), ([x] = [[]]), x.push(props.foo)) : null;
5
return x;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: foo,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary.expect.md
+12
@@ -9,6 +9,12 @@ function foo(props) {
9
return x;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -31,5 +37,11 @@ function foo(props) {
37
return x;
38
}
39
40
+export const FIXTURE_ENTRYPOINT = {
41
+ fn: foo,
42
+ params: ["TodoAdd"],
43
+ isComponent: "TodoAdd",
44
+};
45
+
46
```
47
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary.js
+6
@@ -4,3 +4,9 @@ function foo(props) {
4
props.cond ? ((x = {}), (x = []), x.push(props.foo)) : null;
5
return x;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: foo,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-unconditional-ternary.expect.md
+12
@@ -11,6 +11,12 @@ function foo(props) {
11
return x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -33,5 +39,11 @@ function foo(props) {
39
return x;
40
}
41
42
+export const FIXTURE_ENTRYPOINT = {
43
+ fn: foo,
44
+ params: ["TodoAdd"],
45
+ isComponent: "TodoAdd",
46
+};
47
+
48
```
49
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-unconditional-ternary.js
+6
@@ -6,3 +6,9 @@ function foo(props) {
6
: ((x = []), (x = []), x.push(props.bar));
7
return x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-via-destructuring.expect.md
+12
@@ -13,6 +13,12 @@ function foo(props) {
13
return x;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -45,5 +51,11 @@ function foo(props) {
51
return x;
52
}
53
54
+export const FIXTURE_ENTRYPOINT = {
55
+ fn: foo,
56
+ params: ["TodoAdd"],
57
+ isComponent: "TodoAdd",
58
+};
59
+
60
```
61
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming-via-destructuring.js
+6
@@ -8,3 +8,9 @@ function foo(props) {
8
}
9
return x;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming.expect.md
+12
@@ -13,6 +13,12 @@ function foo(props) {
13
return x;
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -45,5 +51,11 @@ function foo(props) {
51
return x;
52
}
53
54
+export const FIXTURE_ENTRYPOINT = {
55
+ fn: foo,
56
+ params: ["TodoAdd"],
57
+ isComponent: "TodoAdd",
58
+};
59
+
60
```
61
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-renaming.js
+6
@@ -8,3 +8,9 @@ function foo(props) {
8
}
9
return x;
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-sibling-phis.expect.md
+12
@@ -22,6 +22,12 @@ function foo(a, b, c, d) {
22
// note: intentionally no phi here so that there are two distinct phis above
23
}
24
25
+export const FIXTURE_ENTRYPOINT = {
26
+ fn: foo,
27
+ params: ["TodoAdd"],
28
+ isComponent: "TodoAdd",
29
+};
30
+
31
```
32
33
## Code
@@ -29,5 +35,11 @@ function foo(a, b, c, d) {
35
```javascript
36
function foo(a, b, c, d) {}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: foo,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-sibling-phis.js
+6
@@ -17,3 +17,9 @@ function foo(a, b, c, d) {
17
}
18
// note: intentionally no phi here so that there are two distinct phis above
19
}
20
+
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: foo,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/switch-with-fallthrough.expect.md
+12
@@ -30,6 +30,12 @@ function foo(x) {
30
}
31
}
32
33
+export const FIXTURE_ENTRYPOINT = {
34
+ fn: foo,
35
+ params: ["TodoAdd"],
36
+ isComponent: "TodoAdd",
37
+};
38
+
39
```
40
41
## Code
@@ -56,5 +62,11 @@ function foo(x) {
62
}
63
}
64
65
+export const FIXTURE_ENTRYPOINT = {
66
+ fn: foo,
67
+ params: ["TodoAdd"],
68
+ isComponent: "TodoAdd",
69
+};
70
+
71
```
72
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/switch-with-fallthrough.js
+6
@@ -25,3 +25,9 @@ function foo(x) {
25
}
26
}
27
}
28
+
29
+export const FIXTURE_ENTRYPOINT = {
30
+ fn: foo,
31
+ params: ["TodoAdd"],
32
+ isComponent: "TodoAdd",
33
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ternary-assignment-expression.expect.md
+12
@@ -8,6 +8,12 @@ function ternary(props) {
8
return x + y;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: ternary,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -20,5 +26,11 @@ function ternary(props) {
26
return x + y;
27
}
28
29
+export const FIXTURE_ENTRYPOINT = {
30
+ fn: ternary,
31
+ params: ["TodoAdd"],
32
+ isComponent: "TodoAdd",
33
+};
34
+
35
```
36
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ternary-assignment-expression.js
+6
@@ -3,3 +3,9 @@ function ternary(props) {
3
const y = props.a ? (x = 1) : (x = 2);
4
return x + y;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: ternary,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ternary-expression.expect.md
+12
@@ -8,6 +8,12 @@ function ternary(props) {
8
return a ? b : null;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: ternary,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -19,5 +25,11 @@ function ternary(props) {
25
return a ? b : null;
26
}
27
28
+export const FIXTURE_ENTRYPOINT = {
29
+ fn: ternary,
30
+ params: ["TodoAdd"],
31
+ isComponent: "TodoAdd",
32
+};
33
+
34
```
35
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ternary-expression.js
+6
@@ -3,3 +3,9 @@ function ternary(props) {
3
const b = props.a ? (props.b && props.c ? props.d : props.e) : props.f;
4
return a ? b : null;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: ternary,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/trivial.expect.md
+12
@@ -6,6 +6,12 @@ function foo(x) {
6
return x;
7
}
8
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: foo,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
14
+
15
```
16
17
## Code
@@ -15,5 +21,11 @@ function foo(x) {
21
return x;
22
}
23
24
+export const FIXTURE_ENTRYPOINT = {
25
+ fn: foo,
26
+ params: ["TodoAdd"],
27
+ isComponent: "TodoAdd",
28
+};
29
+
30
```
31
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/trivial.js
+6
@@ -1,3 +1,9 @@
1
function foo(x) {
2
return x;
3
}
4
+
5
+export const FIXTURE_ENTRYPOINT = {
6
+ fn: foo,
7
+ params: ["TodoAdd"],
8
+ isComponent: "TodoAdd",
9
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-args-test-binary-operator.expect.md
+12
@@ -8,6 +8,12 @@ function component(a, b) {
8
}
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -18,5 +24,11 @@ function component(a, b) {
24
}
25
}
26
27
+export const FIXTURE_ENTRYPOINT = {
28
+ fn: component,
29
+ params: ["TodoAdd"],
30
+ isComponent: "TodoAdd",
31
+};
32
+
33
```
34
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-args-test-binary-operator.js
+6
@@ -3,3 +3,9 @@ function component(a, b) {
3
let m = {};
4
}
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-cast-expression.flow.expect.md
+12
@@ -11,6 +11,12 @@ function Component(props) {
11
const z = (y: Foo);
12
return z;
13
}
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -35,5 +41,11 @@ function Component(props) {
41
return z;
42
}
43
44
+export const FIXTURE_ENTRYPOINT = {
45
+ fn: Component,
46
+ params: ["TodoAdd"],
47
+ isComponent: "TodoAdd",
48
+};
49
+
50
```
51
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-cast-expression.flow.js
+6
-1
@@ -6,4 +6,9 @@ function Component(props) {
6
y.bar = 'hello';
7
const z = (y: Foo);
8
return z;
9
-}
\ No newline at end of file
9
+}
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unary-expr.expect.md
+12
@@ -14,6 +14,12 @@ function component(a) {
14
return { z, p, q, n, m, e, f };
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: component,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -54,5 +60,11 @@ function component(a) {
60
return t0;
61
}
62
63
+export const FIXTURE_ENTRYPOINT = {
64
+ fn: component,
65
+ params: ["TodoAdd"],
66
+ isComponent: "TodoAdd",
67
+};
68
+
69
```
70
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unary-expr.js
+6
@@ -9,3 +9,9 @@ function component(a) {
9
let f = typeof t.t;
10
return { z, p, q, n, m, e, f };
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unconditional-break-label.expect.md
+12
@@ -11,6 +11,12 @@ function foo(a) {
11
return a + x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: foo,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -20,5 +26,11 @@ function foo(a) {
26
return a + 1;
27
}
28
29
+export const FIXTURE_ENTRYPOINT = {
30
+ fn: foo,
31
+ params: ["TodoAdd"],
32
+ isComponent: "TodoAdd",
33
+};
34
+
35
```
36
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unconditional-break-label.js
+6
@@ -6,3 +6,9 @@ function foo(a) {
6
}
7
return a + x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-array-middle-element.expect.md
+12
@@ -7,6 +7,12 @@ function foo(props) {
7
return x + y;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -17,5 +23,11 @@ function foo(props) {
23
return x + y;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: foo,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-array-middle-element.js
+6
@@ -2,3 +2,9 @@ function foo(props) {
2
const [x, unused, y] = props.a;
3
return x + y;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: foo,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-array-rest-element.expect.md
+12
@@ -7,6 +7,12 @@ function foo(props) {
7
return x + y;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -17,5 +23,11 @@ function foo(props) {
23
return x + y;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: foo,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-array-rest-element.js
+6
@@ -2,3 +2,9 @@ function foo(props) {
2
const [x, y, ...z] = props.a;
3
return x + y;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: foo,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-conditional.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
return x;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -20,5 +26,11 @@ function Component(props) {
26
return x;
27
}
28
29
+export const FIXTURE_ENTRYPOINT = {
30
+ fn: Component,
31
+ params: ["TodoAdd"],
32
+ isComponent: "TodoAdd",
33
+};
34
+
35
```
36
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-conditional.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
(x = 1) && (x = 2);
4
return x;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-logical.expect.md
+12
@@ -8,6 +8,12 @@ function Component(props) {
8
return x;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -20,5 +26,11 @@ function Component(props) {
26
return x;
27
}
28
29
+export const FIXTURE_ENTRYPOINT = {
30
+ fn: Component,
31
+ params: ["TodoAdd"],
32
+ isComponent: "TodoAdd",
33
+};
34
+
35
```
36
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-logical.js
+6
@@ -3,3 +3,9 @@ function Component(props) {
3
props.cond ? (x = 1) : (x = 2);
4
return x;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Component,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-object-element-with-rest.expect.md
+12
@@ -8,6 +8,12 @@ function Foo(props) {
8
return rest;
9
}
10
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Foo,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
16
+
17
```
18
19
## Code
@@ -29,5 +35,11 @@ function Foo(props) {
35
return rest;
36
}
37
38
+export const FIXTURE_ENTRYPOINT = {
39
+ fn: Foo,
40
+ params: ["TodoAdd"],
41
+ isComponent: "TodoAdd",
42
+};
43
+
44
```
45
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-object-element-with-rest.js
+6
@@ -3,3 +3,9 @@ function Foo(props) {
3
const { unused, ...rest } = props.a;
4
return rest;
5
}
6
+
7
+export const FIXTURE_ENTRYPOINT = {
8
+ fn: Foo,
9
+ params: ["TodoAdd"],
10
+ isComponent: "TodoAdd",
11
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-object-element.expect.md
+12
@@ -7,6 +7,12 @@ function Foo(props) {
7
return x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Foo,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -17,5 +23,11 @@ function Foo(props) {
23
return x;
24
}
25
26
+export const FIXTURE_ENTRYPOINT = {
27
+ fn: Foo,
28
+ params: ["TodoAdd"],
29
+ isComponent: "TodoAdd",
30
+};
31
+
32
```
33
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/unused-object-element.js
+6
@@ -2,3 +2,9 @@ function Foo(props) {
2
const { x, y, ...z } = props.a;
3
return x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: Foo,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-in-sequence.expect.md
+12
@@ -14,6 +14,12 @@ function Component(props) {
14
return [a, b, c, d];
15
}
16
17
+export const FIXTURE_ENTRYPOINT = {
18
+ fn: Component,
19
+ params: ["TodoAdd"],
20
+ isComponent: "TodoAdd",
21
+};
22
+
23
```
24
25
## Code
@@ -47,5 +53,11 @@ function Component(props) {
53
return t0;
54
}
55
56
+export const FIXTURE_ENTRYPOINT = {
57
+ fn: Component,
58
+ params: ["TodoAdd"],
59
+ isComponent: "TodoAdd",
60
+};
61
+
62
```
63
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-in-sequence.js
+6
@@ -9,3 +9,9 @@ function Component(props) {
9
}
10
return [a, b, c, d];
11
}
12
+
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: Component,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-on-function-parameter.expect.md
+12
@@ -13,6 +13,12 @@ function Component(a, [b], { c }) {
13
return [a, b, c, d, e, f, g, h, i];
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -57,5 +63,11 @@ function Component(a, t37, t38) {
63
return t0;
64
}
65
66
+export const FIXTURE_ENTRYPOINT = {
67
+ fn: Component,
68
+ params: ["TodoAdd"],
69
+ isComponent: "TodoAdd",
70
+};
71
+
72
```
73
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-on-function-parameter.js
+6
@@ -8,3 +8,9 @@ function Component(a, [b], { c }) {
8
let i = --c;
9
return [a, b, c, d, e, f, g, h, i];
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: Component,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression.expect.md
+12
@@ -9,6 +9,12 @@ function foo(props) {
9
return { x, y, z };
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -36,5 +42,11 @@ function foo(props) {
42
return t0;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: foo,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression.js
+6
@@ -4,3 +4,9 @@ function foo(props) {
4
let z = x--;
5
return { x, y, z };
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: foo,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-inlining-block-return.expect.md
+12
@@ -11,6 +11,12 @@ function component(a, b) {
11
return x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -40,5 +46,11 @@ function component(a, b) {
46
return x;
47
}
48
49
+export const FIXTURE_ENTRYPOINT = {
50
+ fn: component,
51
+ params: ["TodoAdd"],
52
+ isComponent: "TodoAdd",
53
+};
54
+
55
```
56
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-inlining-block-return.js
+6
@@ -6,3 +6,9 @@ function component(a, b) {
6
}, [a, b]);
7
return x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-inverted-if.expect.md
+12
@@ -15,6 +15,12 @@ function Component(props) {
15
return x;
16
}
17
18
+export const FIXTURE_ENTRYPOINT = {
19
+ fn: Component,
20
+ params: ["TodoAdd"],
21
+ isComponent: "TodoAdd",
22
+};
23
+
24
```
25
26
## Code
@@ -38,5 +44,11 @@ function Component(props) {
44
return x;
45
}
46
47
+export const FIXTURE_ENTRYPOINT = {
48
+ fn: Component,
49
+ params: ["TodoAdd"],
50
+ isComponent: "TodoAdd",
51
+};
52
+
53
```
54
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-inverted-if.js
+6
@@ -10,3 +10,9 @@ function Component(props) {
10
});
11
return x;
12
}
13
+
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-labeled-statement-unconditional-return.expect.md
+12
@@ -11,6 +11,12 @@ function Component(props) {
11
return x;
12
}
13
14
+export const FIXTURE_ENTRYPOINT = {
15
+ fn: Component,
16
+ params: ["TodoAdd"],
17
+ isComponent: "TodoAdd",
18
+};
19
+
20
```
21
22
## Code
@@ -22,5 +28,11 @@ function Component(props) {
28
return x;
29
}
30
31
+export const FIXTURE_ENTRYPOINT = {
32
+ fn: Component,
33
+ params: ["TodoAdd"],
34
+ isComponent: "TodoAdd",
35
+};
36
+
37
```
38
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-labeled-statement-unconditional-return.js
+6
@@ -6,3 +6,9 @@ function Component(props) {
6
});
7
return x;
8
}
9
+
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-logical.expect.md
+12
@@ -7,6 +7,12 @@ function Component(props) {
7
return x;
8
}
9
10
+export const FIXTURE_ENTRYPOINT = {
11
+ fn: Component,
12
+ params: ["TodoAdd"],
13
+ isComponent: "TodoAdd",
14
+};
15
+
16
```
17
18
## Code
@@ -18,5 +24,11 @@ function Component(props) {
24
return x;
25
}
26
27
+export const FIXTURE_ENTRYPOINT = {
28
+ fn: Component,
29
+ params: ["TodoAdd"],
30
+ isComponent: "TodoAdd",
31
+};
32
+
33
```
34
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-logical.js
+6
@@ -2,3 +2,9 @@ function Component(props) {
2
const x = useMemo(() => props.a && props.b);
3
return x;
4
}
5
+
6
+export const FIXTURE_ENTRYPOINT = {
7
+ fn: Component,
8
+ params: ["TodoAdd"],
9
+ isComponent: "TodoAdd",
10
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-multiple-if-else.expect.md
+12
@@ -17,6 +17,12 @@ function Component(props) {
17
return x;
18
}
19
20
+export const FIXTURE_ENTRYPOINT = {
21
+ fn: Component,
22
+ params: ["TodoAdd"],
23
+ isComponent: "TodoAdd",
24
+};
25
+
26
```
27
28
## Code
@@ -53,5 +59,11 @@ function Component(props) {
59
return x;
60
}
61
62
+export const FIXTURE_ENTRYPOINT = {
63
+ fn: Component,
64
+ params: ["TodoAdd"],
65
+ isComponent: "TodoAdd",
66
+};
67
+
68
```
69
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-multiple-if-else.js
+6
@@ -12,3 +12,9 @@ function Component(props) {
12
});
13
return x;
14
}
15
+
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: Component,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-nested-ifs.expect.md
+12
@@ -12,6 +12,12 @@ function Component(props) {
12
return x;
13
}
14
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
20
+
21
```
22
23
## Code
@@ -24,5 +30,11 @@ function Component(props) {
30
}
31
}
32
33
+export const FIXTURE_ENTRYPOINT = {
34
+ fn: Component,
35
+ params: ["TodoAdd"],
36
+ isComponent: "TodoAdd",
37
+};
38
+
39
```
40
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-nested-ifs.js
+6
@@ -7,3 +7,9 @@ function Component(props) {
7
}, [props.cond]);
8
return x;
9
}
10
+
11
+export const FIXTURE_ENTRYPOINT = {
12
+ fn: Component,
13
+ params: ["TodoAdd"],
14
+ isComponent: "TodoAdd",
15
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-switch-no-fallthrough.expect.md
+12
@@ -16,6 +16,12 @@ function Component(props) {
16
return x;
17
}
18
19
+export const FIXTURE_ENTRYPOINT = {
20
+ fn: Component,
21
+ params: ["TodoAdd"],
22
+ isComponent: "TodoAdd",
23
+};
24
+
25
```
26
27
## Code
@@ -36,5 +42,11 @@ function Component(props) {
42
return x;
43
}
44
45
+export const FIXTURE_ENTRYPOINT = {
46
+ fn: Component,
47
+ params: ["TodoAdd"],
48
+ isComponent: "TodoAdd",
49
+};
50
+
51
```
52
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-switch-no-fallthrough.js
+6
@@ -11,3 +11,9 @@ function Component(props) {
11
});
12
return x;
13
}
14
+
15
+export const FIXTURE_ENTRYPOINT = {
16
+ fn: Component,
17
+ params: ["TodoAdd"],
18
+ isComponent: "TodoAdd",
19
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-switch-return.expect.md
+12
@@ -22,6 +22,12 @@ function Component(props) {
22
return x;
23
}
24
25
+export const FIXTURE_ENTRYPOINT = {
26
+ fn: Component,
27
+ params: ["TodoAdd"],
28
+ isComponent: "TodoAdd",
29
+};
30
+
31
```
32
33
## Code
@@ -51,5 +57,11 @@ function Component(props) {
57
return x;
58
}
59
60
+export const FIXTURE_ENTRYPOINT = {
61
+ fn: Component,
62
+ params: ["TodoAdd"],
63
+ isComponent: "TodoAdd",
64
+};
65
+
66
```
67
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/useMemo-switch-return.js
+6
@@ -17,3 +17,9 @@ function Component(props) {
17
});
18
return x;
19
}
20
+
21
+export const FIXTURE_ENTRYPOINT = {
22
+ fn: Component,
23
+ params: ["TodoAdd"],
24
+ isComponent: "TodoAdd",
25
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-break.expect.md
+12
@@ -9,6 +9,12 @@ function foo(a, b) {
9
return b;
10
}
11
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
17
+
18
```
19
20
## Code
@@ -21,5 +27,11 @@ function foo(a, b) {
27
return b;
28
}
29
30
+export const FIXTURE_ENTRYPOINT = {
31
+ fn: foo,
32
+ params: ["TodoAdd"],
33
+ isComponent: "TodoAdd",
34
+};
35
+
36
```
37
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-break.js
+6
@@ -4,3 +4,9 @@ function foo(a, b) {
4
}
5
return b;
6
}
7
+
8
+export const FIXTURE_ENTRYPOINT = {
9
+ fn: foo,
10
+ params: ["TodoAdd"],
11
+ isComponent: "TodoAdd",
12
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-conditional-continue.expect.md
+12
@@ -13,6 +13,12 @@ function foo(a, b, c, d) {
13
d();
14
}
15
16
+export const FIXTURE_ENTRYPOINT = {
17
+ fn: foo,
18
+ params: ["TodoAdd"],
19
+ isComponent: "TodoAdd",
20
+};
21
+
22
```
23
24
## Code
@@ -30,5 +36,11 @@ function foo(a, b, c, d) {
36
d();
37
}
38
39
+export const FIXTURE_ENTRYPOINT = {
40
+ fn: foo,
41
+ params: ["TodoAdd"],
42
+ isComponent: "TodoAdd",
43
+};
44
+
45
```
46
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-conditional-continue.js
+6
@@ -8,3 +8,9 @@ function foo(a, b, c, d) {
8
}
9
d();
10
}
11
+
12
+export const FIXTURE_ENTRYPOINT = {
13
+ fn: foo,
14
+ params: ["TodoAdd"],
15
+ isComponent: "TodoAdd",
16
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-logical.expect.md
+12
@@ -10,6 +10,12 @@ function foo(props) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -23,5 +29,11 @@ function foo(props) {
29
return x;
30
}
31
32
+export const FIXTURE_ENTRYPOINT = {
33
+ fn: foo,
34
+ params: ["TodoAdd"],
35
+ isComponent: "TodoAdd",
36
+};
37
+
38
```
39
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-logical.js
+6
@@ -5,3 +5,9 @@ function foo(props) {
5
}
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: foo,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-property.expect.md
+12
@@ -10,6 +10,12 @@ function foo(a, b) {
10
return x;
11
}
12
13
+export const FIXTURE_ENTRYPOINT = {
14
+ fn: foo,
15
+ params: ["TodoAdd"],
16
+ isComponent: "TodoAdd",
17
+};
18
+
19
```
20
21
## Code
@@ -23,5 +29,11 @@ function foo(a, b) {
29
return x;
30
}
31
32
+export const FIXTURE_ENTRYPOINT = {
33
+ fn: foo,
34
+ params: ["TodoAdd"],
35
+ isComponent: "TodoAdd",
36
+};
37
+
38
```
39
\ No newline at end of file
compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/while-property.js
+6
@@ -5,3 +5,9 @@ function foo(a, b) {
5
}
6
return x;
7
}
8
+
9
+export const FIXTURE_ENTRYPOINT = {
10
+ fn: foo,
11
+ params: ["TodoAdd"],
12
+ isComponent: "TodoAdd",
13
+};