Skip to content

Flow: Fix @babel/types libdef for getBindingIdentifiers#1770

Closed
robhogan wants to merge 1 commit into
mainfrom
export-D111056985
Closed

Flow: Fix @babel/types libdef for getBindingIdentifiers#1770
robhogan wants to merge 1 commit into
mainfrom
export-D111056985

Conversation

@robhogan

@robhogan robhogan commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary:
X-link: react/react-native#57488

The generated Flow libdef for babel/types declared duplicates as a required parameter on getBindingIdentifiers and getOuterBindingIdentifiers.

It is actually optional, both at runtime (only read as a truthy flag, defaulting to the non-duplicate map) and in the upstream TS types:

https://github.com/babel/babel/blob/7.x/packages/babel-types/src/retrievers/getBindingIdentifiers.ts#L17-L36

This prevented legitimate single-argument use later in this stack. Separating it for export to RN + Metro.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D111056985

Summary:
X-link: react/react-native#57488

The generated Flow libdef for `babel/types` declared `duplicates` as a required parameter on `getBindingIdentifiers` and `getOuterBindingIdentifiers`. 

It is actually optional, both at runtime (only read as a truthy flag, defaulting to the non-duplicate map) and in the upstream TS types:

https://github.com/babel/babel/blob/7.x/packages/babel-types/src/retrievers/getBindingIdentifiers.ts#L17-L36

This prevented legitimate single-argument use later in this stack. Separating it for export to RN + Metro.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D111056985
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 9, 2026
@meta-codesync

meta-codesync Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@robhogan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111056985.

meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Jul 9, 2026
Summary:
X-link: react/metro#1770


The generated Flow libdef for `babel/types` declared `duplicates` as a required parameter on `getBindingIdentifiers` and `getOuterBindingIdentifiers`. 

It is actually optional, both at runtime (only read as a truthy flag, defaulting to the non-duplicate map) and in the upstream TS types:

https://github.com/babel/babel/blob/7.x/packages/babel-types/src/retrievers/getBindingIdentifiers.ts#L17-L36

This prevented legitimate single-argument use later in this stack. Separating it for export to RN + Metro.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D111056985
@meta-codesync meta-codesync Bot closed this in 25e322a Jul 9, 2026
@meta-codesync meta-codesync Bot added the Merged label Jul 9, 2026
@meta-codesync

meta-codesync Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 25e322a.

meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Jul 9, 2026
Summary:
X-link: react/metro#1770

Pull Request resolved: #57488

The generated Flow libdef for `babel/types` declared `duplicates` as a required parameter on `getBindingIdentifiers` and `getOuterBindingIdentifiers`.

It is actually optional, both at runtime (only read as a truthy flag, defaulting to the non-duplicate map) and in the upstream TS types:

https://github.com/babel/babel/blob/7.x/packages/babel-types/src/retrievers/getBindingIdentifiers.ts#L17-L36

This prevented legitimate single-argument use later in this stack. Separating it for export to RN + Metro.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D111056985

fbshipit-source-id: f3f07617e2fb010b08e83d7d012800a884f5bd15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant