Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35810
Changelog: [Internal]
`bump-all-updated-packages` script now supports `release-branch-cutoff` argument
If this argument is provided, the script will bump each public package to next minor version
Updated [wiki](https://github.com/facebook/react-native/wiki/Release-and-its-automated-processes) with relevant information about how to use it
Reviewed By: cortinico
Differential Revision: D42455329
fbshipit-source-id: a40d2f5dc356f22d3182da3a118c6383b634817d
Summary:
There is a large amount of autogenerated files in the coverage folder when running `jest --coverage`.
This folder is also in .gitignore for react projects created with `create-react-app`
Originally suggested here: https://github.com/react-native-community/discussions-and-proposals/discussions/569
## 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] [ADDED] - Added "coverage" folder generated på `jest --coverage` to .gitignore
Pull Request resolved: https://github.com/facebook/react-native/pull/35809
Test Plan:
1. cd template
2. yarn
3. yarn test --coverage
Im not sure why many of the files in the template folder have an underscore(_) in the filenames instead of a dot(.). When creating a react-native project they have a dot. So if you run the above commands, the coverage folder will not be ignored since its not in `.gitingore` but in `_gitignore`. However, if you temporarily create a `.gitignore` file, you will see that the coverage folder is ignored.
4. Temporarily create `.gitignore` file to verify that coverage folder is ignored
Reviewed By: cortinico
Differential Revision: D42454560
Pulled By: jacdebug
fbshipit-source-id: 0be007d3ba3dde47814c0ce0fb8b0ff9f67d637b
Summary:
Changelog: [Internal]
just a small cleanup, moved all tests related to monorepo scripts under `/scripts/monorepo`
Reviewed By: cortinico
Differential Revision: D42308455
fbshipit-source-id: 7743a2af1381ff748556c15b89cf980f8f907674
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:
Pull Request resolved: https://github.com/facebook/react-native/pull/35792
This Diff fixes a problem we have when running Ruby tests.
The previous approach was monkey-patching the Ruby File and Dir classes to override some behaviours we needed during tests. However, these classes are also used by the test runners to properly read and run the tests, therefore when the tests were failing, the stream weren't closed properly and we received the wrong errors.
This problem was also preventing us from adopting other Ruby tools like SimpleCov to compute code coverage.
## Changelog:
[internal] - refactor Ruby tests not to monkey patch Dir and File
Reviewed By: dmytrorykun
Differential Revision: D42414717
fbshipit-source-id: 879b9928da1a083ebf9c81b1f510eaa039376042
Summary:
This is always enabled internally, so we should just turn it on everywhere.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D42406509
fbshipit-source-id: c9cdd4fcf907d66cd276e0aec608a2e7db7ca5fb
Summary:
Fixes https://github.com/facebook/yoga/issues/850https://github.com/facebook/yoga/issues/850 describes a conformance issue where positioning of an absolute child using percentages is not calculated against the correct box size.
This takes the fix for that in https://github.com/facebook/yoga/pull/1028, regenerates tests, and fixes tests so that the experimental feature can be enabled. Goal is to run this as an experiment internally to see if we can enable by default.
Changelog:
[Internal]
X-link: https://github.com/facebook/yoga/pull/1201
Reviewed By: yungsters
Differential Revision: D42282358
Pulled By: NickGerleman
fbshipit-source-id: 57c0dd9b0f1c47cb9335ff6e13d44b4646e5fa58
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35789
Changelog: [Internal]
This diff is reverting D41069547 (fee9510b2d) D41062668 (4c40014d43) D40984397 (05968d16e1)
D40984397 (05968d16e1) has been identified to be causing the following test or build failures:
We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it.
allow-large-files
Differential Revision: D42371475
fbshipit-source-id: daa01c9215811c397f5cef958fd4620f36295b60
Summary:
Removing a stale configuration that was configuring username/password before publishing to NPM. This is effectively unused + the Github Token there is invalid therefore can be removed.
## Changelog
[INTERNAL] - Remove unused .netrc file from CircleCI
Pull Request resolved: https://github.com/facebook/react-native/pull/35785
Test Plan: n/a
Reviewed By: cipolleschi
Differential Revision: D42385163
Pulled By: cortinico
fbshipit-source-id: 0dbbf44459d59f792da4221d6100800a2f4efda2
Summary:
This PR implements logical border-radius as requested on https://github.com/facebook/react-native/issues/34425. This implementation includes the addition of the following style properties
- `borderEndEndRadius`, equivalent to `borderBottomEndRadius`.
- `borderEndStartRadius`, equivalent to `borderBottomStartRadius`.
- `borderStartEndRadius`, equivalent to `borderTopEndRadius`.
- `borderStartStartRadius`, equivalent to `borderTopStartRadius`.
## Changelog
[GENERAL] [ADDED] - Add logical border-radius implementation
Pull Request resolved: https://github.com/facebook/react-native/pull/35572
Test Plan:
1. Open the RNTester app and navigate to the `RTLExample` page
2. Test the new style properties through the `Logical Border Radii Start/End` section
https://user-images.githubusercontent.com/11707729/206623732-6d542347-93f9-40da-be97-f7dcd5f66ca9.mov
Reviewed By: necolas
Differential Revision: D42002043
Pulled By: NickGerleman
fbshipit-source-id: a0aa9783c280398b437aeb7a00c6eb3f767657a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35777
As Flipper version is a bit old, let's bump it to the latest stable: 0.174.0.
This is a follow-up from D41492705 (db3ac93001).
At the time, it wasn't possible to update to the latest stable Flipper as crashes were observed due to NDK mismatch.
allow-large-files
Changelog:
[iOS] [Changed] - Bump Flipper to 0.174.0
Reviewed By: cortinico, cipolleschi
Differential Revision: D42345736
fbshipit-source-id: 501e068aebfc25f6a50332391a7940aa9eec6fd6
Summary:
[Changelog][Internal]
The diff changes underlying storage types used by different enums that are used in ViewProps data structure, together with some eventual field rearranging to reduce padding overhead.
This **shaves off 128 bytes** from each `ViewProps` instance, which is **a ~10% improvement**.
Given that an average RN app may have thousands of shadow tree nodes, and correspondingly `ViewProps` instances in flight (e.g. Oculus Store has 2-3K of them nominally), the overall memory win is about **300K+** for this change only. Plus slightly better cache locality, which never a bad thing either.
Reviewed By: mdvacca
Differential Revision: D42372127
fbshipit-source-id: d3a832af2b2e89f50a5b8e04d24d0df92869ea4d
Summary:
Changelog: [Internal]
`MapBuffer` already has a move constructor but did not have a move assignment operator prior to this diff. Changing this requires removing the `const` qualifier from `bytes_`, but this seems OK in practice as it will still be treated as `const` by all the `const` accessors on `MapBuffer`.
Reviewed By: RSNara
Differential Revision: D42369493
fbshipit-source-id: f0fcce533d8e0883dcf85d7262620ea77f377644
Summary:
Changelog: [Fixed][General] Filter out Hermes internal bytecode frames (Promise implementation) from error stack traces
Currently, React Native strips native frames from call stacks reported via ExceptionsManager / LogBox. This diff does the same for *internal bytecode* frames in Hermes, which are functionally similar to native frames: they are implementation details of the engine for which source code isn't readily available.
In particular this change will avoid confusing symbolication tools that may otherwise try to treat `InternalBytecode.js` frames as belonging to the main React Native bundle (and produce garbage output).
Reviewed By: GijsWeterings
Differential Revision: D42367135
fbshipit-source-id: b7904f10c7ff6956e7b736b575dde1ce45028200
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35709
This change refactors the logic to choose which version of hermes we have to pick
## Changelog:
[iOS][Changed] - Refactor hermes choosing logic
Reviewed By: cortinico, dmytrorykun
Differential Revision: D42211405
fbshipit-source-id: d19c0f2c523c5596d18a1f904e3b26d96ea1a77a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35775
[Changelog][Internal]
Follow-up to D42344715 (f70a2f6e38).
I realized that the problem that was fixed there could have been avoided, to begin with, by crafting the corresponding macro more carefully.
This gives both more readable and less fragile code.
Reviewed By: mdvacca
Differential Revision: D42345323
fbshipit-source-id: d4b6d5a95aab360ef0aac3ecb0f157d5325271b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35773
Changelog:
[Android][Added] - For supporting Dev Loading View across multiple platforms, changing the Loading View of Android to rely on the native implementation instead of Toast while keeping backwards comptability.
Reviewed By: rshest
Differential Revision: D42286466
fbshipit-source-id: 38749cdbc11208b81a6199467bac00cbc1850c92
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35772
[Changelog][Internal]
Noticed when looking into the events handling code - this looks like a copy/paste error, presumably introduced in D37050215 (47280de85e).
The correct event name is `onResponderMove`, as evident from all other places in code and the documentation.
Reviewed By: sammy-SC
Differential Revision: D42344715
fbshipit-source-id: fbf1648efaee696edcc7c945ebc0e8423246138b
Summary:
On iOS 13.0+, app may use SceneDelegate for multiple windows support or CarPlay support. RCTAlertController can't find the correct root vc in such scene based apps.
## 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
-->
[iOS] [Fixed] - Fix RCTAlertController not showing when using SceneDelegate on iOS 13.0+.
Pull Request resolved: https://github.com/facebook/react-native/pull/35716
Reviewed By: cipolleschi
Differential Revision: D42253653
Pulled By: makovkastar
fbshipit-source-id: ae4e833abca2af7af8028f3af9bd8d3f60ebd392
Summary:
Repair when RCTRedBoxGetEnabled is false , the red box will still be on display,It resolve that I send test-pack to QA with Xcode Archive on DEBUG env.
## Changelog
[General] [Changed] - Append RCTRedBoxGetEnabled() in RCTExceptionsManager.mm
Pull Request resolved: https://github.com/facebook/react-native/pull/35576
Test Plan: Xcode Archive on DEBUG env, the red box will be not on display.
Reviewed By: cipolleschi
Differential Revision: D41809649
Pulled By: skinsshark
fbshipit-source-id: 7d6be3479decf369c415f6a08dec9611b1441b1d
Summary:
[Changelog][Internal]
Use the [list of supported events](https://www.w3.org/TR/event-timing/#sec-events-exposed) explicitly to both filter and transform reported event types, which makes this both more robust and less ambiguous.
The mapping is using a compile-time hash/lookup, similarly to how we do it with the ViewProps in the RN core.
Reviewed By: rubennorte
Differential Revision: D42342655
fbshipit-source-id: 3d0b2465fd5611db110c4792913e0a92e76cd067
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35771
[Changelog][Internal]
Based on the internal discussion, we don't want to report `first-input` event types for RN (just use plain `event` instead), in the way that [Event Timing API standard suggests](https://www.w3.org/TR/event-timing), as this is doesn't have that clear semantics in the context of RN, also to keep it simpler.
Reviewed By: rubennorte
Differential Revision: D42341923
fbshipit-source-id: eff2487dee17ef082604e4c807b4d41485328114
Summary:
With the current implementation, it's possible to get a reference to the list of view managers while it's being populated, which in some cases results in `ConcurrentModificationException` thrown [here](9c57a7f209/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java (L80)). This PR updates the logic, so the reference to the list is updated (and returned) only when it's ready.
## Changelog
[ANDROID] [FIXED] - Fix possible `ConcurrentModificationException` in `UIManagerModuleConstantsHelper::createConstants`
Pull Request resolved: https://github.com/facebook/react-native/pull/35770
Reviewed By: cortinico
Differential Revision: D42342107
Pulled By: rshest
fbshipit-source-id: 8d799535c811edeefa1903fbf7a46bff22691e59