Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DevTools] Check in frontend.d.ts for react-devtools-fusebox, include in build output #28970

Merged
merged 3 commits into from
May 3, 2024

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented May 2, 2024

Summary

The react-devtools-fusebox private package is used in the React Native DevTools (Fusebox) frontend by checking build artifacts into RN's fork of the Chrome DevTools (CDT) repo - see facebookexperimental/rn-chrome-devtools-frontend#22.

Currently, the CDT fork also includes a manually written TypeScript definition file which describes react-devtools-fusebox's API. This PR moves that file into the React repo, next to the implementation of react-devtools-fusebox, so we can update it atomically with changes to the package.

As this is the first bit of TypeScript in this repo, the PR adds minimal support for formatting .d.ts files with Prettier. It also opts out react-devtools-fusebox/dist/ from linting/formatting as a drive-by fix.

For now, we'll just maintain the .d.ts file manually, but we could consider leveraging flow-api-translator to auto-generate it in the future.

How did you test this change?

Build react-devtools-fusebox, observe that dist/frontend.d.ts exists.

@motiz88 motiz88 merged commit 8f7dd55 into facebook:main May 3, 2024
37 of 38 checks passed
@motiz88 motiz88 deleted the rdt-fusebox-include-d-ts branch May 3, 2024 16:32
hoxyq added a commit that referenced this pull request May 8, 2024
Full list of changes (not a public changelog):
* fix[react-devtools/ci]: fix configurations for e2e testing
([hoxyq](https://github.com/hoxyq) in
[#29016](#29016))
* feat[react-devtools]: display forget badge for components in profiling
session ([hoxyq](https://github.com/hoxyq) in
[#29014](#29014))
* fix[react-devtools]: add backwards compat with legacy element type
symbol ([hoxyq](https://github.com/hoxyq) in
[#28982](#28982))
* Expose "view source" options to Fusebox integration
([motiz88](https://github.com/motiz88) in
[#28973](#28973))
* Enable inspected element context menu in Fusebox
([motiz88](https://github.com/motiz88) in
[#28972](#28972))
* Check in `frontend.d.ts` for react-devtools-fusebox, include in build
output ([motiz88](https://github.com/motiz88) in
[#28970](#28970))
* Devtools: Fix build-for-devtools
([eps1lon](https://github.com/eps1lon) in
[#28976](#28976))
* Move useMemoCache hook to react/compiler-runtime
([kassens](https://github.com/kassens) in
[#28954](#28954))
* warn -> error for Test Renderer deprecation
([acdlite](https://github.com/acdlite) in
[#28904](#28904))
* [react-dom] move all client code to `react-dom/client`
([gnoff](https://github.com/gnoff) in
[#28271](#28271))
* Rename the react.element symbol to react.transitional.element
([sebmarkbage](https://github.com/sebmarkbage) in
[#28813](#28813))
* Rename Forget badge ([jbonta](https://github.com/jbonta) in
[#28858](#28858))
* Devtools: Add support for useFormStatus
([eps1lon](https://github.com/eps1lon) in
[#28413](#28413))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants