mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Extracting portions of #32416 for easier review. This PR dedupes @babel/types to resolve to 7.26.3, for compatibility in the root workspace where eslint-plugin-react-hooks resides. I also needed to update @babel/preset-typescript in snap. The compiler changes in HIR and ReactiveScopes were needed due to types changing. Notably, Babel [added support for optional chaining assignment](https://github.com/babel/babel/pull/15751) (currently [Stage 1](https://github.com/tc39/proposal-optional-chaining-assignment)), so in the latest versions of @babel/types, AssignmentExpression.left can now also be of t.OptionalMemberExpression. Given that this is in Stage 1, the compiler probably shouldn't support this syntax, so this PR updates HIR to bailout with a TODO if there is a non LVal on the lhs of an Assignment Expression. There was also a small superficial SourceLocation change needed in `InferReactiveScopeVariables` as Babel 8 changes were [accidentally released in 7](https://github.com/babel/babel/issues/10746#issuecomment-2699146670). It doesn't affect our analysis so it seems fine to just update with the new properties. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32581). * #32582 * __->__ #32581 Co-authored-by: michael faith <michaelfaith@users.noreply.github.com> Co-authored-by: michael faith <michaelfaith@users.noreply.github.com>
53 lines
1.4 KiB
JSON
53 lines
1.4 KiB
JSON
{
|
|
"private": true,
|
|
"workspaces": {
|
|
"packages": [
|
|
"packages/*"
|
|
]
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/facebook/react.git"
|
|
},
|
|
"scripts": {
|
|
"copyright": "node scripts/copyright.js",
|
|
"hash": "scripts/hash.sh",
|
|
"start": "yarn workspace playground run start",
|
|
"next": "yarn workspace playground run dev",
|
|
"build": "yarn workspaces run build",
|
|
"dev": "cd apps/playground && yarn dev",
|
|
"test": "yarn workspaces run test",
|
|
"snap": "yarn workspace babel-plugin-react-compiler run snap",
|
|
"snap:build": "yarn workspace snap run build",
|
|
"npm:publish": "node scripts/release/publish"
|
|
},
|
|
"dependencies": {
|
|
"fs-extra": "^4.0.2",
|
|
"react-is": "0.0.0-experimental-4beb1fd8-20241118"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/types": "^7.26.0",
|
|
"@tsconfig/strictest": "^2.0.5",
|
|
"concurrently": "^7.4.0",
|
|
"esbuild": "^0.25.0",
|
|
"folder-hash": "^4.0.4",
|
|
"npm-dts": "^1.3.13",
|
|
"object-assign": "^4.1.1",
|
|
"ora": "5.4.1",
|
|
"prettier": "^3.3.3",
|
|
"prettier-plugin-hermes-parser": "^0.26.0",
|
|
"prompt-promise": "^1.0.3",
|
|
"rimraf": "^5.0.10",
|
|
"to-fast-properties": "^2.0.0",
|
|
"tsup": "^8.4.0",
|
|
"typescript": "^5.4.3",
|
|
"wait-on": "^7.2.0",
|
|
"yargs": "^17.7.2"
|
|
},
|
|
"resolutions": {
|
|
"rimraf": "5.0.10",
|
|
"@babel/types": "7.26.3"
|
|
},
|
|
"packageManager": "yarn@1.22.22"
|
|
}
|