diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index 692806a0ddd176..4976cea51639cc 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -56,7 +56,7 @@ "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.76.1", - "babel-plugin-syntax-hermes-parser": "^0.23.1", + "babel-plugin-syntax-hermes-parser": "^0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" }, diff --git a/packages/react-native-babel-preset/src/configs/main.js b/packages/react-native-babel-preset/src/configs/main.js index c3b7f9d914224a..077e1a68b02287 100644 --- a/packages/react-native-babel-preset/src/configs/main.js +++ b/packages/react-native-babel-preset/src/configs/main.js @@ -25,7 +25,7 @@ function isTSXSource(fileName) { const loose = true; const defaultPlugins = [ - [require('babel-plugin-syntax-hermes-parser')], + [require('babel-plugin-syntax-hermes-parser'), {parseLangTypes: 'flow'}], [require('babel-plugin-transform-flow-enums')], [require('@babel/plugin-transform-block-scoping')], [require('@babel/plugin-transform-class-properties'), {loose}], diff --git a/yarn.lock b/yarn.lock index dd8a6e595669fb..0f551a0e4810b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2851,6 +2851,13 @@ babel-plugin-syntax-hermes-parser@0.24.0: dependencies: hermes-parser "0.24.0" +babel-plugin-syntax-hermes-parser@^0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.25.1.tgz#58b539df973427fcfbb5176a3aec7e5dee793cb0" + integrity sha512-IVNpGzboFLfXZUAwkLFcI/bnqVbwky0jP3eBno4HKtqvQJAHBLdgxiG6lQ4to0+Q/YCN3PO0od5NZwIKyY4REQ== + dependencies: + hermes-parser "0.25.1" + babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: version "7.0.0-beta.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" @@ -4936,6 +4943,11 @@ hermes-estree@0.24.0: resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.24.0.tgz#487dc1ddc0bae698c2d79f34153ac9bf62d7b3c0" integrity sha512-LyoXLB7IFzeZW0EvAbGZacbxBN7t6KKSDqFJPo3Ydow7wDlrDjXwsdiAHV6XOdvEN9MEuWXsSIFN4tzpyrXIHw== +hermes-estree@0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.25.1.tgz#6aeec17d1983b4eabf69721f3aa3eb705b17f480" + integrity sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw== + hermes-parser@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.23.1.tgz#e5de648e664f3b3d84d01b48fc7ab164f4b68205" @@ -4950,6 +4962,13 @@ hermes-parser@0.24.0: dependencies: hermes-estree "0.24.0" +hermes-parser@0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.25.1.tgz#5be0e487b2090886c62bd8a11724cd766d5f54d1" + integrity sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA== + dependencies: + hermes-estree "0.25.1" + hermes-transform@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/hermes-transform/-/hermes-transform-0.23.1.tgz#ea6d401117db8398de9723dc1cf936a9a3c8477b"