Files
George Zahariev 3f54cc20ed Upgrade the Flow parser tooling to 0.340.0
Summary:
X-link: https://github.com/react/metro/pull/2224

@public
Upgrade `flow-parser`, `flow-estree`, `flow-eslint`, `flow-transform` and `flow-api-translator` to 0.340.0, and adapt the code generators, codemods, lint rules and parser adapters that read the ESTree output those releases produce.

Four shapes moved since the versions in use, and each one silently changed behavior rather than failing loudly:

- Generic type annotations carry their arguments in `typeArguments` instead of `typeParameters`, so consumers that still read the old field dropped every type argument. Readers now take the canonical field whenever the node carries it, including when it is `null`, and fall back to the previous field otherwise, so the same source keeps working with the older releases that remain installed elsewhere.
- Enum declarations expose a single `EnumBody` carrying an explicit type instead of one node type per value kind. Enum readers accept both and resolve the value kind the same way, so the supported enums and the existing rejection of boolean and symbol enums are unchanged.
- `JSXAttribute.name` widened to also allow a namespaced name, so transforms that compare an attribute name against a list now match only plain identifiers and leave namespaced attributes alone, which is what they already did at runtime.
- Object type properties, array elements, import phases and several other fields are now nullable or newly required. Readers guard them and report the existing unsupported-input errors instead of failing on a missing property, and import declarations are built from constant parser-owned templates so one source satisfies both the old and the new builder.

The lint rules, the declaration generators and the `jscodeshift`/recast boundary are adapted the same way, and the published type mirrors for the lint and transform packages are refreshed.

Changelog: [Internal]

Reviewed By: SamChou19815, panagosg7

Differential Revision: D131489493

Pull Request resolved: https://github.com/react/react-native/pull/59983
2026-11-13 11:55:16 +00:00

48 lines
1.2 KiB
JSON

{
"name": "@react-native/eslint-plugin-specs",
"version": "0.87.0-main",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/react/react-native.git",
"directory": "packages/eslint-plugin-specs"
},
"homepage": "https://github.com/react/react-native/tree/HEAD/packages/eslint-plugin-specs#readme",
"keywords": [
"eslint",
"rules",
"react-native",
"native-modules",
"components",
"specs"
],
"bugs": "https://github.com/react/react-native/issues",
"main": "index.js",
"files": [
"README.md",
"index.js",
"react-native-modules.js",
"with-babel-register"
],
"scripts": {
"prepack": "node prepack.js",
"postpack": "node postpack.js"
},
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@react-native/codegen": "0.87.0-main",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"flow-parser": "0.340.0",
"source-map-support": "0.5.0"
},
"devDependencies": {
"flow-eslint": "0.340.0"
},
"engines": {
"node": "^22.13.0 || ^24.3.0 || >= 26.0.0"
}
}