Repository navigation
Conversation
|
@gkz has exported this pull request. If you are a Meta employee, you can view the originating Diff in D131489493. |
gkz
force-pushed
the
export-D131489493
branch
from
November 12, 2026 21:45
c639472 to
c65105a
Compare
Summary: @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
gkz
force-pushed
the
export-D131489493
branch
from
November 12, 2026 23:06
c65105a to
a605c41
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
@public
Upgrade
flow-parser,flow-estree,flow-eslint,flow-transformandflow-api-translatorto 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:
typeArgumentsinstead oftypeParameters, 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 isnull, and fall back to the previous field otherwise, so the same source keeps working with the older releases that remain installed elsewhere.EnumBodycarrying 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.namewidened 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.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