Summary:
A quick fix for the local e2e script, a path needed to be updated.
## 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] [FIXED] - fix e2e local script post monorepo refactoring
Pull Request resolved: https://github.com/facebook/react-native/pull/36558
Test Plan: Run it locally.
Reviewed By: cortinico, cipolleschi
Differential Revision: D44257019
Pulled By: hoxyq
fbshipit-source-id: 29c4d4d103b5a041ef241cd371f31a1fc41d0396
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36534
Changelog: [Internal]
- Added option to include react-native package in forEachPackage func
- Used this in align-package-versions.js
Reviewed By: cortinico
Differential Revision: D44152939
fbshipit-source-id: da173e78945d8185ae7e35e29d08926de1700fa4
Summary:
Nightly builds are broken at the moment - at least in the first instance this looks to be because a reference to `template/package.json` was missed in the monorepo PR. This repairs it.
Changelog: [Internal]
Reviewed By: GijsWeterings
Differential Revision: D44205810
fbshipit-source-id: c810b7a211db7162569a67fca26771fce79d4f9d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36461
This change breaks a dependency cycle between `ReactCommon` and `React-Core`.
`React-Core` depends on `ReactCommon` to have access to the various `TurboModule` native files.
`ReactCommon` depends on `React-Core` because the content of the `core/platform/ios` folder and the `samples` folder needs to access the `RCTBridge` and other files in Core.
To break the circular dependency, we introduced two new `podspecs`:
* `React-NativeModulesApple` for the content of `core/platform/ios`.
* `ReactCommon-Samples` for the content of the `samples` folder.
In this way, the new dependencies are linear as `React-NativeModulesApple` and `ReactCommon-Samples` depends on `React-Core` and `ReactCommon` and `React-Core` only depends on `ReactCommon`.
While doing this, we also make sure that all the include path are aligned, to limit the amount of breaking changes.
## Changelog:
[iOS][Breaking] - Split the `ReactCommon/react/nativemodule/core/platform/ios` and `ReactCommon/react/nativemodule/samples` in two separate pods to break circular dependencies.
Reviewed By: mdvacca
Differential Revision: D44023865
fbshipit-source-id: a97569506350db5735ac5534b1592471de196cbe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36421
Changelog: [Internal]
Adding an extra choice for commit question, user can now choose between three options:
1. Commit with generic message, no further actions needed
2. Commit with custom message, intercative VIM input will open
3. Not committing anything
Reviewed By: cortinico
Differential Revision: D43943526
fbshipit-source-id: 014215105d192961486b7d1c697f491697492812
Summary:
This change updates the way in which we consume the list of components from the `react-native.config.js` files so that it is aligned to what Android does.
## Changelog:
[iOS][Changed] - Update how the `react-native.config.js` is consumed to add elements in the interop layer.
Reviewed By: cortinico
Differential Revision: D43875395
fbshipit-source-id: e359c98a9144f4efe62967096d48318491718958
Summary:
This change add more tests for iOS, using different versions of Ruby
## Changelog
[iOS][Added] - Added smoke tests for iOS with Ruby 2.7.7 and 3.2.0
Pull Request resolved: https://github.com/facebook/react-native/pull/36376
Test Plan: CircleCI must be green.
Reviewed By: blakef
Differential Revision: D43825344
Pulled By: cipolleschi
fbshipit-source-id: 8d3f5a2d9688f4d58f0ad5573d7b21e059cab523
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:
Pull Request resolved: https://github.com/facebook/react-native/pull/36348
Changelog: [Internal]
Turns out that Phabricator strips `@` symbol from `@...` tags when exports commits to GitHub. Proposing to use `#` instead.
#publish-packages-to-npm
Reviewed By: cortinico
Differential Revision: D43712415
fbshipit-source-id: 86fc728eb0cb63afb6a9fe592a9ae998da2ce2e4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36321
This change bumps Cocoapods to 1.12.0. This last release fixes a bug for which cocoapods was not working with Ruby 3.2.0
## Changelog
[iOS][Changed] - Bumbed version of Cocoapods to support Ruby 3.2.0
Reviewed By: blakef
Differential Revision: D43655787
fbshipit-source-id: 6954ac8271daa7894e57f6d6104ed4d549490695
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 https://github.com/react-native-community/cli/commit/8d18baef554423904c036cbeaa5a1ea92603ff5d 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/36305
This change automate settings some search paths for 3rd parties libraries that are not using our `install_modules_dependencies` helper.
This will make the `use_frameworks!` changes less breaking.
## Changelog:
[iOS][Changed] - Automatically update Search Path on pods
Reviewed By: dmytrorykun
Differential Revision: D43596808
fbshipit-source-id: 9c5d7ff60a1e4cf73afbfd70b2499f03825cd764
Summary:
This Change remove the need to have a specific version of Ruby installed. We are now supporting a wider range of Ruby versions, starting from Ruby 2.6.10 (the ruby installed on MacOS by default).
We are still using a Gemfile to control the version of cocoapods that needs to be installed.
## Changelog
[IOS] [CHANGED] - Remove `.ruby-version` and update Gemfile to support a wider range of Ruby versions
Pull Request resolved: https://github.com/facebook/react-native/pull/36281
Test Plan:
- Tested locally on RNTester and an app from template, switch across different versions of Ruby
- CircleCI is green on the commit
Reviewed By: cortinico
Differential Revision: D43567660
Pulled By: cipolleschi
fbshipit-source-id: e7edfe5806a898a83ba39cb58b1318ebde56a57c
Summary:
The previous fix for -DNDEBUG required to install the pods with PRODUCTION=1 in order to add the flag. The flag was added also to Debug configurations, which is not ideal.
With this change, we remove the requirement of running `PRODUCTION=1 pod install` and we install the -DNDEBUG flag to all the release configurations.
## Changelog:
[iOS][Changed] - Install the -DNDEBUG flag on Release configurations, without requiring PRODUCTION=1 flag
Reviewed By: cortinico
Differential Revision: D43535620
fbshipit-source-id: af97bef06f267dddd5ce13a466bbc8d9a5eb2b0b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36209
ThisChange automatically enable the RuntimeScheduler when the new architecture is enabled, both on RNester and in the Template app.
Note that no migration steps are required.
## Changelog
[iOS][Changed] - Automatically install the RuntimeScheduler
Reviewed By: sammy-SC
Differential Revision: D43392059
fbshipit-source-id: 609ded9bdc3db13a0d54ff44d0d4687dfc8617a5
Summary:
Having custom commit message script is not an option for `main` branch, because we have internal tooling, which strips `[x]` tags from commit messages before merging them into `main` branch.
Instead of constant commit message, we are now using a tag which will be concatenated with the commit message, which was entered via interactive commit dialog, see demo below.
## Changelog
[Internal] - updated validation in bumping packages script
Pull Request resolved: https://github.com/facebook/react-native/pull/36220
Test Plan: https://user-images.githubusercontent.com/28902667/220163767-015bf37b-6914-4df2-84d9-aa25fb2887d3.mov
Reviewed By: cortinico
Differential Revision: D43443597
Pulled By: hoxyq
fbshipit-source-id: 08e5e08524a1d934fbb35529e025358d7bf3b203
Summary:
By leveraging the `PUBLIC_HEADERS_FOLDER_PATH` build settings of Xcode, we can instruct cocoapods to generate the frameworks Headers in a specific folder, for example the `React` folder.
This allows us to maintain the `#include`/`#import` structure, even if the framework has a different name.
However, we need to update the search paths to take into account this extra folder.
## Changelog:
[iOS][Changed] - Generate RCTFabric framework's headers in the React folder
Reviewed By: sammy-SC, dmytrorykun
Differential Revision: D43425677
fbshipit-source-id: 94a4f3a3c7de86341b3ce3457704e6b8fb9a588e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36210
One of the circular dependencies we have in OSS was between React-Codegen and React-Fabric.
React-Codegen generates component which has to depends on React-Fabric because they need to use the files contained in the `react/renderer/view` folder.
React-Fabric contains some components that depends on RNCore, which was generated inside the React-Codegen folder.
This change generates the RNCore components inside the `ReactCommon/react/renderer/components/rncore` folder, breaking the dependency as `rncore` folder is now contained by React-Fabric itself.
**Fun Fact:** That's how it always should have been. There was already a line in the `.gitignore` to exclude the content of `ReactCommon/react/renderer/components/rncore` folder. I guess that with some of the refactoring/previous projects on Codegen, this requirements has slipped.
## Changelog:
[iOS][Breaking] - generates RNCore components inside the ReactCommon folder and create a new pod for platform-specific ImageManager classes
Reviewed By: sammy-SC, dmytrorykun
Differential Revision: D43304641
fbshipit-source-id: ebb5033ce73dbcd03f880c3e204511fdce04b816
Summary:
This diff update the Cocoapods scripts to install the proper dependencies and search paths when `use_frameworks!` is declared together with the New Architecture.
Practically, it adds the right search paths to the codegen and the project files and makes sure that third party dependencies that leverage the `install_modules_dependencies` are populated with the right search paths for Frameworks.
It also adds unit tests for the changes and the new methods introduced.
## Changelog:
[iOS][Changed] - Properly install dependencies with `use_frameworks!`
Reviewed By: sammy-SC, dmytrorykun
Differential Revision: D43089869
fbshipit-source-id: 1981b6853f774fdb3dbe8d17ea37fd5154c54b25
Summary:
`xcpretty` is no longer maintained. Let's switch to `xcbeautify`, which is faster and is maintained. I'm also biased because `xcpretty` hid an error from me that `xcbeautify` did not.
## Changelog
[INTERNAL] [CHANGED] - Move CI from `xcpretty` to `xcbeautify`
Pull Request resolved: https://github.com/facebook/react-native/pull/36131
Test Plan:
Locally yarn `yarn test-ios` and got output that looks like this:
<img width="1245" alt="Screenshot 2023-02-11 at 9 34 07 PM" src="https://user-images.githubusercontent.com/6722175/218291538-07760f94-7e52-4919-b603-8a35a623fc9a.png">
I also confirmed a junit report that looks like this was generated:
```xml
<testsuites name="Selected tests" tests="193" failures="0">
<testsuite name="RCTLoggingTests" tests="1" failures="0">
<testcase classname="RCTLoggingTests" name="testLogging" time="0.175" />
</testsuite>
<testsuite name="RCTUIManagerScenarioTests" tests="3" failures="0">
<testcase classname="RCTUIManagerScenarioTests" name="testManagingChildrenToAddRemoveAndMove" time="0.001" />
<testcase classname="RCTUIManagerScenarioTests" name="testManagingChildrenToAddViews" time="0.000" />
<testcase classname="RCTUIManagerScenarioTests" name="testManagingChildrenToRemoveViews" time="0.001" />
</testsuite>
...
```
Reviewed By: cortinico
Differential Revision: D43232774
Pulled By: cipolleschi
fbshipit-source-id: fda4e217d4df55b5088026d6911d3dc6c8c9e824
Summary:
When the node version could not be found there is an error message shown to help what can be done to fix this issue (for example in the error logs in xcode)
The problem was that the backtick symbol is interpreted as running commands in terminals so the parts that were in backticks were run and the error message was printed incompletely. Also there were other errors added (.xcode.env command not found, for example) which makes it harder to understand what is going on.
In bash / zsh single quotes does not expand commands and variables unlike double quotes which does this.
## Changelog
[IOS] [FIXED] - Fix missing node error message not printed correctly when deprecated `find-node-for-xcode.sh` is used.
Pull Request resolved: https://github.com/facebook/react-native/pull/36140
Test Plan:
I just ran the xcode build again after updating it manually in the node_modules folder.
The log output changed from this
```
[Warning] You need to configure your node path in the environment. You can set it up quickly by running: echo 'export NODE_BINARY=/Users/uloco/Library/Caches/fnm_multishells/78434_1676301546457/bin/node' > .xcode.env in the ios folder. This is needed by React Native to work correctly. We fallback to the DEPRECATED behavior of finding . This will be REMOVED in a future version. You can read more about this here: https://reactnative.dev/docs/environment-setup#optional-configuring-your-environment
```
to this
```
[Warning] You need to configure your node path in the `".xcode.env" file` environment. You can set it up quickly by running: `echo export NODE_BINARY=$(command -v node) > .xcode.env` in the ios folder. This is needed by React Native to work correctly. We fallback to the DEPRECATED behavior of finding `node`. This will be REMOVED in a future version. You can read more about this here: https://reactnative.dev/docs/environment-setup#optional-configuring-your-environment
```
Reviewed By: cortinico, cipolleschi
Differential Revision: D43258623
Pulled By: rshest
fbshipit-source-id: 7db0d983b204e59504666686be78311c4c2fb993
Summary:
Fixes https://github.com/facebook/react-native/issues/36097
When building RNTester with the old architecture, we skip a call to `build_codegen`, which will build the JS package at `packages/react-native-codegen`. This is needed for the Xcode Script phase `Generate Specs`. This causes a build with fabric disabled to fail. We can fix this by ensuring we call `build_codegen` in both paper and fabric.
We've had this change in React Native macOS already since 0.68: https://github.com/microsoft/react-native-macos/commit/1175372ffecf6b4e18fa27b75b68f3ec7967a384
## Changelog
[IOS] [FIXED] - Build codegen package while using old architecture
Pull Request resolved: https://github.com/facebook/react-native/pull/36098
Test Plan:
CI should suffice. Locally built RN-Tester without fabric with and without my change to show that disabling fabric will only succeed with this change included.
While running `pod install`, you should now see this extra line with the old architecture:
> [Codegen] building ./../../packages/react-native-codegen.
Reviewed By: cortinico
Differential Revision: D43152692
Pulled By: cipolleschi
fbshipit-source-id: 2cf3002f07eaad442ccb0272831fe2de58ec9c1a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36093
The Test Docker Android job is flaky as sometimes fetching artifacts from remote
returns different hashes.
I'm moving the job to CircleCI (so it's faster) + I'm using the `buck_fetch.sh`
script we already have which has a retry logic.
Changelog:
[Internal] [Changed] - Move test-docker-android from GH Actions to CircleCI
Reviewed By: javache
Differential Revision: D43121477
fbshipit-source-id: 1df114fd3ad9445a4a5dc7834bf811c3476322cd
Summary:
Update setup of sourcing `asdf-vm` in `find-node-for-xcode.sh` in case of user has custom defined of `$ASDF_DIR`
by default `$ASDF_DIR` point to `$HOME/.asdf`, but if user has custom directory (like XDG convention) this script wont work without this change.
## 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] - Find node binary when using asdf as the node version manager with custom `$ASDF_DIR`
Pull Request resolved: https://github.com/facebook/react-native/pull/36043
Test Plan: use a defualt/custom `$ASDF_DIR` while using `asdf-vm` as node version manager then make iOS build.
Reviewed By: cortinico
Differential Revision: D42990407
Pulled By: cipolleschi
fbshipit-source-id: 1fe3fdc786bddf741ff422e7bec55a6c9cc8ed83
Summary:
A small backport to main of a local fix done in 0.71 to account for the logic for releases 0.Y.1,2,3-prerelease (meaning, not just strictly 0).
I could have done like the other logics and just remove the check for patch, but decided to at least make sure it's a digit 😅
## 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] [FIXED] - handle patch versions after the .0 for set version
Pull Request resolved: https://github.com/facebook/react-native/pull/36020
Test Plan: Tested in 0.71-stable, without it we can't test RNTestProject.
Reviewed By: jacdebug, cortinico
Differential Revision: D42924375
Pulled By: cipolleschi
fbshipit-source-id: b003d884cc45a2602adbc14fa8b66d3f1e0c94a6
Summary:
The fixed error guides users toward the right missing dependency. The original error pointed to the old name.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[INTERNAL] [FIXED] - Display correct codegen dependency name when not found
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [FIXED] - Display correct codegen dependency name when not found
Pull Request resolved: https://github.com/facebook/react-native/pull/36013
Test Plan: This is an error message wording change.
Reviewed By: jacdebug
Differential Revision: D42881807
Pulled By: cipolleschi
fbshipit-source-id: d96fb867cfe27ae922d398ab981f5797cb51a269
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36004
Changelog: [Internal]
This fixes CircleCI job, which is responsible for publishing bumped packages. We should not check for `stderr`, apparently `npm` uses it to store debug information:
- https://github.com/npm/npm/issues/118#issuecomment-325440
So we've tried to use this on 0.71-stable before and it succesfully published one package, but have exited right after it because `stderr` was not empty
Reviewed By: cortinico, cipolleschi
Differential Revision: D42836212
fbshipit-source-id: 6f2a9a512121683268fe6aae6a187fccb8d9dfbc
Summary:
In a mono-repo the `react-native` package could be hoisted compared to the app directory, in which case it's not a good strategy for the `react-native-xcode.sh` script to guess the app project root relative to the location of itself. Instead I suggest to relying on a build setting provided by Xcode to derive the default app path.
I could have use the `SRCROOT` instead. According to https://stackoverflow.com/questions/36323031/what-the-different-between-srcroot-and-project-dir this is equivalent and also a bit less ambiguous as I see it. I.e. I would expect most Xcode projects to be located in the `ios` directory of the app.
As a workaround, before this merge, users can add the following to their "Bundle React Native code and images" build phase or `ios/.xcode.env` file:
```shell
export PROJECT_ROOT="$PROJECT_DIR/.."
```
This build phase can also be used for users wanting to revert this default behaviour once merged.
## Changelog
[iOS] [Changed] - Changed default `PROJECT_ROOT` (used in when bundling for iOS) to rely on the `PROJECT_DIR` build setting.
Pull Request resolved: https://github.com/facebook/react-native/pull/35970
Test Plan:
I've updated this locally and verified this does indeed pick up the correct app path - even in a mono-repo.
To verify this:
- Instantiate the template with this patch applied.
- Update the "Run scheme"'s "Build Configuration" to "Release".
- Build the app without errors.
Reviewed By: cortinico
Differential Revision: D42842636
Pulled By: cipolleschi
fbshipit-source-id: 040c31ac59a8abec5f5b38f795c8e74649420bac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35991
Changelog: [Internal]
While cherry-picking all this logic to `0.71-stable` branch, we've discovered several issues where some packages were failing to be published on Verdaccio proxy
This was failing only on node v16+, after some research, I've noticed that there might be a race-condition and npm unable to grab this token before first `npm publish` executes
Although this still work well on `main` branch, I am backporting it to keep aligned with `0.71-stable`
Reviewed By: christophpurrer, cortinico
Differential Revision: D42806081
fbshipit-source-id: af244d26ea529e6085ed5b2d731623dfaf78a14d
Summary:
I'm moving nightlies from scheduled workflow to scheduled pipeline.
We're not able to manually retrigger nightlies as they're a scheduled workflow and don't expose a parameter. Here I'm cleaning it up.
Plus I'm:
1. Removing the `main_only` reference which is unused
2. Setting up the `run_release_workflow` and `run_nightly_workflow` parameters.
## Changelog
[INTERNAL] - Migrate nightly from scheduled workflow to scheduled pipeline
Pull Request resolved: https://github.com/facebook/react-native/pull/35977
Test Plan: Will wait for CI results.
Reviewed By: cipolleschi
Differential Revision: D42776969
Pulled By: cortinico
fbshipit-source-id: d4ef9654d23cb91f85ce2b38e75e27dc0c575e95
Summary:
While working on 0.71 branch I encountered a problem in testing locally. Basically, I was getting hit by a silent error caused by recent work https://github.com/facebook/react-native/pull/35296 that didn't account for the shape of E2E local script for the release, `0.71.0-20230116-1649`.
This scripts fixes both aspects: the error now gets thrown "better" and the logic accounts for the E2E shape.
## 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] [FIXED] - add logic for version scripts to account for local E2E test versioning
Pull Request resolved: https://github.com/facebook/react-native/pull/35846
Test Plan: Tested via the other PR: https://github.com/facebook/react-native/pull/35847
Reviewed By: cortinico
Differential Revision: D42543200
Pulled By: cipolleschi
fbshipit-source-id: 727eb887fcbd183ec56d8a9b7e98241eaacb1d98
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:
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:
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 (https://github.com/facebook/react-native/commit/db3ac93001f65bad84b748ec257fe79b79432976).
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:
The variable `version` is previously used but in https://github.com/facebook/react-native/commit/234486068e7f547450829d17e8d5db111a1571bc#diff-adcf572f001c2b710d14f409c14763f1a50b08369b3034548f1602685d21f67f, its usage have been removed the but the variable is kept.
It also raises an error when using `bundle exec pod install --project-directory=ios` which works on `0.70.X` and below.
```txt
No such file or directory @ rb_sysopen - ../node_modules/react-native/package.json
/Users/davidangulo/Desktop/mobile/myapp/node_modules/react-native/scripts/react_native_pods.rb:212:in `read'
/Users/davidangulo/Desktop/mobile/myapp/node_modules/react-native/scripts/react_native_pods.rb:212:in `react_native_post_install'
```
## Changelog
[IOS] [FIXED] - pod install with --project-directory
Pull Request resolved: https://github.com/facebook/react-native/pull/35754
Test Plan: `bundle exec pod install --project-directory=ios` should not raise an error.
Reviewed By: christophpurrer
Differential Revision: D42298517
Pulled By: rshest
fbshipit-source-id: bef0b03312d2029188ae5437e3baf3ffce5cb73f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35679
The Codegen cleanup step was not always working due to an issue with the codegen folder path. It was working for RNTester, but not for apps created from the Template.
## Changelog:
[iOS][Fixed] - Fix path issue to properly run the codegen cleanup step
Reviewed By: jacdebug
Differential Revision: D42137600
fbshipit-source-id: ba4cb03d4c6eb17fda70a4aff383908d2e468429
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35672
While working on some example, I discovered that the helper function `install_module_dependencies` was not adding the proper `-DRCT_NEW_ARCH_ENABLED=1` flag to the compiler flags.
## Changelog:
[iOS][Fixed] - Make sure to add the New Arch flag to libraries
Reviewed By: jacdebug
Differential Revision: D42131287
fbshipit-source-id: 68c492150ba4e4a2ec726b3e8b8a9c7842b543bc
Summary:
This PR adds a safety check in case the Cocoapod build script is not able to clean the build folder.
We had evidences where this process failed, and in this way the user has a clear and actionable message to fix its situation.
## Changelog
[iOS][Added] - Add message with instructions about what to do if the cleanup of the build folder fails.
Pull Request resolved: https://github.com/facebook/react-native/pull/35642
Test Plan:
I was not able to reproduce the issue locally.
The fix is not destructive, let's see if the amount of issues decreases.
Reviewed By: dmytrorykun
Differential Revision: D42067939
Pulled By: cipolleschi
fbshipit-source-id: 433dbfaec42a1bf460dc9a48051aa51ec6e12d16
Summary:
This PR introduce an automatic way to detect whether the user sets its podfile to use frameworks.
In this way, users don't have to install pods with a specific environment flag but they can rely on the standard Cocoapods usage
## Changelog
[IOS][ADDED] - Automatically detect whether use_frameworks! is used
Pull Request resolved: https://github.com/facebook/react-native/pull/35636
Test Plan:
- CircleCI is Green
- Added unit tests
- Tested locally with an app
Reviewed By: dmytrorykun
Differential Revision: D42029355
Pulled By: cipolleschi
fbshipit-source-id: 76c92133deabbda59603b043a4d542737f10f044
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:
Pull Request resolved: https://github.com/facebook/react-native/pull/35633
Changelog: [Internal]
These changes add usage of `forEachPackage` as a replacement for `yarn --json workspaces info`.
This is because at some point in release cycle there is a script which removed `workspaces` block from react-native's `package.json`, so `yarn --info workspaces info` produces an error
Reviewed By: cortinico
Differential Revision: D41996732
fbshipit-source-id: 2c62c1a5eb41d711c563f9f7b0de3d67fc11823d