Skip to content

Commit b63040f

Browse files
authored
[0.79] refactor(react-native-codegen): Replace jscodeshift with @babel/core (#50031)
* Replace jscodeshift with @babel/core * Rewrite GenerateViewConfigJs with @babel/core * Update yarn.lock * Update snapshots * Remove unused devDependencies * Remove jscodeshift from root * Format with prettier * Import changes (literal -> stringLiteral rather than identifier in some cases) * Update snapshots * Update snapshots for babel-plugin-codegen * Disable babelrc since we're only stringifying * Revert "Remove unused devDependencies" This reverts commit f8defcf.
1 parent 1545169 commit b63040f

File tree

7 files changed

+392
-815
lines changed

7 files changed

+392
-815
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"jest-diff": "^29.7.0",
9090
"jest-junit": "^10.0.0",
9191
"jest-snapshot": "^29.7.0",
92-
"jscodeshift": "^0.14.0",
9392
"metro-babel-register": "^0.82.0",
9493
"metro-memory-fs": "^0.82.0",
9594
"metro-transform-plugins": "^0.82.0",

packages/babel-plugin-codegen/__tests__/__snapshots__/index-test.js.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ const {
3030
} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
3131
let nativeComponentName = 'RCTModule';
3232
export const __INTERNAL_VIEW_CONFIG = {
33-
uiViewClassName: 'RCTModule',
33+
uiViewClassName: \\"RCTModule\\",
3434
bubblingEventTypes: {
3535
topBubblingEventDefinedInlineNull: {
3636
phasedRegistrationNames: {
37-
captured: 'onBubblingEventDefinedInlineNullCapture',
38-
bubbled: 'onBubblingEventDefinedInlineNull'
37+
captured: \\"onBubblingEventDefinedInlineNullCapture\\",
38+
bubbled: \\"onBubblingEventDefinedInlineNull\\"
3939
}
4040
}
4141
},
4242
directEventTypes: {
4343
topDirectEventDefinedInlineNull: {
44-
registrationName: 'onDirectEventDefinedInlineNull'
44+
registrationName: \\"onDirectEventDefinedInlineNull\\"
4545
}
4646
},
4747
validAttributes: {
@@ -93,18 +93,18 @@ const {
9393
} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
9494
let nativeComponentName = 'RCTModule';
9595
export const __INTERNAL_VIEW_CONFIG = {
96-
uiViewClassName: 'RCTModule',
96+
uiViewClassName: \\"RCTModule\\",
9797
bubblingEventTypes: {
9898
topBubblingEventDefinedInlineNull: {
9999
phasedRegistrationNames: {
100-
captured: 'onBubblingEventDefinedInlineNullCapture',
101-
bubbled: 'onBubblingEventDefinedInlineNull'
100+
captured: \\"onBubblingEventDefinedInlineNullCapture\\",
101+
bubbled: \\"onBubblingEventDefinedInlineNull\\"
102102
}
103103
}
104104
},
105105
directEventTypes: {
106106
topDirectEventDefinedInlineNull: {
107-
registrationName: 'onDirectEventDefinedInlineNull'
107+
registrationName: \\"onDirectEventDefinedInlineNull\\"
108108
}
109109
},
110110
validAttributes: {

0 commit comments

Comments
 (0)