Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37707
Changelog: [Internal] - Refactor nightly monorepo publish script to also return a map of packages and their current nightly version and rename to reflect. This may refer to a nightly version that was just published (if we detect changes) or the nightly tag on npm if no changes.
In subsequent diffs, will update the react-native nightly script to use this map to set the versions for nightly react-native versions.
Reviewed By: hoxyq
Differential Revision: D46450703
fbshipit-source-id: c4e425924aa6cfdcf10e932e1b151ba05d9b7237
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37556
Changelog: [Internal]
Before making this change, we need to publish `nightly` versions of all existing monorepo dependencies.
Reviewed By: hoxyq
Differential Revision: D46117197
fbshipit-source-id: bcf6364e068579e63ca19e8161dcd32de4353e56
Summary:
I noticed this file was 4 years old in both React Native and React Native macOS, and figured it was safe to delete ¯\_(ツ)_/¯
Note from Eli: I wrote this thing years ago to see if we could generate docs based on our components. Never moved forward, lets delete it.
## Changelog:
[INTERNAL] [REMOVED] - Remove stale generated doc file
Pull Request resolved: https://github.com/facebook/react-native/pull/37053
Test Plan: N/A
Reviewed By: yungsters
Differential Revision: D46231152
Pulled By: TheSavior
fbshipit-source-id: c36a26ae7d7526305f73f1bd63f9d7223889e109
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37571
During the RC.0 of 0.72, we disabled the iOS integration tests because they were not working with Metro and the new Monorepo setup.
This change tries to re-enable them so we can be more protected in CI
## Changelog:
[internal] - Re-enable integration tests
Reviewed By: cortinico
Differential Revision: D46178840
fbshipit-source-id: a5239fa7067b8fb68d997dd0cc63b67fb54d2d7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37555
Changelog: [Internal] Refactor some npm commands and centralize in npm-utils.
For now, centralize `getPackageVersionStrByTag` and `publishPackage` and update:
1. `publish-npm` to use utilities. This is how we publish `react-native` for commitlies, releases, and nightlies
2. Update `find-and-publish-all-bumped-packages.js` where we publish our monorepo dependencies
Reviewed By: cortinico, hoxyq
Differential Revision: D46131120
fbshipit-source-id: e6020058eb94b4f8d95068b8cd87cc765711be5b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36900
This commit effectively removes all the Buck 1 OSS infra code we do have inside
React Native as we'll need to rework most of it once we move to Buck 2
Changelog:
[Internal] [Changed] - Remove Buck OSS 1 setup
Reviewed By: mdvacca, cipolleschi
Differential Revision: D44956134
fbshipit-source-id: c0ad1914286c428480248658c4282df5477bba2b
Summary:
Just backporting to main a couple of fixes we've done in the 0.72 branch plus removing the old bash script to avoid confusion (since now it's more broken than ever)
## 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 the local e2e script post monorepo & metro-config work
Pull Request resolved: https://github.com/facebook/react-native/pull/36836
Test Plan:
Run `yarn test-e2e-local` successfully, both for RNTester & RNTestProject scenarios.
Here's a screenshot if RNTestProject working successfully:
<img width="1501" alt="Screenshot 2023-04-06 at 14 20 54" src="https://user-images.githubusercontent.com/16104054/230394301-49ea5752-27ad-4800-b56e-004fd88e9c44.png">
Reviewed By: rshest
Differential Revision: D44748037
Pulled By: cipolleschi
fbshipit-source-id: d00438bd766e8f228120f7bbceef2013cf9c966f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36832
We used to use `cleanAll` instead of `clean` to do cleaning of everything due to a bug on AGP on how clean was performed.
The bug is resolved, so we can now use `clean` properly.
Moreover, we have sporadic failures when the codegen/lib/ folder is not cleaned up. This fixes it.
Changelog:
[Internal] [Changed] - Rename cleanAll to clean and refine it
Reviewed By: cipolleschi
Differential Revision: D44745849
fbshipit-source-id: 4da5d34bcb0ee5c9f6b0e0f4e5b919bcc3171270
Summary:
- Add a typescript project to test `CodegenSchema.d.ts`. More tests for other .d.ts files will be added in future pull requests.
- The build script scans all snapshots from `react-native/codegen`'s typescript frontend and generates .ts files for each snapshot, but they are .gitignore-ed.
- `npm run build` will build these .ts files against `CodegenSchema.d.ts` after generating them.
- A failed jest case is included to ensure CI catch it, it will be removed before merged.
bypass-github-export-checks
## Changelog:
[General] [Added] - Add react-native/codegen-typescript-test to verify .d.ts files in react-native/codegen (1)
Pull Request resolved: https://github.com/facebook/react-native/pull/36562
Test Plan:
`npm run build` in `packages/react-native-codegen-typescript-test` and see all test files appear in `__generated__`.
## Screenshot
![Untitled](https://user-images.githubusercontent.com/53799235/226757755-cab4cb29-7d22-46a1-9ecb-d6732122ed38.png)
Reviewed By: rshest
Differential Revision: D44292277
Pulled By: cipolleschi
fbshipit-source-id: 8d79fe913f9563d64c92aae7c4f4e97a24ae9a21
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36802
As we now support a broader range of ruby version, we don't need `update-ruby.sh` anymore
and we also don't need to call it during the set-rn-version script.
Changelog:
[Internal] [Changed] - Remove the update-ruby script as it's now unnecessary
Reviewed By: cipolleschi
Differential Revision: D44670361
fbshipit-source-id: b23abab28ccbd27408e4d76670101faeb463bc6b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36791
This is a re-land of D44635949. It was reverted as it was a suspected cause of CircleCI fails. It turned out the diff was unrelated, and the cause was something else.
## Changelog
[Internal][Security] - Use execFileSync over exec for cases with uncontrolled absolute paths
Reviewed By: cortinico
Differential Revision: D44663132
fbshipit-source-id: dfb3d09dbfbe3312ef54bcbbc43c8b4062d787a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36780
Original commit changeset: 8e0ebb070768
Original Phabricator Diff: D44131032
Changelog: [Internal]
all the circleCI template tests started failing after this commit, revert!
Reviewed By: jacdebug, cortinico
Differential Revision: D44635949
fbshipit-source-id: 429167acdbee3ebf6d81491ac65896c534c18fd0
Summary:
In our fork React Native macOS, we run [Github's CodeQL ](https://codeql.github.com) to analyze for vulnerabilities. One common one that comes up is the use of `exec` with an uncontrolled absolute path (Example: https://github.com/microsoft/react-native-macos/security/code-scanning/14). The very simple fix to this is to replace calls to `exec` with `execFileSync`, which more or less does the same thing (but more securely!).
## Changelog
[INTERNAL] [SECURITY] - Use `execFileSync` over `exec` for cases with uncontrolled absolute paths
Pull Request resolved: https://github.com/facebook/react-native/pull/36491
Test Plan: CI should pass
Reviewed By: cipolleschi
Differential Revision: D44131032
Pulled By: dmytrorykun
fbshipit-source-id: 8e0ebb07076838216f878f802ec937d2df44f33a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36759
On Thursday the 30th, Apple Released Xcode 14.3.0.
This Version of Xcode enforce some version checks for which React-Codegen, which supported iOS 11 as minimum supported version, could not be build anymore.
This change ensue that React-Codegen is always aligned to the min version supported by React Native.
Plus, it moves CircleCI's Xcode to 14.3.0, to keep this problem in Check.
While working on this, I figured that, with the monorepo, Ruby tests stopped working because they were in the wrong folder: I moved them in the right one.
## Changelog:
[iOS][Fixed] - Make React Native build with Xcode 14.3.0 and fix tests
Reviewed By: blakef
Differential Revision: D44605617
fbshipit-source-id: 3ec1f5b36858ef07d9f713d74eb411a1edcccd45
Summary:
The current `test-e2e-local` script had two bugs:
- On [this](c1c22ebacc/scripts/test-e2e-local.js (L219)) line we were initializing a new RN project with the packed `react-native` created [here](c1c22ebacc/scripts/test-e2e-local.js (L211))
- We were updating the local RN version after running `npm pack` [here](c1c22ebacc/scripts/test-e2e-local.js (L214)). This meant that the version inside the packaged `react-native-xyz.tgz` was not updated since we ran `pack` before updating it. This was fine since the `init` command was using the local `react-native` repository instead of the packed version.
## Changelog:
[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/36703
Test Plan:
- Run `yarn test-e2e-local -t RNTestProject -p Android`. The command should succeed.
I am not completely sure how to double check that we are using the packed version. Locally, I have a `fsmonitor--daemon.ipc` in my `react-native/.git` that can't be copied. The `.git` folder would be copied only when `cli.js init` was called with the whole repository – which is how I found out about the issue in the first place.
Reviewed By: hoxyq
Differential Revision: D44504599
Pulled By: cipolleschi
fbshipit-source-id: e57e2858bab46d4f978eed3cbaf3e504138594b8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36648
Changelog: [Internal]
Blocker for https://github.com/facebook/react-native/pull/36623. The `test-ios` job in CI was misconfigured following the monorepo migration — and this becomes load-bearing with the incoming version of React Native CLI.
- Update `objc-test.sh` to run in `packages/rn-tester`, and exclude tests under `/IntegrationTests` which are outside of a Metro project directory.
- **This is temporary** — a task has been created to move/split up/otherwise restore tests in `IntegrationTests`, which cipolleschi is following up (thanks!).
- Also fix `yarn start` script in `packages/rn-tester`.
Reviewed By: cipolleschi
Differential Revision: D44416533
fbshipit-source-id: 59c5b743d9d8fda206a12e37d94324ed9bfd703e
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:
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 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/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