Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41219
Bump to the latest Metro release. This includes minor breaking changes to Metro subpackages that should *not* be visible to RN users.
Metro release notes: https://github.com/facebook/metro/releases/tag/v0.80.0
## Moving to unpinned versioning
Metro is a multi-package project, and not pinning to an exact version means multiple versions of `metro*` packages may appear in an RN project.
This isn't unusual in the NPM ecosystem and *shouldn't* be a problem, but historically has caused issues (eg https://github.com/facebook/react-native/issues/34714, https://github.com/facebook/metro/issues/1017). The root cause of all of these issues, as far as we know, was fixed in 6d46078e74, a bug where Node hierarchical resolution was effectively sidestepped via a relative worker path, resulting in a mismatch between transformer and host process.
In addition, the fact that `react-refresh`, `metro-react-native-babel-transformer` and `metro-react-native-babel-preset` are now fully moved into the `react-native/` scope and versioned with React Native means there are no circular dependencies between React Native and Metro, explicit or implicit, and we're much more clearly decoupled.
So, we're moving to caret versioning to allow React Native users to pick up Metro fixes and features without requiring React Native releases and user upgrades.
Changelog:
[General][Changed] - Update Metro to ^v0.80.0, stop pinning to an exact version
Reviewed By: GijsWeterings
Differential Revision: D50731999
fbshipit-source-id: 57b07bf73c0b31f392c4d36376ca48b48a8bd598
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41067
Bump `hermes-parser` packages to the latest released version.
Changelog: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md
Notable changes:
- Added parsing support for `as` expressions as well as `renders*` and renders?`.
- Updated internal prettier version to `3.0.3`.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D50395762
fbshipit-source-id: 8a9131ea1b0683e79c7bc74b4df9deafac7450f9
Summary:
When upgrading ESLint to latest, the RN plugin fails to run because of a deprecated API:
```
Error: Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
```
## Changelog:
- [GENERAL] [FIXED] Updated ESLint version to fix `originalKeywordKind` deprecation error
<!-- 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
Pull Request resolved: https://github.com/facebook/react-native/pull/39654
Test Plan: Run CI and Lint
Reviewed By: NickGerleman
Differential Revision: D49634978
Pulled By: robhogan
fbshipit-source-id: f65f0d56053acf1c877fe0f368a7f4e13c8c57d1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39819
Bump `hermes-parser` packages to the latest released version.
Changelog: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md
Notable changes:
- Upgraded to the lastest version of emscripten for the parser.
- The babel interop logic now more closely matches babel's AST.
- The biggest change is we now add the `extra.raw` properties to literal nodes, which results in Babel more closely outputting literal sources. e.g. previously the following would happen `1.0` -> `1`, `'foo'` -> `"foo"` and `1n` -> `1` but now the raw source value is preserved.
- Upgraded `prettier-plugin-hermes-parser` to use the latest prettier formatting logic, which causes some minor formatting changes.
- `hermes-parser` no longer fails when the `component` name is used within a function type, e.g. `type Foo = (component: string) => void`.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D49935231
fbshipit-source-id: a905838396fdd7281442c211970e0caa773a1256
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39791
Bump `hermes-parser` packages to the latest released version.
Changelog: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md
Notable changes:
- Upgraded to the lastest version of emscripten for the parser.
- The babel interop logic now more closely matches babel's AST.
- The biggest change is we now add the `extra.raw` properties to literal nodes, which results in Babel more closely outputting literal sources. e.g. previously the following would happen `1.0` -> `1`, `'foo'` -> `"foo"` and `1n` -> `1` but now the raw source value is preserved.
- Upgraded `prettier-plugin-hermes-parser` to use the latest prettier formatting logic, which causes some minor formatting changes.
- `hermes-parser` no longer fails when the `component` name is used within a function type, e.g. `type Foo = (component: string) => void`.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D49838842
fbshipit-source-id: ebfd2f89852d1bd3b1671ce77f58240d7e17cfbb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39273
Upgrade Metro dependencies to 0.79.1 in `react-native`
This includes Metro breaking changes for disabling global package resolution by default and adds features like: Haste packages, enable resolution through symlinks and passing custom customTransformOptions and customResolverOptions to bundle_build_started log event so as to refine the bundling message. It also fixes arbitrary transformation of Babel plugins during registration in `metro-babel-register` and fixes "unexpected null" crash when handling a batch of file changes and symlinks with indirections.
**Full Metro Changelog:** https://github.com/facebook/metro/releases/tag/v0.79.1https://github.com/facebook/metro/releases/tag/v0.79.0
Changelog:
[General][Changed] Upgraded Metro to 0.79.1
Reviewed By: motiz88, mdvacca
Differential Revision: D48922815
fbshipit-source-id: 37aea6194fe587e0d094c96ceec1122c588f0fbb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39161
Changelog: [Internal]
Creates a new stub package named `react-native/debugger-frontend`, which will contain a minimal build of the Chrome DevTools frontend adapted for React Native. Initially, the compiled frontend assets will be checked into the React Native repo, but we intend to replace this with a fully automated build in CI at a later date.
Reviewed By: huntie
Differential Revision: D48680624
fbshipit-source-id: a24c8b019881187963d0be88e773bc0a97a2437d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39158
.flowconfig.android is the same as .flowconfig now. The check is meaningless. This diff removes it and the flowconfig.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D48629137
fbshipit-source-id: bc1bee9426eed7bc41dc7a1efe75333e1191e066
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39096
## React Native
Changelog:
[General][Changed]: Bump Jest version in the new project template from `^29.2.1` to `^29.6.3`
## Metro
[Internal]
Reviewed By: motiz88
Differential Revision: D48519694
fbshipit-source-id: 201f76402ac72da1f5c297a29a1212b167d1b7e4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39064
Creates a new lint rule that enforces the following constraints:
- `react-native/monorepo` cannot have `dependencies`.
- `react-native` cannot have `devDependencies`.
This also includes a lengthy comment in the rule definition explaining why these constraints exist, so that future contributors can make an informed decision when reconsidering these constraints.
Changelog:
[Internal]
Reviewed By: NickGerleman
Differential Revision: D48448633
fbshipit-source-id: 26b0d74b9120ddfd2a6a72bb91f86a98c8d679ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39012
Upgrades many of our projects to `v8-compile-cache@^2.4.0`, which includes [zertosh/v8-compile-cache#45](https://github.com/zertosh/v8-compile-cache/pull/45). This fixes a very opaque segmentation fault when `v8-compile-cache` is used on Apple Silicon with mixed architecture modes.
This also upgrades our projects to `eslint@^2.3.1`, which no longer has the dependency on an outdated version of `v8-compile-cache`.
Changelog:
[Internal]
Reviewed By: zertosh, NickGerleman
Differential Revision: D48336030
fbshipit-source-id: afa73d1f00bff826a8b76fa09949b9d35a97905b
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
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
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
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
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
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
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`](1f019afdcd/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
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
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
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
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 -> a469927c16
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 (04df252aa7)
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36335
This change depends on [this PR](https://github.com/react-native-community/cli/pull/1849) of the CLI that introduces the `unstable_reactLegacyComponent` field in the `react-native.config.js` file.
This change introduce a JS script that reads that fields and generated a method in an object to return a list of components to be registered. The `RCTAppDelegate` has been updated to read those components and to automatically register them into the interop layer.
Notice that a user can just update the `react-native.config.js` and rebuild the app to integrate these changes, there is no need to reinstall the pods.
The idea behind this logic is to let the user know which components they are using with the interop layer, rather than rely on some black magic that could leave them blind to the need of actually migrate their apps.
## Changelog:
[iOS][Changed] - Implement mechanism to register legacy components in the iOS Fabric interop layer
Reviewed By: cortinico, dmytrorykun
Differential Revision: D43665973
fbshipit-source-id: b4e8d71fa1bbed7a6130ee4f83a6221394d5306e
Summary:
This bumps all the usages of the packages in the monorepo to the latest published.
## Changelog
[INTERNAL] - Bump all the usages of published packages
Pull Request resolved: https://github.com/facebook/react-native/pull/36356
Test Plan: n/a
Reviewed By: jacdebug
Differential Revision: D43735714
Pulled By: cortinico
fbshipit-source-id: 746af2a2f34e65e1093d0670cd79dae5484f21c2
Summary:
Ahead of cut of RN 0.72, I'm upgrading CLI and Metro according to https://github.com/react-native-community/cli/releases/tag/v11.0.0-alpha.2
~While working on it, I noticed that run-ios has some changes that make the e2e test script not work super well, so I'll be checking in with the CLI team to figure out what's wrong. Let's not merge it until that's address it. (also, there's already a bump for Metro that we need 8d18baef55 so I'll probably change the version to latest CLI and Metro once more)~ (all addressed)
## 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
-->
[GENERAL] [CHANGED] - bump CLI to 11 alphav2 and metro to 0.75.1
Pull Request resolved: https://github.com/facebook/react-native/pull/36271
Test Plan: Test CI, and locally I've used the e2e test script to ensure everything still works.
Reviewed By: NickGerleman
Differential Revision: D43625952
Pulled By: cipolleschi
fbshipit-source-id: dad940b65c56a586ae82acc2e7c16a918b872ee5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36217
## Bump minimum Node JS version to 16 via `react-native/package.json#engines`
In https://github.com/facebook/react-native/pull/35443 we stopped running CI in Node 14 - this follows up by formally making Node 16 the minimum supported version ahead of the 0.72 cut.
Node 14 [ends maintenance releases in April](https://github.com/nodejs/release#release-schedule), and bumping this minimum will allow other associated Node JS tools (CLI, Metro, Jest) to reduce their support burden.
## Insert `engines` into `template/package.json`
The constraint at `react-native/package.json#engines` ensures the minimum at install/init time, with package managers providing an actionable error or warning if the constraint is not met. However, it doesn't help guide users to a supported version if on an existing project they run (e.g.) `yarn start`.
Adding a constraint to the template helps prevent accidental use of an older version, as well as providing a clear reference for the current minimum.
Insertion of `engines` below existing `package.json` fields is consistent with [`sort-package-json`](https://github.com/keithamus/sort-package-json/blob/main/defaultRules.md) and [`prettier-package-json`](https://github.com/cameronhunter/prettier-package-json/blob/main/src/defaultOptions.ts) - and keeps it out of the way of fields RN developers are likely to be more concerned about.
## Docs PR
https://github.com/facebook/react-native-website/pull/3580
## Changelog:
[General][Breaking] Bump minimum Node JS version to 16
Reviewed By: jacdebug
Differential Revision: D43436883
fbshipit-source-id: 0b369487fe44fe777e6fedc2299973a5fddd06b2
Summary:
This updates all the package usages after the recent bump on main.
## Changelog
[INTERNAL] - Update all package usage on main after a bump
Pull Request resolved: https://github.com/facebook/react-native/pull/36200
Test Plan: Relying on CI
Reviewed By: hoxyq
Differential Revision: D43397084
Pulled By: cortinico
fbshipit-source-id: 06a13772a627f812d7d39931f32071fa3eaa59f9
Summary:
We do have a lot of changes on `main` to ship to nightlies. This change bump all the packages with pending changes.
## Changelog
[INTERNAL] [CHANGED] - [ci][monorepo] bump package versions
Pull Request resolved: https://github.com/facebook/react-native/pull/36184
Test Plan: Will rely on CI run.
Reviewed By: hoxyq
Differential Revision: D43363981
Pulled By: cortinico
fbshipit-source-id: eba5152dbe007eb3fad43f9088d145b3741fd94e
Summary:
This page is not up to date anymore:
https://reactnative.dev/contributing/how-to-build-from-source
I'm pushing those changes to make it easier to consume our build when building from source.
I'll update the page those change lands.
## Changelog
[Internal] [Changed] - Make it easier for users to build from source if needed
Pull Request resolved: https://github.com/facebook/react-native/pull/36165
Test Plan: If the CI is green, we should be good to merge this
Reviewed By: cipolleschi
Differential Revision: D43303867
Pulled By: cortinico
fbshipit-source-id: c0080b06cbcbf872ee92fcfa82a9f823d5b247f4
Summary:
This diff upgrade dependencies to `react-devtools-core` to 4.27.2, which includes changes I need to unblock trace update highlights.
- Update package.json file for dependencies in all existing deps with latest version (4.26.1): https://fburl.com/code/litgze0m
- Run `yarn` under `xplat/js` and `xplat/js/public`
Changelog:
[General][Internal] - Upgrade react-devtools-core to 4.27.2
Reviewed By: javache
Differential Revision: D43176345
fbshipit-source-id: 8bd5a9eca286bbfbb1630cb92c15f9653fa3534a
Summary:
the current jsc-android is still built based on ndk r21, and react-native is now built based on ndk r23. the unwinder between r21 and r23 is incompatible (libgcc vs libunwind). if there's exceptions throwing from jsc, other react native libraries cannot catch these exceptions and cause runtime crash.
this pr updates jsc-android to 235231.0.0 which is the same webkitgtk version as 235230.2.1 but only built by ndk r23. the jsc-android pr is from https://github.com/react-native-community/jsc-android-buildscripts/pull/179. note that the jsc is based on ndk r23c and react-native is based on ndk r23b. the reason is that i cannot get jsc building successfully on r23b. hopefully r23b and r23c are abi safe.
there is another crash from libjscexecutor when testing the new jsc-android. to fix the issue, i have to explicitly link libunwind.a from libjscexecutor.so. supposedly ndk r23 should help to link libunwind under the hood, i still not figure out why it doesn't. but after linking libunwind.a, i can get new jsc-android work successfully.
```
E/art ( 2669): dlopen("/data/app/com.test-1/lib/x86_64/libjscexecutor.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): at java.lang.Runtime.load(Runtime.java:331)
W/System.err( 2669): at java.lang.System.load(System.java:982)
W/System.err( 2669): at com.facebook.soloader.SoLoader$1.load(SoLoader.java:558)
W/System.err( 2669): at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:110)
W/System.err( 2669): at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:63)
W/System.err( 2669): at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:91)
W/System.err( 2669): at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1067)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
W/System.err( 2669): at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
W/System.err( 2669): at com.facebook.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:20)
W/System.err( 2669): at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:363)
W/System.err( 2669): at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:316)
W/System.err( 2669): at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94)
W/System.err( 2669): at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
W/System.err( 2669): at com.test.MainApplication.onCreate(MainApplication.java:60)
W/System.err( 2669): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
W/System.err( 2669): at androidx.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:483)
W/System.err( 2669): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
W/System.err( 2669): at android.app.ActivityThread.access$1500(ActivityThread.java:144)
W/System.err( 2669): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
W/System.err( 2669): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 2669): at android.os.Looper.loop(Looper.java:135)
W/System.err( 2669): at android.app.ActivityThread.main(ActivityThread.java:5221)
W/System.err( 2669): at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 2669): at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err( 2669): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
W/System.err( 2669): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
```
fixes https://github.com/facebook/react-native/issues/36052
## Changelog
[ANDROID][FIXED] - Fixed jscexecutor crash on Android which is caused from NDK incompatibility
Pull Request resolved: https://github.com/facebook/react-native/pull/36062
Test Plan: tested on [jsc-android instrumented test](https://github.com/react-native-community/jsc-android-buildscripts/tree/2.26.1/test) (based on react-native 0.71.2)
Reviewed By: cipolleschi
Differential Revision: D43040295
Pulled By: cortinico
fbshipit-source-id: e0e5b8fb7faa8ee5654d4cde5f274bef4b517376
Summary:
Yesterday CircleCI was extremely flaky due to us trying to `apt install` extra packages. This mitigates one scenario where we try to redownload `jq` and `shellcheck`.
I've moved to use a container which contains those packages already
## Changelog
[INTERNAL] - Reduce flakyness by not downloading extra packages
Pull Request resolved: https://github.com/facebook/react-native/pull/36077
Test Plan: Will wait for a green CI
Reviewed By: cipolleschi
Differential Revision: D43080349
Pulled By: cortinico
fbshipit-source-id: 6527c5ad129f47d8b5f02bf207e1af67a095afa1
Summary:
This change re-applies D41745930 (2e3dbe9c2f) (and D42805202 (1479b2ac26) which was also partially reverted), re-registers additions as moves, then applies D43063551 which has been added to the changes since migration.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D43068114
fbshipit-source-id: 72997700bf9962d82a988599481e255b69e68a9b
Summary:
This change reverts D41745930 (2e3dbe9c2f) as part of a stack to splice back source history which was lost (Git registered the file moves as additions).
It is expected this diff will individually fail. The entire stack should be applied at once.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D43068113
fbshipit-source-id: c8398629fe5dcc1ca4bf02f550adc00c78a8487a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35857
It seems like there is an incompatibility between NDK 23 (shipped in 0.71)
and the usage of custom `CMAKE_BUILD_TYPE` we do for Hermes.
Specifically the `-DCMAKE_BUILD_TYPE=Release` we specify for the debug
variant of Hermes is partially ignored by the new Android native build toolchain.
See https://github.com/android/ndk/issues/463 for mentions on how the
toolchains requires CMake 3.20+
As AGP 7.3 defaults to use CMake 3.18 unless specified, and NDK 23 unless specified.
AGP 7.4 defaults to use CMake 3.22 unless specified, and NDK 23 unless specified.
See: https://developer.android.com/studio/releases/gradle-plugin#7-4-0
Here I'm:
1. Bumping the docker image to an image that contains the CMake 3.22
2. Updating the logic for building `react-native` & `hermes-engine` to use 3.22
3. Provide fallbacks if the user specified `CMAKE_VERSION`
Template tests will run on AGP 7.3 and will still use CMake 3.18, but I forecast
no problem there as the user is not supposed to specify custom `CMAKE_BUILD_TYPE`.
This is only a problem as we build `hermes-engine` with custom build types.
Changelog:
[Android] [Fixed] - Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE
Reviewed By: cipolleschi
Differential Revision: D42544864
fbshipit-source-id: efd0f51120370fb808337c201df31d71f4ddfdbc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35767
Changelog: [Internal]
Introducing a script, which can be used to identify all packages inside `/packages`, which contain any changes after the last time its version was changed
How it works step by step:
```
check that no git changes are present
for each package:
if package is private -> skip
grep id of the last commit that changed package
grep id of the last commit that changed version of the package
if these ids are different:
bump package patch version
commit changes if required
```
Can be executed only in git environment and by running: `node ./scripts/bump-all-updated-packages`
---
Also adding a separate script `align-package-versions.js`, which can be used to update versions of packages inside consumer packages
```
check that no git changes are present
for each package x:
for each package y:
if y has x as dependency:
validate that y uses the latest version of x
if some changes were made:
run yarn
```
---
Q: Why `run_yarn` step was removed from CircleCI flow?
A: For *-stable branches, there are no yarn workspaces and all packages are specified as direct dependencies, so if we update `react-native/assets-registry` to the next version, we won't be able to run `yarn` for react-native root package, because updated version is not yet published to npm
To avoid this, we first need publish new versions and then update them in consumer packages
---
The final flow:
1. Developer uses `node ./scripts/bump-all-updated-packages` to bump versions of all updated packages.
2. Commit created from step 1 being merged or directly pushed to `main` or `*-stable` branches
3. A workflow from CircleCI publishes all updated versions to npm
4. Developer can use `align-package-versions.js` script to create required changes to align all packages versions
Reviewed By: cortinico
Differential Revision: D42295344
fbshipit-source-id: 54b667adb3ee5f28d19ee9c7991570451549aac2
Summary:
Upgrades `react-native` to `deprecated-react-native-prop-types@4.0.0`, which depends on `react-native/normalize-colors` instead of `react-native/normalize-color` and improves compatibility with React Native 0.72.
Changelog:
[General][Changed] Upgraded to `deprecated-react-native-prop-types@4.0.0` - https://github.com/facebook/react-native-deprecated-modules/blob/main/deprecated-react-native-prop-types/CHANGELOG.md
Reviewed By: cortinico
Differential Revision: D42088315
fbshipit-source-id: d1197e9a7d70654f601b421231b66bd760098ddf
Summary:
This fixes some style errors found by dtslint, along with some test cases for StyleSheet.compose() where the recent change made it slightly too permissive when explicit return types are given. I also added runs of the TS tests to a script which runs in sandcastle so we can catch this at diff-submission time in the future.
Changelog:
[General][Fixed] - Fix Errors with TypeScript Tests
Reviewed By: lunaleaps
Differential Revision: D42085257
fbshipit-source-id: 7e6ca49d3c3aef822c61c97ecc07b55b0a949d51
Summary:
Nightlies are currently broken on main. That's because nightlies rely on packages that got
re-scoped under `react-native`. We need to publish them to NPM.
In order to do so, I'm bumping versions for the one that have changes on main so that they
can be published to NPM to unblock nightlies.
Changelog:
[Internal] [Changed] - Bump all the react-native/ packages to publish on main
Reviewed By: hoxyq
Differential Revision: D41840985
fbshipit-source-id: 45b691611e33668df0922d4ff753738a773f162c
Summary:
Small PR with bump to the new versions of CLI and Metro in preparation of the stable release for 0.71.
## Changelog
[General] [Changed] - Bump CLI to 10.0.0 and Metro to 0.73.5
Pull Request resolved: https://github.com/facebook/react-native/pull/35580
Test Plan: CI green
Reviewed By: cortinico
Differential Revision: D41800580
Pulled By: jacdebug
fbshipit-source-id: 7bf81308eb41490b004e685b1763574bfd3b27fb
Summary:
Changelog:
[General][Changed] - renamed react-native/polyfills -> react-native/js-polyfills and align with other packages versions (0.72.0) as a part of migration to monorepo
Reviewed By: motiz88
Differential Revision: D41553157
fbshipit-source-id: eef70c8e7639080acdeb6716d1a915760a85458a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35539
This file is unused now that we rely on RNGP. We should be able to remove it
in the next stable release 0.72. In 0.71 we shipped it with a removal warning,
and users should not rely on it anymore.
Changelog:
[Android] [Removed] - Remove the react.gradle file as it's unused
Reviewed By: rshest
Differential Revision: D41655709
fbshipit-source-id: 20860da5e596d35738eea5748c791d3d923dc4fb
Summary:
While working on 0.71 we noticed that we were hitting a "mock-fs not found" issue on CI, caused by the fact that the dependency was set in the wrong spot.
This PR backports to main the fix: 05646f8f38 & ceaebc6975
This is related to the black magics of repo-config, and the fact that devDeps from repo-config don't get propagated back to the root package.json when on stable branch. Because of that, this commit doesn't NOT have a yarn.lock entry (the dep is there in main).
I'm confused as to how that dep ended in the devDeps of repo config, it seems something went wrong in migrating some commits from GH to monorepo and back?
check out:
* https://github.com/facebook/react-native/pull/34580
* f0ffd2291c
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - move mockfs to the right package.json
Pull Request resolved: https://github.com/facebook/react-native/pull/35476
Test Plan: N/A, change is transparent
Reviewed By: cortinico, cipolleschi, dmytrorykun
Differential Revision: D41530265
Pulled By: jacdebug
fbshipit-source-id: ec7a6426d9a2a766a98a3cccc339ca7ca090c3a0
Summary:
This is just a PR to realign main branch (and put it ahead) of a local change we did in 0.71: 741d102476
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Changed] - Bump CLI to v10 alpha5
Pull Request resolved: https://github.com/facebook/react-native/pull/35260
Test Plan: N/A
Reviewed By: christophpurrer
Differential Revision: D41122011
Pulled By: cipolleschi
fbshipit-source-id: 8f01ed94bfd39d58b2e54cd2945fcca5bb8ebd18
Summary:
Just bumping RNGP to make the new sources avialable to the template.
Changelog:
[Internal] [Changed] - Bump RNGP to 0.71.8
Reviewed By: robhogan
Differential Revision: D40948246
fbshipit-source-id: c6a193fcdc0675be9ef7f1320d63e884b8b65daa
Summary:
Quick update (requested by cortinico) ahead of release 0.71. Note that there was not a new release of `react-native-communiity/cli-platform-ios` in f6f23cca4b.
Changelog:
[General][Changed] - Bump CLI to 10.0.0-alpha.2
Reviewed By: robhogan, cortinico
Differential Revision: D40806560
fbshipit-source-id: 5c852a204c3c2d272d0502a34221f24ce7613cb0
Summary:
Small PR with bump to the new versions of CLI and Metro in preparation of the branch cut for 0.71.
While at it, did a cheeky `npx yarn-deduplicate` to clean up a bit the deps.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Changed] - Bump CLI to 10.0.0-alpha.1 and Metro to 0.73.3
Pull Request resolved: https://github.com/facebook/react-native/pull/35107
Test Plan: CI is green
Reviewed By: motiz88
Differential Revision: D40762683
Pulled By: huntie
fbshipit-source-id: e523a49c78588ca80351f44cb02bcd4c0137475e
Summary:
Just bumping RNGP to make the new sources avialable to the template.
Changelog:
[Internal] [Changed] - Bump RNGP to 0.71.7
Reviewed By: cipolleschi
Differential Revision: D40760927
fbshipit-source-id: 909c88377a231ea6678c6af14c5594fdc4830b79
Summary:
In 2017, React published v15.5 which extracted the built-in `prop types` to a separate package to reflect the fact that not everybody uses them. In 2018, React Native started to remove `PropTypes` from React Native for the same reason. In 0.68 React Native introduced a deprecation warning which notified users that the change was coming, and in 0.69 we removed the PropTypes entirely.
The feedback we've received from the community is that there has not been enough time to migrate libraries off of PropTypes. This has resulted in users needing to patch the React Native package `index.js` file directly to add back the PropTypes, instead of migrating off of them. We can empathize with this fix short term (it unblocks the upgrade) but long term this patch will cause users to miss important changes to `index.js`, and add a maintenance cost for users.
Part of the reason there was not enough time is that we didn't do a good job surfacing libraries that were using PropTypes. This means, when you got a deprecation warning, it wasn't clear where the source of the usage was (either in your code or in a library). So even if you wanted to migrate, it was difficult to know where to actually make the change.
In the next release, we've made it easier to find call sites using deprecated types by [fixing the code frame in errors](https://github.com/react-native-community/cli/pull/1699) reporting in LogBox, and ensuring that [the app doesn't crash without a warning](https://github.com/facebook/react-native/pull/34650). This should make it easier to identify exactly where the deprecated usage is, so you can migrate it.
To help users get off of the patch, and allow more time to migrate, we're walking back the removal of PropTypes, and keeping it as a deprecation for a couple more versions. We ask that you either migrate off PropTypes to a type system like TypeScript, or migrate to the `deprecated-react-native-prop-types` package.
Once we feel more confident that the community has migrated and will not need to patch React Native in order to fix this issue, we'll remove the PropTypes again. **If you have any trouble finding the source of the PropType usage, please file an issue so we can help track it down with you.**
Changelog:
[General][Changed] - Add back deprecated PropTypes
Reviewed By: yungsters
Differential Revision: D40725705
fbshipit-source-id: 8ce61be30343827efd6dc89a012eeef0b6676deb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35089
Changelog:
[General][Fixed] - Back out "Add enum example to Android/iOS rn-tester TurboModule"
This broke the rn-tester adding due to an invalid flow-enum setup. Needs further investigation
Reviewed By: cipolleschi
Differential Revision: D40714320
fbshipit-source-id: 9831276762f90df0ffaca3304382fe5925009343
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35079
This bumps the Docker image for React Native Android to 6.0
shipping the NDK 23 with it, finalizing all the work needed
to support NDK 23.
Changelog:
[Internal] [Changed] - Bump the Android Docker image to 6.0 (for NDK 23)
Reviewed By: cipolleschi
Differential Revision: D40675449
fbshipit-source-id: 5fb53080ce796263cd592dbc489743e6295060ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35075
This diff updates the New App template for Android to use the React Native Gradle Plugin.
With this we can:
1. Get rid of all the C++ code.
2. Remove a lot of New Architecture logic in the build.gradle
3. Reuse the prebuilts of React Native/Hermes via prefab
Changelog:
[Android] [Changed] - Update the template to use RNGP
Reviewed By: cipolleschi
Differential Revision: D40673732
fbshipit-source-id: 70935248993d1e24904c982e75f12ad580faa9d8
Summary:
Bumping RNGP to make sure all the changes are available for 0.71
I've also removed the caret from react-native's package.json as
I don't want .5 to be used by template tests yet.
The Android template needs to be updated in order to use
that version of the Gradle plugin.
Changelog:
[Internal] [Changed] - Bump react-native-gradle-plugin to 0.71.5
Reviewed By: cipolleschi
Differential Revision: D40642114
fbshipit-source-id: 70359efc3d2300e9c04c1b361c45061fd1c2931b
Summary:
A super small PR to bump CLI to latest available of the 9.x stream, to make available in main the asset image fix (https://github.com/react-native-community/cli/pull/1290) and to be able to cherry pick it back in 0.70 branch.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Changed] - bump CLI to 9.2.1
Pull Request resolved: https://github.com/facebook/react-native/pull/35022
Test Plan: CI is green
Reviewed By: dmytrorykun
Differential Revision: D40507344
Pulled By: huntie
fbshipit-source-id: 7c3753e9df154eb5835f021cdfe1b476499afb9a