mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b37101486b
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46295 X-link: https://github.com/facebook/metro/pull/1343 Updated all **babel** packages in all `package.json` across the repo and ran `npx yarn-deduplicate yarn.lock --scopes babel`. Afterwards, fixed the following issues appearing as a result of that (squashed the following initially separate diffs to make this packages update work atomically): ### (D61336392) updated jest snapshot tests failing ### (D61336393) updated babel types and corrected typings accordingly The latest babel 7 introduces the following features we need to adjust our types to: * `JSXNamespacedName` is removed from valid `CallExpression` args ([PR](https://github.com/babel/babel/pull/16421)) * `JSXNamespacedName` is used for namespaced XML properties in things like `<div namespace:name="value">`, but `fn(namespace:name)` doesn't make any sense. * Dynamic imports are enabled behind a new flag `createImportExpressions` ([PR](https://github.com/babel/babel/pull/15682)), introducing calls such as `import(foo, options)`. These complicate the expected values passed to `import` to be more than just strings. * Since these are behind a flag that is not expected to be enabled, we can throw an error for now and whoever uses it can add a support to it if needed later. ### Added a new metro ENV ignore `BROWSERSLIST_ROOT_PATH` is set to `""` explicitly in `xplat/js/BUCK` and then ignored in `js/tools/metro-buck-transform-worker/src/EnvVarAllowList.js` Reviewed By: robhogan Differential Revision: D61543660 fbshipit-source-id: abbcab72642cf6dc03eed5142eb78dbcc7f63a86
70 lines
2.9 KiB
JSON
70 lines
2.9 KiB
JSON
{
|
|
"name": "@react-native/babel-preset",
|
|
"version": "0.76.0-main",
|
|
"description": "Babel preset for React Native applications",
|
|
"main": "src/index.js",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+ssh://git@github.com/facebook/react-native.git"
|
|
},
|
|
"keywords": [
|
|
"babel",
|
|
"preset",
|
|
"react-native"
|
|
],
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@babel/core": "^7.25.2",
|
|
"@babel/plugin-transform-async-generator-functions": "^7.25.4",
|
|
"@babel/plugin-transform-class-properties": "^7.25.4",
|
|
"@babel/plugin-proposal-export-default-from": "^7.24.7",
|
|
"@babel/plugin-transform-logical-assignment-operators": "^7.24.7",
|
|
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
|
|
"@babel/plugin-transform-numeric-separator": "^7.24.7",
|
|
"@babel/plugin-transform-object-rest-spread": "^7.24.7",
|
|
"@babel/plugin-transform-optional-catch-binding": "^7.24.7",
|
|
"@babel/plugin-transform-optional-chaining": "^7.24.8",
|
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
"@babel/plugin-syntax-export-default-from": "^7.24.7",
|
|
"@babel/plugin-syntax-flow": "^7.24.7",
|
|
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
|
|
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
|
|
"@babel/plugin-transform-arrow-functions": "^7.24.7",
|
|
"@babel/plugin-transform-async-to-generator": "^7.24.7",
|
|
"@babel/plugin-transform-block-scoping": "^7.25.0",
|
|
"@babel/plugin-transform-classes": "^7.25.4",
|
|
"@babel/plugin-transform-computed-properties": "^7.24.7",
|
|
"@babel/plugin-transform-destructuring": "^7.24.8",
|
|
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
|
"@babel/plugin-transform-for-of": "^7.24.7",
|
|
"@babel/plugin-transform-function-name": "^7.25.1",
|
|
"@babel/plugin-transform-literals": "^7.25.2",
|
|
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
|
|
"@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7",
|
|
"@babel/plugin-transform-parameters": "^7.24.7",
|
|
"@babel/plugin-transform-private-methods": "^7.24.7",
|
|
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
|
|
"@babel/plugin-transform-react-display-name": "^7.24.7",
|
|
"@babel/plugin-transform-react-jsx": "^7.25.2",
|
|
"@babel/plugin-transform-react-jsx-self": "^7.24.7",
|
|
"@babel/plugin-transform-react-jsx-source": "^7.24.7",
|
|
"@babel/plugin-transform-regenerator": "^7.24.7",
|
|
"@babel/plugin-transform-runtime": "^7.24.7",
|
|
"@babel/plugin-transform-shorthand-properties": "^7.24.7",
|
|
"@babel/plugin-transform-spread": "^7.24.7",
|
|
"@babel/plugin-transform-sticky-regex": "^7.24.7",
|
|
"@babel/plugin-transform-typescript": "^7.25.2",
|
|
"@babel/plugin-transform-unicode-regex": "^7.24.7",
|
|
"@babel/template": "^7.25.0",
|
|
"@react-native/babel-plugin-codegen": "0.76.0-main",
|
|
"babel-plugin-transform-flow-enums": "^0.0.2",
|
|
"react-refresh": "^0.14.0"
|
|
},
|
|
"peerDependencies": {
|
|
"@babel/core": "*"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|