From 6558efd86794de0076bea799b104d7c659cecd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= Date: Mon, 30 Jun 2025 16:58:09 +0200 Subject: [PATCH 1/2] add build-types to how-to-contribute-code page --- website/contributing/how-to-contribute-code.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/website/contributing/how-to-contribute-code.md b/website/contributing/how-to-contribute-code.md index ae67d4d937d..7dab5e3ea28 100644 --- a/website/contributing/how-to-contribute-code.md +++ b/website/contributing/how-to-contribute-code.md @@ -32,6 +32,7 @@ Now you are set up to run several commands: - `yarn test-ios` runs the iOS test suite (macOS required). - `yarn build` builds all configured packages — in general, this command only needs to be run by CI ahead of publishing. - Packages which require a build are configured in [scripts/build/config.js](https://github.com/facebook/react-native/blob/main/scripts/build/config.js). +- `yarn build-types` builds the TS types for the public API and generates the snapshot. ## Testing your Changes @@ -70,11 +71,12 @@ Code-level contributions to React Native generally come in the form of [a pull r 3. If you've changed APIs, update the documentation. 4. Ensure the test suite passes, either locally or on CI once you opened a pull request. 5. Make sure your code lints (for example via `yarn lint --fix`). -6. Push the changes to your fork. -7. Create a pull request to the React Native repository. -8. Review and address comments on your pull request. -9. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code. -10. If you haven't already, submit the [Contributor License Agreement ("CLA")](#contributor-license-agreement). +6. Verify if your code modifies the JS public API with `yarn build-types --validate`. If so, regenerate the snapshot using `yarn build-types`. +7. Push the changes to your fork. +8. Create a pull request to the React Native repository. +9. Review and address comments on your pull request. +10. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code. +11. If you haven't already, submit the [Contributor License Agreement ("CLA")](#contributor-license-agreement). If all goes well, your pull request will be merged. If it is not merged, maintainers will do their best to explain their reasoning. From f71bbea0d0d33e8e4acd04afdd54aa5a7ba62296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= Date: Mon, 30 Jun 2025 17:06:37 +0200 Subject: [PATCH 2/2] change build-types desc --- website/contributing/how-to-contribute-code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/contributing/how-to-contribute-code.md b/website/contributing/how-to-contribute-code.md index 7dab5e3ea28..1bcd51a35c2 100644 --- a/website/contributing/how-to-contribute-code.md +++ b/website/contributing/how-to-contribute-code.md @@ -32,7 +32,7 @@ Now you are set up to run several commands: - `yarn test-ios` runs the iOS test suite (macOS required). - `yarn build` builds all configured packages — in general, this command only needs to be run by CI ahead of publishing. - Packages which require a build are configured in [scripts/build/config.js](https://github.com/facebook/react-native/blob/main/scripts/build/config.js). -- `yarn build-types` builds the TS types for the public API and generates the snapshot. +- `yarn build-types` generates TypeScript types for the public API and updates the snapshot. ## Testing your Changes