Commit ea8a861
authored
refactor: use ESM exports in ReactNativeViewConfigRegistry (#27508)
## Summary
When transpiling `react-native` with `swc` this file caused some trouble
as it mixes ESM and CJS import/export syntax. This PR addresses this by
converting CJS exports to ESM exports. As
`ReactNativeViewConfigRegistry` is synced from `react` to `react-native`
repository, it's required to make the change here. I've also aligned the
mock of `ReactNativeViewConfigRegistry` to reflect current
implementation.
Related PR in `react-native`:
facebook/react-native#407871 parent e61a60f commit ea8a861
File tree
2 files changed
+16
-31
lines changed- packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate
- scripts/rollup/shims/react-native
2 files changed
+16
-31
lines changedLines changed: 10 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
16 | 13 | | |
17 | 14 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 15 | + | |
| 16 | + | |
25 | 17 | | |
26 | 18 | | |
27 | 19 | | |
28 | 20 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 21 | + | |
32 | 22 | | |
33 | 23 | | |
34 | 24 | | |
| |||
46 | 36 | | |
47 | 37 | | |
48 | 38 | | |
49 | | - | |
| 39 | + | |
50 | 40 | | |
51 | 41 | | |
52 | 42 | | |
| |||
55 | 45 | | |
56 | 46 | | |
57 | 47 | | |
58 | | - | |
59 | | - | |
| 48 | + | |
60 | 49 | | |
61 | 50 | | |
62 | 51 | | |
| |||
66 | 55 | | |
67 | 56 | | |
68 | 57 | | |
69 | | - | |
70 | 58 | | |
71 | | - | |
| 59 | + | |
72 | 60 | | |
73 | 61 | | |
74 | 62 | | |
| |||
83 | 71 | | |
84 | 72 | | |
85 | 73 | | |
86 | | - | |
| 74 | + | |
87 | 75 | | |
88 | 76 | | |
89 | 77 | | |
90 | 78 | | |
91 | 79 | | |
92 | 80 | | |
93 | | - | |
| 81 | + | |
94 | 82 | | |
95 | 83 | | |
96 | 84 | | |
| |||
121 | 109 | | |
122 | 110 | | |
123 | 111 | | |
124 | | - | |
| 112 | + | |
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
| |||
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
78 | | - | |
| 75 | + | |
79 | 76 | | |
80 | 77 | | |
81 | 78 | | |
| |||
89 | 86 | | |
90 | 87 | | |
91 | 88 | | |
92 | | - | |
| 89 | + | |
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
99 | | - | |
| 96 | + | |
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
| |||
124 | 121 | | |
125 | 122 | | |
126 | 123 | | |
127 | | - | |
| 124 | + | |
0 commit comments