react / react/react-strict-dom
[Chore] Simplify the generation of the type definition files
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.6k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
React Strict DOM has a single file for Flow type definitions and a single file for TS type definitions.
The build step for this is fairly complex, however:
- We transform the entire folder of source files to individual
.js.flowand.d.tsfiles usingflow-api-translator. - We then use a script to concatenate all the type files into a single file
- We then delete the folder
The script that concatenates the types from all the files is brittle and can break if we accidentally use the same type name in different files.
We should be able to simplify this process by using this Rollup-like bundler that understands Flow syntax.
We will need to wait for this bundler to be migrated to the hermes repo and open-sourced as a standalone package.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
First check whether the referenced flow-bundler has been migrated to the hermes repo and released as a standalone package. Then compare its possible use with the current flow-api-translator, concatenation script, and folder-deletion build steps. Done means the generated Flow and TypeScript definitions remain correct without the brittle concatenation process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100