Commit Graph

1525 Commits

Author SHA1 Message Date
Alex Hunt fdcb94ad13 Upgrade CLI and Metro, update status check refs (#38988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38988

- Upgrade to RN CLI `12.0.0-alpha.9`, including Metro bump to `0.78.0`.
- Update test scripts, since this CLI release made a breaking change to the `/status` response.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D48311214

fbshipit-source-id: bb0be3c32edb629355b9fbbd754b28f9878f47ef
2023-08-15 02:33:22 -07:00
Alex Hunt a978d343a6 Add auto-generation of TypeScript definitions on build (#38990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38990

This PR adds auto-generation of Typescript definitions from Flow source code for packages using the shared monorepo build setup (https://github.com/facebook/react-native/pull/38718).

Today, these are the following Node.js packages:

- `packages/community-cli-plugin`
- `packages/dev-middleware` (⬅️ `emitTypeScriptDefs` enabled)

This also improves emitted Flow definitions (`.js.flow`), by using [`flow-api-translator`](https://www.npmjs.com/package/flow-api-translator) to strip implementations.

**All changes**

- Include `flow-api-translator` and configure this to emit type definitions as part of `yarn build`.
    - Add translation from Flow source to TypeScript definitions (`.d.ts`) adjacent to each built file.
    - Improve emitted Flow definitions (`.js.flow`), by using `flow-api-translator` to strip implementations (previously, source files were copied). The Flow and TS defs now mirror each other.
-  Add `emitFlowDefs` and `emitTypeScriptDefs` options to build config to configure the above.
- Integrate TypeScript compiler to perform program validation on emitted `.d.ts` files.
     - This is based on this guide: https://github.com/microsoft/TypeScript-wiki/blob/main/Using-the-Compiler-API.md#a-minimal-compiler.
- Throw an exception on the `rewritePackageExports` step if a package does not define an `"exports"` field.
- Add minimal `flow-typed` definitions for `typescript` 😄.

**Notes on [`flow-api-translator`](https://www.npmjs.com/package/flow-api-translator)**

This project is experimental but is in a more mature state than when we evaluated it earlier in 2023.
- It's now possible to run this tool on our new Node.js packages, since they are exclusively authored using `import`/`export` syntax (a requirement of the tool).
- As a safety net, we run the TypeScript compiler against the generated program, which will fail the build.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D48312463

fbshipit-source-id: 817edb35f911f52fa987946f2d8fc1a319078c9d
2023-08-14 12:12:10 -07:00
David Vacca 161d645e16 Sort scripts in package.json (#38861)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38861

I'm just sorting the scripts in package.json to make it easier to consume

changelog: [internal] internal

Reviewed By: cortinico, NickGerleman

Differential Revision: D48161535

fbshipit-source-id: 473af009b05fe8bf264975245f508926f8f8dae3
2023-08-09 11:56:44 -07:00
David Vacca ba16de1f5e Simplify testing RN Android in OSS (#38862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38862

Simplify testing RN Android in OSS

changelog: [internal] internal

Reviewed By: cortinico, NickGerleman

Differential Revision: D48161533

fbshipit-source-id: 0ded18d8a6149d2e36c327edc436d35ec35184d2
2023-08-09 11:56:44 -07:00
David Vacca 0f244a627a Simplify building RN Android in OSS (#38863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38863

I created a simple way to build RN Android using yarn:

changelog: [internal] internal

Reviewed By: cortinico, NickGerleman

Differential Revision: D48160016

fbshipit-source-id: 5157f0e717f48b32f2a6db0680c02975d9bd7a43
2023-08-09 11:56:44 -07:00
Lorenzo Sciandra c956a1bd6c chore(releases): improve bump oss script to allow less human errors (#38666)
Summary:
One of the limitations of the existing flow for the release crew is that they need to manually remember to publish all the other packages in the monorepo ahead of a new patch release - this PR modifies the logic for the bump-oss-version script (and makes it available via yarn) so that it will not run if:
* there are git changes lying around
* if some of the packages need a new release

it required a bit of refactoring to extract some portions of the logic from the bump-all-package-versions script, but I think the end result is pretty decent.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [CHANGED] - improve bump oss script to allow less human errors

Pull Request resolved: https://github.com/facebook/react-native/pull/38666

Test Plan:
* checkout this branch
* comment L54 of bump-oss-version.js (to remove the check on the branch name)
* run `yarn bump-all-updated-packages`, verify that it works and that it detects that some packages have unreleased code
* run `yarn bump-oss-version -t asd -v asd` (the "fake" parameters are needed to pass the yargs check), verify that it will throw an error because it finds a package that has unreleased code

Reviewed By: mdvacca

Differential Revision: D48156963

Pulled By: cortinico

fbshipit-source-id: 2473ad5a84578c5236c905fd9aa9a88113fe8d22
2023-08-09 00:46:14 -07:00
Moti Zilberman 408dd81fb6 Remove unused inlineRequires params from BabelTransformer API (#38771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38771

Changelog: [Internal]

Metro has been passing `inlineRequires: false` to Babel transformers for the last 5 years (D9636747), as the inline requires transform had been hoisted into the transform worker. Here we clean up the unused code paths in React Native's implementations of the Metro Babel transformer API, and the unused properties in the API itself.

Reviewed By: GijsWeterings

Differential Revision: D48034441

fbshipit-source-id: d24a793962942a3c87461ffbade847ea749dac95
2023-08-07 09:17:43 -07:00
Pieter Vanderwerff 66990248a7 Deploy 0.214.0 to xplat (#38802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38802

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D48075406

fbshipit-source-id: 1fa5c717c593ded754948ba073d9312bc9a3d2ee
2023-08-04 13:54:15 -07:00
Alex Hunt cd8f5d176a Add shared monorepo build setup (#38718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38718

> NOTE: Replaces https://github.com/facebook/react-native/pull/38240

## Context

RFC: Decoupling Flipper from React Native core: https://github.com/react-native-community/discussions-and-proposals/pull/641

## Changes

To support incoming new React Native packages around debugging (including migrating over [`react-native-community/cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) — which target Node.js and require a build step, this PR adds a minimal shared build setup across the `react-native` monorepo.

The setup is closely inspired/based on the build scripts in Jest, Metro, and React Native CLI — and is a simple set of script wrappers around Babel. These are available as build commands at the root of the repo:

- `yarn build` — Builds all configured packages. Functionally, this:
  - Outputs a `dist/` directory with built files.
  - Rewrites package.json `"exports"` to update every `./src/*` reference to `./dist/*` (source of truth).
- `scripts/build/babel-register.js` — Allows running all Node.js entry points from source, similar to the current setup in [facebook/metro](https://github.com/facebook/metro). (Example entry point file in this PR: `packages/dev-middleware/src/index.js`)

Build configuration (i.e. Babel config) is shared as a set standard across the monorepo, and **packages are opted-in to requiring a build**, configured in `scripts/build.config.js`.

```
const buildConfig /*: BuildConfig */ = {
  // The packages to include for build and their build options
  packages: {
    'dev-middleware': {target: 'node'},
  },
};
```

For now, there is a single `target: 'node'` option — this is necessary as `react-native`, unlike the above other projects, is a repository with packages targeting several runtimes. We may, in future, introduce a build step for other, non-Node, packages — which may be useful for things such as auto-generated TypeScript definitions.

 {F1043312771}

**Differences from the Metro setup**

- References (and compiles out) repo-local `scripts/build/babel-register.js` — removing need for an npm-published dependency.

## Current integration points

- **CircleCI** — `yarn build` is added to the `build_npm_package` and `find_and_publish_bumped_packages` jobs.

**New Node.js package(s) are not load bearing quite yet**: There are not yet any built packages added to the dependencies of `packages/react-native/`, so this will be further tested in a later PR (and is actively being done in an internal commit stack).

### Alternative designs

**Per-package config file**

Replace `scripts/build/config.js` with a package-defined key in in `package.json`, similar to Jest's [`publishConfig`](https://github.com/jestjs/jest/blob/1f019afdcdfc54a6664908bb45f343db4e3d0848/packages/jest-cli/package.json#L87C3-L89C4).

```
"buildConfig": {
  "type": "node"
},
```

This would be the only customisation required, with a single Babel config still standardised. Another option this might receive in future is `enableTypeScriptCodgeen`.

**Rollup**

More sophisticated build tool for Node.js, used by the React codebase (albeit within a custom script setup as well).

**Lerna and Nx**

- Most sophisticated setup enabling caching and optimised cloud runs.
- Probably the most likely thing we'll move towards at a later stage.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D47760330

fbshipit-source-id: 38ec94708ce3d9946a197d80885781e9707c5841
2023-08-03 04:42:30 -07:00
Nicola Corti 704efe590c Remove test_android_docker_image
Summary:
This job is now unnecessary and we can safely remove it as its work is effectively already
executed by the `test_android` job and is causing us just to spent more CI credits.

Changelog:
[Internal] [Changed] - Remove test_android_docker_image

Reviewed By: cipolleschi

Differential Revision: D47716008

fbshipit-source-id: 68ff2b28da8cfb69e013476f84e903cf3001d5d3
2023-08-02 03:44:50 -07:00
Dmitry Rykun d380bb8473 Move react-native-babel-transformer and react-native-babel-preset from Metro to React Native repo (#38228)
Summary:
X-link: https://github.com/facebook/metro/pull/1024

Pull Request resolved: https://github.com/facebook/react-native/pull/38228

Changelog: [General][Changed] - Move react-native-babel-transformer and react-native-babel-preset from Metro to React Native repo.

Metro Changelog:  **[Breaking]** - Remove `metro-react-native-babel-transformer` and `metro-react-native-babel-preset`, to be published as `react-native/metro-babel-transformer` and `react-native/babel-preset` instead.

This diff does the following:
- Move `metro/packages/metro-react-native-babel-preset` to `react-native/packages/react-native-babel-preset`.
- Rename `metro-react-native-babel-preset` package to `react-native/babel-preset`.
- Move `metro/packages/metro-react-native-babel-transformer` to `react-native/packages/react-native-babel-transformer`.
- Rename `metro-react-native-babel-transformer` package to `react-native/metro-babel-transformer`.
- Upadate dependencies.

Reviewed By: robhogan

Differential Revision: D46977466

fbshipit-source-id: 32478f63a0442b61a1804f12ef814c8b29d7f8bb
2023-07-27 11:48:16 -07:00
Pieter Vanderwerff 928eca82ea Update to 0.15.0 across fbsource (#38627)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38627

Upgrade hermes parser packages to the latest released versions.

Changelog is here: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D47763733

fbshipit-source-id: 773da536034a57b540649a91507b4bf278d7e815
2023-07-25 16:01:48 -07:00
szymonrybczak 28deaa3a71 Bump NDK to 25 (#37974)
Summary:
Bumps NDK to current LTS Release.

## Changelog:

[Android] [Changed] - Bump NDK to 25

Pull Request resolved: https://github.com/facebook/react-native/pull/37974

Test Plan: CI Green 

Reviewed By: christophpurrer

Differential Revision: D47754763

Pulled By: cortinico

fbshipit-source-id: 24fbca503b3814c28a05aada5223c741e14bda28
2023-07-25 09:57:30 -07:00
Sam Zhou e64756ae5b Deploy 0.213.1 to xplat (#38605)
Summary:
X-link: https://github.com/facebook/relay/pull/4391

Pull Request resolved: https://github.com/facebook/react-native/pull/38605

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D47744471

fbshipit-source-id: 8e2e2e55610020cc6b85cd73d0221bf23c4b7c3b
2023-07-24 20:15:05 -07:00
Tim Yung a7805bb20e RN: Upgrade to hermes-parser@0.14.0 (#38554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38554

@public
Upgrades React Native, Relay, and Metro to use `hermes-parser@0.14.0`.

This also changes the repository's Jest configuration to now use `hermes-parser`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D47522140

fbshipit-source-id: 207ccd0c4e4489d486731d0c847d8089abc1cc72
2023-07-24 11:30:39 -07:00
Sam Zhou fc8ad8c659 Deploy 0.213.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D47685569

fbshipit-source-id: 2563ee5268b8225c22fec4c2611d2616a6023712
2023-07-21 17:54:49 -07:00
Lorenzo Sciandra 8f4542d65c fix: remove old command for align packages versions (#38548)
Summary:
While working on a couple things, me Riccardo and Nicola noticed that in main for some reason the old `align-package-versions` command in the root package.json was still there in main branch.

This was "merged into" `bump-all-updated-packages` by hoxyq all the way back in March; here's the commit for 0.72 branch -> https://github.com/facebook/react-native/commit/a469927c16e175b637b2eaf9a84af94f2e8cb519

We are not sure why, but for some reason the same commit in main was borked in some way, and didn't actually remove the command: PR (https://github.com/facebook/react-native/pull/36568) and commit (https://github.com/facebook/react-native/commit/04df252aa7bff34a02b24f8381b3f2f1dd122c2f)

So this commit just takes care of that.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [REMOVED] - remove old command for align packages versions

Pull Request resolved: https://github.com/facebook/react-native/pull/38548

Test Plan: N/A - it's a removal

Reviewed By: cipolleschi

Differential Revision: D47669016

Pulled By: cortinico

fbshipit-source-id: aa651b69433171219dbc235d947ceed4f88b602a
2023-07-21 09:17:58 -07:00
George Zahariev ed07a1156c Deploy 0.212.0 to xplat (#38308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38308

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D47388614

fbshipit-source-id: 93d7ca2edc711b4ef43a51520ff4a80ad24bd69d
2023-07-12 22:37:31 -07:00
Sam Zhou ee425cca0d Deploy 0.211.0 to xplat (#38168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38168

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D47202522

fbshipit-source-id: a3c9fddfcdf917bb88006832cc597b31ed4a76d4
2023-07-03 20:26:57 -07:00
Panagiotis Vekris 5fd32d71e9 Upgrade hermes-* packages in xplat and arvr to 0.14.0 (#38133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38133

Upgrade hermes parser packages to the latest released versions.

Changelog is here: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D47133130

fbshipit-source-id: e1022f491feb08273fd340eb1fce7256d3a2f191
2023-06-30 11:10:35 -07:00
Panagiotis Vekris b9cf5a1c49 Deploy 0.210.1 to xplat and set type_guards=true (#38098)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38098

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D47065254

fbshipit-source-id: 77c4694d8e1b31ef4dbd60cbf30d8fa1267a2819
2023-06-27 15:33:10 -07:00
Jordan Brown 37460b06a4 Deploy 0.210.0 to xplat (#38097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38097

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D47056034

fbshipit-source-id: 3a5f387722b637ad56a7871008bd9afecb0c52c8
2023-06-27 09:14:20 -07:00
Sam Zhou d0bbf7bd13 Upgrade hermes-* packages in xplat and arvr to version 0.13.0 (#38083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38083

Upgrade hermes parser packages to the latest released versions.

Changelog is here: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md
Main differences are improved parser support for new Flow features.

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D47038363

fbshipit-source-id: 6b264e6a92f17d8107e035d657f4d8c6f02dceb7
2023-06-26 19:31:04 -07:00
Nicola Corti 9f7dddf1ac AGP to 8.0.2 (#37019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37019

This bumps the version of AGP to the latest stable.
There was a breaking change in how buildConfig are built which I had to handle.
This also requires a bump of RNGP to work correctly.
Moreover, we now required Java 17 to build Android apps (as that's a AGP requirement).

Changelog:
[Android] [Changed] - Java to 17 and AGP to 8.0.2

Reviewed By: cipolleschi

Differential Revision: D45178748

fbshipit-source-id: 0f302e1f2f2ee56bd3566202fbb5ef67c9b220db
2023-06-20 08:00:05 -07:00
Sam Zhou aaa15ed09b Deploy 0.209.0 to xplat (#37921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37921

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D46773358

fbshipit-source-id: a7ef8a44c4a55a8ad5be2bc637267c518895c1c3
2023-06-15 13:08:46 -07:00
Pieter Vanderwerff dc2037c0f1 Switch xplat prettier config to hermes plugin (#37915)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37915

Enable the `prettier-plugin-hermes-parser` in xplat. This plugin enables the use of `hermes-parser` which is significantly faster than the current flow parser prettier bundles (improves formatting time by ~50%) and also brings support for the latest Prettier 3.0.0 printing logic for JS. This upgrade is required in order to enable upcoming Flow features that add new syntax.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D46748891

fbshipit-source-id: 3775ef9afa7c04e565fa4fcf8ca5b410f49d35a1
2023-06-15 08:23:06 -07:00
Sam Goldman 1807ba6f31 Deploy Flow v0.208.1 to fbsource (#37892)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37892

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D46734451

fbshipit-source-id: 7c50c95782bc34e7f43f916fbba75fb0e5f2d09d
2023-06-14 17:00:12 -07:00
Pieter Vanderwerff 08dc0a63ce Update prettier to v2.8.8 (#37738)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37738

Upgrade Prettier to the latest stable version, 2.8.8.

Reviewed By: SamChou19815

Differential Revision: D46403769

fbshipit-source-id: 551d64db0b701a8d3f275900dd8f6324c115a3e6
2023-06-06 20:06:25 -07:00
Pieter Vanderwerff d9b3339ef8 Upgrade hermes-* packages in xplat and arvr to version 0.12.0 (#37648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37648

Upgrade hermes parser packages to the latest released versions.

Changelog is here: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md
Main differences are improved parser support for new Flow features.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D46303102

fbshipit-source-id: 4989581757df6422174b2d0ddb8fd38be94bfc89
2023-06-01 12:02:07 -07:00
Sam Zhou daf6e53ae1 Upgrade to Flow v0.207.0 (#37601)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37601

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D46225499

fbshipit-source-id: d7d444d5bd53fd4ddb97f884fa121548a7a923e1
2023-06-01 00:19:14 -07:00
Lorenzo Sciandra f10dd3f666 bump @babel/* packages (#35787)
Summary:
X-link: https://github.com/facebook/metro/pull/987

While working on https://github.com/facebook/react-native/pull/35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

Pull Request resolved: https://github.com/facebook/react-native/pull/35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 21fd43391d12722cf707c3cdbbb36f49c036359d
2023-05-18 14:05:38 -07:00
Pieter Vanderwerff 107234f1fd Deploy Flow v0.206 in fbsource (#37389)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37389

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D45756834

fbshipit-source-id: f9f03d6cfe3ff0b84f7584cb663b524d23080e4b
2023-05-12 12:02:35 -07:00
Nicola Corti 40f816d5bc Add scripts to yarn start and yarn android from root
Summary:
This adds script to better work with RN Tester from the root of the repo.
- `yarn start` is broken as of today
- `yarn android` is not working fine and I've adapter it here.

This should make easier to work with RN Tester from within the Repo.

Changelog:
[Internal] [Changed] - Add scripts to `yarn start` and `yarn android` from root

Reviewed By: mdvacca, cipolleschi

Differential Revision: D45735926

fbshipit-source-id: eaebf80b8819ee42ccb9c14b67f8945167bf05e6
2023-05-11 00:03:00 -07:00
LeoTM d2e446d98f Bump TypeScript in template from 4.8.4 to 5.0.4 (#36862)
Summary:
https://devblogs.microsoft.com/typescript/announcing-typescript-5-0

## Changelog:

[GENERAL] [CHANGED] - Bump TypeScript in template from 4.8.4 to 5.0.4 and ESLint pkgs from 8.19.0 to 8.38.0

Pull Request resolved: https://github.com/facebook/react-native/pull/36862

Test Plan: Everything builds and runs as expected

Reviewed By: cortinico

Differential Revision: D45720238

Pulled By: NickGerleman

fbshipit-source-id: d38b60110434760fdedc84ad941e0918bb986a40
2023-05-10 02:55:42 -07:00
Marshall Roch 8aa228164d upgrade to flow v0.205.1
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D45597056

fbshipit-source-id: 0dedb3f3fd6876886c5ab4a2c1731ce404fc7d57
2023-05-05 07:27:45 -07:00
Evan Yeung a690a4af6b Deploy 0.205.0 to xplat (#37172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37172

Changelog: [Internal]

Reviewed By: pieterv, panagosg7

Differential Revision: D45418091

fbshipit-source-id: c8c7b6d3467bea0d0f2e01ed61c98003a91435d4
2023-05-01 20:38:04 -07:00
Tim Yung f92d438649 RN: Remove @reactions/component Dependency (#37098)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37098

Removes `reactions/component` as a dependency.

As far as I can see, it is unused by `react-native`.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D45304937

fbshipit-source-id: de90dce8049af2a7abe7c9cb0222fb4e3b0eb866
2023-04-26 08:49:50 -07:00
Sam Goldman b4466c747a Deploy 0.204.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D45279076

fbshipit-source-id: 3f14cd7b57f3e3fb9d5ba2b9c04872a0eff0a3c3
2023-04-25 16:25:27 -07:00
Deepak Jacob 25709afc6c Bump CLI to 12.0.0-alpha.3 and Metro to 0.76.2 (#36948)
Summary:
This is follow up of Metro release 0.76.2 to Bump versions in RN.

Metro version: 0.76.2
Metro release notes: https://github.com/facebook/metro/releases/tag/v0.76.2
CLI Bump PR: https://github.com/react-native-community/cli/pull/1910
CLI npm version: 12.0.0-alpha.3

Took changelog and testplan from https://github.com/facebook/react-native/pull/36793

## Changelog:

[General][Fixed] - Bump CLI to 12.0.0-alpha.3 and Metro to 0.76.2

Pull Request resolved: https://github.com/facebook/react-native/pull/36948

Test Plan: CircleCI

Reviewed By: huntie

Differential Revision: D45081058

Pulled By: jacdebug

fbshipit-source-id: 4c7b1004668ac30045577da54311bcab1a905ca9
2023-04-18 13:21:23 -07:00
Nicola Corti 749588313e Bump react-native-android docker container to 8.0 (#36954)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36954

This bumps the docker container we use to the latest major.

Changelog:
[Internal] [Changed] - Bump react-native-android docker container to 8.0

Reviewed By: cipolleschi

Differential Revision: D45083111

fbshipit-source-id: 44285e3e9af9be352c23bb1066fed3c35f51fb29
2023-04-18 06:58:00 -07:00
Marshall Roch 4e97283983 Upgrade to Flow v0.204.0 (#36928)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36928

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D45022693

fbshipit-source-id: 1cc543d49139990b75f3a5f9326f53d3ddb2b6a5
2023-04-17 11:18:28 -07:00
Ruslan Lesiutin 8a18b53bcd bump packages for 0.73 (#36556)
Summary:
Changelog: [Internal]

Publishing to check CI if bumping and aligning in the same commit will work, since these new versions are not available on npm yet, but maybe our new monorepo setup will resolve this

**Adding back `react-native/virtualized-lists` as a workspace to `xplat/js` so that it won't be resolved from npm**

#publish-packages-to-npm

Pull Request resolved: https://github.com/facebook/react-native/pull/36556

Reviewed By: cipolleschi

Differential Revision: D44255353

Pulled By: hoxyq

fbshipit-source-id: 21372487d6e9c0b2382b7cd9af835beed46b8ce1
2023-03-30 15:55:58 -07:00
Pieter Vanderwerff 367faa2282 Deploy v0.203.0 to xplat (#36727)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36727

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D44526612

fbshipit-source-id: 492a19a2186417d4562291ed9e7f0f18c0799a2c
2023-03-30 12:38:57 -07:00
Alex Hunt c5a47abaf8 Bump RN CLI, add @react-native/metro-config to template (#36623)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36623

Changelog:
[General][Changed] - The default `metro.config.js` in apps now extends `react-native/metro-config`, and should be updated in existing apps.

~~`react-native/rn-get-polyfills.js` is removed and should be updated to `react-native/js-polyfills` in existing apps (this is part of the new default config).~~

#publish-packages-to-npm

## Context

### React Native Metro config → React Native repo (https://github.com/facebook/react-native/pull/36502)

We (the React Native team) are aiming to relocate the default Metro config for React Native out of `react-native-community/cli-plugin-metro` and **into the React Native repo + app template** as a new `react-native/metro-config` package.

This is the first (and minimum viable) phase we can ship to separate the release process of Metro from RN CLI in order to reduce coupling and iterate faster for our users.

**See full motivation, design, and test plan (which previewed the CLI bump) here: https://github.com/facebook/react-native/pull/36502**

## Changes

NOTE: This PR is pending the inclusion of a bump to `react-native-community/cli`, and will be sequenced after https://github.com/react-native-community/cli/pull/1875 is merged.

- Upgrade `react-native-community/cli` to `11.0.0`, upgrade all `metro` packages to `0.76.0` (version distributed in this CLI release).
- Update the `metro.config.js` file in `packages/react-native/template/`.
    - Now merges defaults from `react-native/metro-config`, and can be used with CLI >= 11.0.0.
- Update the `metro.config.js` files for `packages/react-native/` and `packages/rn-tester/` (these are integration test locations).
    - Now merges defaults from `react-native/metro-config`, and can be used with CLI >= 11.0.0.

Changes to `react-native/metro-config` — `0.72.1` (prepared but not depended on yet):

- Export `mergeConfig` util (removing direct `metro-config` dependency in consuming projects).
- Explicitly depend on `metro-react-native-babel-transformer` and `metro-runtime` (transitively included today).

Reviewed By: cortinico, blakef

Differential Revision: D44099691

fbshipit-source-id: 405635dd69fd50a1e9548279eaeda3c932b5b167
2023-03-30 07:30:54 -07:00
Ruslan Lesiutin 04df252aa7 RN [refactor]: bump and realign package versions by running a single script (#36568)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36568

Changelog: [Internal]

Okay, so before the monorepo migration we had to use two scripts separately:
1. Bumping every package with `npm run bump-all-updated-packages`
2. Aligning other packages versions with `npm run align-package-versions`

The reason for it is that *before the monorepo* in a release branch cutoff process we had a step, which was removing `workspaces` keyword from `react-native` package. Without this keyword all new versions of packages will be resolved from npm (where they will be not available yet, because we have to publish them prior to it)

This is not the case for our current setup, and we can actually bump packages versions and they will be resolved as a workspaces successfully

Reviewed By: cortinico, cipolleschi

Differential Revision: D44261057

fbshipit-source-id: 31c2157be2d3b33bc073651d6045efcef2e8f5c5
2023-03-27 07:31:45 -07:00
Marshall Roch ef4ae329d3 Upgrade to Flow v0.202.1
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D44378590

fbshipit-source-id: 604a7c2cabfa8e8f703d5d827b44a758d408401a
2023-03-24 16:17:05 -07:00
Dmitry Rykun 7b86e3aaef Remove unused js_coverage job from CircleCI (#36513)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36513

We don't use JS test coverage badge on GitHub. Collecting this information is performed by `coveralls` package that is unmaintained for at least 2 years. Also it depends on `request` package that has security vulnerabilities, and became deprecated in 2020.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D44168060

fbshipit-source-id: f76ae28f42b65e320a71dc227b2d07274a96f24e
2023-03-21 11:06:24 -07:00
Ruslan Lesiutin dacb1593de RN: add @react-native/tester as a workspace to xplat/js/public (#36531)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36531

Changelog: [Internal]

In order to make `react-native/tester` imports work, adding this package to `xplat/js/public`

Also moving devDependecies from `react-native/tester/package.json` to root package json to avoid checking in dev dependencies in `xplat/js/public/node_modules`

Reviewed By: cortinico

Differential Revision: D44030539

fbshipit-source-id: b06e49869cdad6e511b1675d1063a1ceac56e3e6
2023-03-20 07:05:52 -07:00
Rob Hogan a0fa3c736e Move Jest preprocessor up to workspace root, remove public metro-react-native-babel-transformer dep (#36523)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36523

`jest/private/preprocessor.js` is only used to run tests on the workspace itself, it's not part of our exported Jest preset and is specifically excluded from publication in the `react-native` package.

Now that we have the monorepo setup, this belongs at the workspace root.

 - `metro-react-native-babel-transformer` moved from RN `dependencies` to root `devDependencies` because it's only used by the preprocessor
 - `jest/create-cache-key-function` added to `devDependencies` - it's also used by the `assetTransformer` in the public preset.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D44197879

fbshipit-source-id: 0bbd9e2f500f53fa4f16562f05374dc601b67df6
2023-03-20 05:44:34 -07:00
Evan Yeung cd048d4abf Deploy 0.202.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D44155581

fbshipit-source-id: 358df8c40395812216afef1c99f93c576a425b11
2023-03-17 15:46:25 -07:00