Switch over to flow-parser/babel-plugin for compilation (#57770)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57770

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D114240152

fbshipit-source-id: 7d292d33f75cf548b89e6427684fc3a5994c4b3f
This commit is contained in:
Sam Zhou authored and meta-codesync[bot] committed 2026-07-30 17:10:20 -07:00
1 parent 663c191e47
commit 7b5d1bc971
10 files changed
+11 -6

No files matched your search

+1
View File
@@ -69,6 +69,7 @@
"ansi-styles": "^4.2.1",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-syntax-hermes-parser": "0.37.0",
"flow-parser": "0.325.0",
"babel-plugin-transform-define": "^2.1.4",
"babel-plugin-transform-flow-enums": "^0.0.2",
"clang-format": "^1.8.0",
@@ -26,6 +26,7 @@
],
"devDependencies": {
"babel-plugin-syntax-hermes-parser": "0.37.0",
"flow-parser": "0.325.0",
"flow-eslint": "0.325.0",
"hermes-eslint": "0.37.0"
},
@@ -19,7 +19,7 @@ ESLintTester.setDefaultConfig({
ecmaVersion: 6,
sourceType: 'module',
babelOptions: {
presets: [require.resolve('babel-plugin-syntax-hermes-parser')],
presets: [require.resolve('flow-parser/babel-plugin')],
},
},
});
@@ -36,6 +36,7 @@
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"babel-plugin-syntax-hermes-parser": "0.37.0",
"flow-parser": "0.325.0",
"source-map-support": "0.5.0"
},
"devDependencies": {
+2 -2
View File
@@ -36,7 +36,7 @@ function requireModuleParser() {
configFile: false,
only: [/react-native-codegen\/src\//],
plugins: [
require('babel-plugin-syntax-hermes-parser'),
require('flow-parser/babel-plugin'),
require('@babel/plugin-transform-flow-strip-types').default,
],
};
@@ -54,7 +54,7 @@ function requireModuleParser() {
configFile: false,
only: [/@react-native\/codegen\/lib\//],
plugins: [
require('babel-plugin-syntax-hermes-parser'),
require('flow-parser/babel-plugin'),
require('@babel/plugin-transform-flow-strip-types').default,
],
};
@@ -57,6 +57,7 @@
"@babel/plugin-transform-unicode-regex": "^7.24.7",
"@react-native/babel-plugin-codegen": "0.87.0-main",
"babel-plugin-syntax-hermes-parser": "0.37.0",
"flow-parser": "0.325.0",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
},
+1 -1
View File
@@ -231,7 +231,7 @@ const getPreset = (src, options, babel) => {
{
plugins: [
[
require('babel-plugin-syntax-hermes-parser'),
require('flow-parser/babel-plugin'),
{
parseLangTypes: 'flow',
reactRuntimeTarget: '19',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"plugins": [
"babel-plugin-syntax-hermes-parser",
"flow-parser/babel-plugin",
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-class-properties",
+1
View File
@@ -160,6 +160,7 @@
"anser": "^1.4.9",
"ansi-regex": "^5.0.0",
"babel-plugin-syntax-hermes-parser": "0.37.0",
"flow-parser": "0.325.0",
"base64-js": "^1.5.1",
"flow-enums-runtime": "^0.0.6",
"hermes-compiler": "0.0.0",
+1 -1
View File
@@ -25,7 +25,7 @@ const config: BabelCoreOptions = {
],
],
plugins: [
require.resolve('babel-plugin-syntax-hermes-parser'),
require.resolve('flow-parser/babel-plugin'),
[
require.resolve('babel-plugin-transform-define'),
{