Skip to content

Flow: Fix @babel/types libdef for getBindingIdentifiers (#57488)#57488

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

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

Conversation

@robhogan

@robhogan robhogan commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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 commented Jul 8, 2026

Copy link
Copy Markdown

@robhogan has exported this pull request. If you are a Meta employee, you can view the originating Diff in 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 8, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jul 8, 2026
@meta-codesync meta-codesync Bot changed the title Flow: Fix @babel/types libdef for getBindingIdentifiers Flow: Fix @babel/types libdef for getBindingIdentifiers (#57488) Jul 8, 2026
meta-codesync Bot pushed a commit that referenced this pull request Jul 8, 2026
Summary:

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]

Differential Revision: D111056985
@meta-codesync meta-codesync Bot force-pushed the export-D111056985 branch from c241e72 to ec339df Compare July 8, 2026 16:36
meta-codesync Bot pushed a commit that referenced this pull request Jul 8, 2026
Summary:

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]

Differential Revision: D111056985
@meta-codesync meta-codesync Bot force-pushed the export-D111056985 branch from ec339df to 6c6a67b Compare July 8, 2026 16:43
meta-codesync Bot pushed a commit that referenced this pull request Jul 9, 2026
Summary:

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 force-pushed the export-D111056985 branch from 6c6a67b to e4245cd Compare July 9, 2026 11:47
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 force-pushed the export-D111056985 branch from e4245cd to 93b7417 Compare July 9, 2026 14:00
meta-codesync Bot pushed a commit to react/metro that referenced this pull request Jul 9, 2026
Summary:
Pull Request resolved: #1770

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

fbshipit-source-id: f3f07617e2fb010b08e83d7d012800a884f5bd15
@meta-codesync meta-codesync Bot closed this in d70113f Jul 9, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 9, 2026
@meta-codesync

meta-codesync Bot commented Jul 9, 2026

Copy link
Copy Markdown

This pull request has been merged in d70113f.

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 This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant