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
43 lines
1.4 KiB
JSON
43 lines
1.4 KiB
JSON
{
|
|
"name": "@react-native/codegen-typescript-test",
|
|
"version": "0.76.0-main",
|
|
"private": true,
|
|
"description": "TypeScript related unit test for @react-native/codegen",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/facebook/react-native.git",
|
|
"directory": "packages/react-native-codegen-typescript-test"
|
|
},
|
|
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-typescript-test",
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"scripts": {
|
|
"build": "yarn clean && node scripts/build.js --verbose && tsc",
|
|
"clean": "rimraf lib && rimraf __generated__/*.ts",
|
|
"prepare": "yarn run build"
|
|
},
|
|
"dependencies": {
|
|
"@react-native/codegen": "0.76.0-main"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.25.2",
|
|
"@babel/plugin-transform-class-properties": "^7.25.4",
|
|
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
|
|
"@babel/plugin-transform-object-rest-spread": "^7.24.7",
|
|
"@babel/plugin-transform-optional-chaining": "^7.24.8",
|
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
"@babel/plugin-transform-async-to-generator": "^7.24.7",
|
|
"@babel/plugin-transform-destructuring": "^7.24.8",
|
|
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
|
"@babel/preset-env": "^7.25.3",
|
|
"@types/jest": "^29.5.3",
|
|
"jest": "^29.6.3",
|
|
"rimraf": "^3.0.2"
|
|
},
|
|
"peerDependencies": {
|
|
"@babel/preset-env": "^7.1.6"
|
|
}
|
|
}
|