Skip to content

Align OSS Flow config with lib.dom.d.ts - #1989

Merged
vzaidman merged 1 commit into
mainfrom
vzaidman/flow-alignment-oss
Sep 28, 2026
Merged

vzaidman merged 1 commit into
mainfrom
vzaidman/flow-alignment-oss

Conversation

@vzaidman

Copy link
Copy Markdown
Contributor

Follow-up to #1965: internal and OSS Flow disagreed on DOM builtins, so suppressions removed there were unused in OSS but needed once the DOM lib is provided by Flow itself.

  • .flowconfig: builtin_lib=flowlib-with-lib-dom-d-ts
  • Delete copied DOM libdefs flow-typed/environment/{bom,dom,cssom,serviceworkers,streams}.js
  • flow-typed/environment/node.js: use globalThis.Blob; drop an unused suppression
  • Restore suppressions needed under lib.dom.d.ts Console (index-test.js, resolver-test.js, logToConsole.js) and drop ones now unused
  • HMRClient-test.js: mock WebSocket via jest.spyOn(global, "WebSocket", "get") instead of writing the readonly global

Test plan:

  • flow check shows no new errors and no new unused suppressions in metro files
  • yarn jest packages/metro-runtime/src/modules/__tests__/HMRClient-test.js passes

Internal and OSS Flow disagreed on DOM builtins, so suppressions removed in #1965 were unused in OSS but needed internally.

- .flowconfig: builtin_lib=flowlib-with-lib-dom-d-ts
- Delete copied DOM libdefs flow-typed/environment/{bom,dom,cssom,serviceworkers,streams}.js
- flow-typed/environment/node.js: use globalThis.Blob; drop an unused suppression
- Restore suppressions needed under lib.dom.d.ts Console (index-test.js, resolver-test.js, logToConsole.js) and drop ones now unused
- HMRClient-test.js: mock WebSocket via jest.spyOn(global, 'WebSocket', 'get') instead of writing the readonly global
@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 Sep 28, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Sep 28, 2026
@vzaidman

vzaidman commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

@SamChou19815 let me know if there's some problem landing it and we can revert it.

@vzaidman
vzaidman merged commit ca7abd9 into main Sep 28, 2026
15 checks passed
@vzaidman
vzaidman deleted the vzaidman/flow-alignment-oss branch September 28, 2026 14:26
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants