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

feat: add react-devtools-fusebox as third party dependency #22

Conversation

hoxyq
Copy link

@hoxyq hoxyq commented Mar 14, 2024

Summary

Adding react-devtools-fusebox build artifacts as a third-party dependency to the repo.

Right now, there is no automation for updating this dependency, will add it later.

Test plan

This dependency will be used in #23, where the feature should work end-to-end.

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

@hoxyq hoxyq force-pushed the react-devtools/add-third-party-react-devtools-dependency branch 2 times, most recently from 8b16523 to 794fd30 Compare April 11, 2024 17:24
@hoxyq hoxyq force-pushed the react-devtools/add-third-party-react-devtools-dependency branch from 794fd30 to 9780c22 Compare April 15, 2024 07:57
@hoxyq hoxyq changed the title [WIP] feat: add react-devtools-fusebox as third party dependency feat: add react-devtools-fusebox as third party dependency Apr 15, 2024
@hoxyq hoxyq marked this pull request as ready for review April 15, 2024 07:59
@hoxyq hoxyq merged commit 7361921 into facebookexperimental:main Apr 15, 2024
3 checks passed
@hoxyq hoxyq deleted the react-devtools/add-third-party-react-devtools-dependency branch April 15, 2024 09:15
motiz88 added a commit to facebook/react that referenced this pull request May 3, 2024
…de in build output (#28970)

## Summary

The `react-devtools-fusebox` private package is used in the React Native
DevTools (Fusebox) frontend by checking build artifacts into RN's
[fork]([`facebookexperimental/rn-chrome-devtools-frontend`](https://github.com/facebookexperimental/rn-chrome-devtools-frontend))
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](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/blob/1d5f8d5209ac49de97aec16732169d47bf525474/front_end/third_party/react-devtools/package/frontend.d.ts)
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`](https://www.npmjs.com/package/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.
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