Compare commits

...
Author SHA1 Message Date
Distiller 638d3a499f [0.67.5] Bump version numbers 2022-11-06 20:50:33 +00:00
Nicola Corti 9f2acda1b8 Force dependencies resolution to minor series for 0.67 2022-11-06 20:07:07 +00:00
Distiller 0e06185f43 [0.67.4] Bump version numbers 2022-03-18 00:48:59 +00:00
jonathanmosandAndrei Shikov abaf4d4af1 Fix Switch causing RetryableMountingLayerException (#32602)
Summary:
Added a null check to native.value in Switch to fix regression from RN 66 -> stuck operation in mViewCommandOperations list in Android Release on initial layout of a screen with Switch component. If approved, please incorporate this fix into an RN 66 release.

## Changelog
[Android][Fixed] - Added a null check to native.value in Switch to fix https://github.com/facebook/react-native/issues/32594

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

Test Plan: To reproduce, put a log in UIViewOperationQueue in dispatchViewUpdates you can see that the RetryableMountingException is no longer thrown for a screen with the Switch component on Android Release. As a result, mViewCommandOperations no longer has a stuck operation on initial layout.

Reviewed By: charlesbdudley

Differential Revision: D34397788

Pulled By: lunaleaps

fbshipit-source-id: 1cee3516fb987942dfa50ad1f2d11c965a947f05
2022-03-18 00:40:11 +00:00
Distiller b94a36ad8b [0.67.3] Bump version numbers 2022-02-22 14:36:52 +00:00
Alfonso CurbeloandAndrei Shikov 27fc80f3b9 Fixed - Text with adjustsFontSizeToFit changes the text layout infinitely (#33135)
Summary:
Fixes the infinite loop explained in the issue https://github.com/facebook/react-native/issues/33129 by reverting commit  59021521e7. PR https://github.com/facebook/react-native/pull/31538.

`onCollectExtraUpdates` is part of the node update cycle. By marking the node as updated `markUpdated()` in `onCollectExtraUpdates` we are restarting the update infinitely.

Unfortunately, reverting this PR also reintroduces the original issue https://github.com/facebook/react-native/issues/30717 which IMO is minor compared to the infinite loop.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Fixed] - Text with adjustsFontSizeToFit changes the text layout infinitely

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

Test Plan:
I added a console.log to the Text `onTextLayout` in [packages/rn-tester/js/examples/Text/TextAdjustsDynamicLayoutExample.js ](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Text/TextAdjustsDynamicLayoutExample.js) to see if the infinite loop is gone.

![image](https://user-images.githubusercontent.com/3791120/154523914-e6aa7cf5-7a1c-488f-a392-898f4c85a833.png)

![Screen Shot 2022-02-17 at 11 20 31 AM](https://user-images.githubusercontent.com/3791120/154524274-880c3bed-d2c6-456b-8947-42e75793c424.jpg)

```

Reviewed By: ShikaSD

Differential Revision: D34310218

Pulled By: lunaleaps

fbshipit-source-id: 0d40f49d15c562ec25983145897bd95dc182f897
2022-02-22 13:13:44 +00:00
Minsik KimandAndrei Shikov 1aca3d1cfe Fix a broken input for the Korean alphabet in TextInput (#32523)
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

Fix https://github.com/facebook/react-native/issues/32503

Updating the attributed text in TextView/TextField while inputting Korean language will break input mechanism of the Korean alphabet. This results unexpected text input.

This PR supersedes the previous fixes: https://github.com/facebook/react-native/issues/19809, https://github.com/facebook/react-native/issues/22546

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - Fix a broken input for the Korean alphabet in TextInput

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

Test Plan: https://user-images.githubusercontent.com/20317121/140013434-1674c391-54d6-4410-b4c1-c633697e639d.mov

Reviewed By: lunaleaps, sammy-SC

Differential Revision: D32470543

Pulled By: philIip

fbshipit-source-id: e7e34bd362fa2ab2ca579103db01ad8d1a891c35
2022-02-22 13:13:35 +00:00
Distiller da420c99ac [0.67.2] Bump version numbers 2022-01-31 17:17:27 +00:00
Elias NahumandAndrei Shikov 3a67c27ee1 Android: Fix crash when WindowInsets is null on ReactRootView (#32989)
Summary:
Fixes a potential crash was introduced by https://github.com/facebook/react-native/issues/30919 that aimed to get the keyboard height on devices with a Notch. The problem is that it considers that any ReactRootView will have an insets available.

When using [react-native-navigation](https://github.com/wix/react-native-navigation) and assigning a Navigation button to the TopBar as a component, the component gets registered as a RootView but won't have any insets attach to the view.

[getRootWindowInsets()](https://developer.android.com/reference/android/view/View#getRootWindowInsets()) in fact return a `WindowInset` only available if the view is attached, so when executing `checkForKeyboardEvents` method from ReactRootView, is trying to access the `DisplayCutout` of a null object, leading to a crash.

## Changelog

[Android] [Fixed] - Fix potential crash if ReactRootView does not have insets attached.

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

Test Plan:
Without the code change: Notice how the second screen being push contains a React Component on the top right of the navigation bar, and when component is unmounted (going back) the app crashes.

https://user-images.githubusercontent.com/6757047/151558235-39b9a8b5-be73-4c31-8053-02ce188637b8.mp4

crash log
```
2022-01-28 10:27:52.902 15600-15600/com.mattermost.rnbeta E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.mattermost.rnbeta, PID: 15600
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayCutout android.view.WindowInsets.getDisplayCutout()' on a null object reference
        at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.checkForKeyboardEvents(ReactRootView.java:778)
        at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.onGlobalLayout(ReactRootView.java:769)
        at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1061)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3214)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2143)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8665)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1037)
        at android.view.Choreographer.doCallbacks(Choreographer.java:845)
        at android.view.Choreographer.doFrame(Choreographer.java:780)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7839)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
```

After applying the patch which is only a null check validation and does not change any previous behavior

https://user-images.githubusercontent.com/6757047/151558429-9ff1a608-abb6-4168-8db9-df0c3c71d79e.mp4

Reviewed By: cortinico

Differential Revision: D33844955

Pulled By: ShikaSD

fbshipit-source-id: ed5579ad3afeed009c61cc1851eee45c70087cf5
2022-01-31 16:20:13 +00:00
owjsubandLorenzo Sciandra e896d21ced Android: upgrading OkHttp from 4.9.1 to 4.9.2 to fix CVE-2021-0341 (#32968)
Summary:
Security vulnerability CVE-2021-0341 is present in okhttp 4.9.1. Upgrading to 4.9.2 will resolve the issue.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-0341

## Changelog

[Android] [Security] - Upgraded okhttp to 4.9.2 to fix CVE-2021-0341

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

Test Plan: Upgrading okhttp 4.9.1 to 4.9.2 should be backwards compatible per https://github.com/square/okhttp/blob/master/CHANGELOG.md#version-492. Should be safe to merge if CircleCI tests pass.

Reviewed By: ShikaSD

Differential Revision: D33788131

Pulled By: cortinico

fbshipit-source-id: e9593a42a8e40a903ee6f529d94c82adcf5d0977

# Conflicts:
#	ReactAndroid/gradle.properties
2022-01-31 15:21:42 +00:00
AntoineDoubovetzkyandLorenzo Sciandra ac810c0a0c fix(jest/setup): fix circular dependencies in mockModal (#32964)
Summary:
Fixes https://github.com/facebook/react-native/issues/32939
It appears there is circular dependencies on the Modal component that causes the modalMock function to be an empty object. Removing the import fixes the issue.
I don't know yet why this is not happening when executing the test suite inside `Modal-test.js` but I will investigate this later.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fixed] - Fix error "mockModal is not a function"

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

Test Plan:
On a newly initiated project using react-native 0.67.1 I created a ModalComponent:
```
import React from 'react';
import {Modal, Text} from 'react-native';

export const ModalComponent = () => {
  return (
    <Modal visible>
      <Text>Test</Text>
    </Modal>
  );
};
```
and a ModalComponent.test.tsx:
```
import 'react-native';
import React from 'react';
import {ModalComponent} from '../ModalComponent';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
  renderer.create(<ModalComponent />);
});
```

Running the test throws the error "TypeError: mockModal is not a function".

After modifying the mockModal inside node_modules/react-native/jest/mockModal.js it works correctly.

Reviewed By: christophpurrer

Differential Revision: D33771136

Pulled By: lunaleaps

fbshipit-source-id: c09ada8d2f864f5568b3379616a6cace9fb9921e
2022-01-31 15:19:38 +00:00
Luna WeiandLorenzo Sciandra d9424878a8 Use CircleCI API to trigger releases (#32937)
Summary:
Changelog: [Internal]
* Refactor release automation so it doesn't use intermediate tags to trigger the release workflow. Now, we POST to CircleCI's ["trigger pipeline" API](https://circleci.com/docs/api/v2/#operation/triggerPipeline)
* This does have the con of needing to give CircleCI project permission for whoever wants to run a release as you'll need a token to trigger
* See related discussion: https://github.com/reactwg/react-native-releases/discussions/7#discussioncomment-1836420

Description of changes:
* Changes to config.yml allow us to use our POST data to trigger a certain workflow. There is no direct API to trigger a workflow, CircleCI only has an API to trigger pipelines, so the suggestion is to leverage conditionals: https://support.circleci.com/hc/en-us/articles/360050351292-How-to-trigger-a-workflow-via-CircleCI-API-v2
* Update `bump-oss-version` to make the api call -- the instructions for running a release are still the same: https://github.com/facebook/react-native/wiki/Release-Process#creating-0minor0-rc0
   * Would be good to make this a yarn script as tido64 mentioned
* Remove unused utilities now that we don't use intermediate tags like `publish-...`

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

Test Plan:
Have this on a Github branch and tried this out locally:

## Running release script
Running the bump-oss script (I had to hack it locally to be allowed to run on a non-release branch):
{F694804729}
* Link to resulting workflow: https://app.circleci.com/pipelines/github/facebook/react-native/11836 -- you can [verify that the parameters are the same as I passed](https://app.circleci.com/pipelines/github/facebook/react-native/11836/workflows/59ac0c86-5fe3-4d7a-80e9-c61129d49e9f/jobs/232388?invite=true#step-106-2)

## Other attempts triggering this workflow
Notice that when I tried to run it on an actual release-branch (0.67-stable) but because the `config.yml` changes aren't on that branch, the job faisl
| {F694804321} |

## Verifying the right workflows trigger on a regular push
* Notice that the workflows "analysis" and "test" are still triggered on push (ie, the `unless:` clause isn't messing things up)
{F694804320}

Reviewed By: sota000

Differential Revision: D33715336

Pulled By: lunaleaps

fbshipit-source-id: 82672d6d50768015bdfc9f4ea4d22aa801b84f06
2022-01-31 15:19:30 +00:00
Tommy NguyenandLorenzo Sciandra 983f0be334 fix(ios): fix Time.h patch not being applied (#32961)
Summary:
The path to `Time.h` is currently hard-coded and does not take into
consideration the `--project-directory` flag when running `pod install`.

## Changelog

[iOS] [Fixed] - Fix `Time.h` patch not being applied when running `pod install --project-directory=ios`

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

Test Plan:
```
git clone https://github.com/microsoft/react-native-test-app.git
cd react-native-test-app
npm run set-react-version main
yarn
cd example
pod install --project-directory=ios
../scripts/xcodebuild.sh ios/Example.xcworkspace build
```

Reviewed By: christophpurrer

Differential Revision: D33748789

Pulled By: lunaleaps

fbshipit-source-id: b125734eba30e552ae139e7ecd4e634c8fa1bcd7
2022-01-31 15:19:20 +00:00
Ian GraysonandLorenzo Sciandra 5590fd7092 fix: find-node.sh now respects .nvmrc (#32712)
Summary:
React-native Xcode build steps (such as "Build JS Bundle") rely on `find.node-sh` to find the correct node binary, using nvm if present. We do this because Xcode may run build steps in a fresh shell environment, presumably for repeatable builds.

This PR fixes `find-node.sh`, to respect any `.nvmrc` file that may be present in the build environment.

Today: `find-node.sh` will set the shell environment to the system node version, and ignores any `.nvmrc` the project may provide to pin node for repeatable builds. By ignoring `.nvmrc`, node versions may differ depending on system environment — between developer laptops, or between developer and CI environments. 😞

This problem has been been noticed before in https://github.com/facebook/react-native/issues/8887

### Should this fix happen upstream?

Unfortunately this nvm behavior [is intended](https://github.com/nvm-sh/nvm/issues/2053),  for backwards compatibility

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - find-node.sh now respects .nvmrc

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

Test Plan:
Before:
```bash
# nvm isn't loaded
$ which nvm

# we're on default system node
$ which node && node --version
/usr/local/bin/node
v17.0.1

$ echo v16.13.0 > .nvmrc
$ source ./scripts/find-node.sh

# Expected: v16.13.0
$ node --version
v17.0.1
```

After:
```bash
# we're on default system node
$ which node && node --version
/usr/local/bin/node
v17.0.1

$ echo v16.13.0 > .nvmrc
$ source ./scripts/find-node.sh

# Expected: v16.13.0
$ node --version
v16.13.0
```

After (no .nvmrc, should preserve previous behavior):
```bash
# we're on default system node
$ which node && node --version
/usr/local/bin/node
v17.0.1

$ source ./scripts/find-node.sh

$  nvm ls|grep default
default -> v14.17.1

# Expected: v14.17.1
$ node --version
v14.17.1
```

Reviewed By: sota000

Differential Revision: D32889629

Pulled By: ShikaSD

fbshipit-source-id: 527384055e303a87bad43413fb66a7fd117d1a63
2022-01-31 15:19:10 +00:00
Distiller 25f3d310d9 [0.67.1] Bump version numbers 2022-01-20 19:06:30 +00:00
Nicola CortiandLuna Wei 96ad60e3a1 Do not remove libjscexecutor.so from release builds (#32932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32932

As the title says, we dont' want to remove `libjscexecutor.so` when
baking release builds and having JSC enable as this leads to instacrashes.

Fixes #32928
Fixes #32927

Changelog:
[Android] [Fixed] - Do not remove libjscexecutor.so from release builds

Reviewed By: ShikaSD

Differential Revision: D33681932

fbshipit-source-id: 5b59fd1fb76c80c191198d65c916bbbd9232c75b
2022-01-20 10:42:38 -08:00
Asaf KoremandLuna Wei 218b4c19bb fix(iOS): remove alert's window when call to hide. (#32833)
Summary:
Resolves this issue: https://github.com/facebook/react-native/issues/32304.
**NOTE:** This PR is based on a prior PR for this fix: https://github.com/facebook/react-native/pull/32305, I've co-authorized its creator for this change (paddlefish).

Without this change, calling to hide an alert, leaves a `UIWindow` that blocks user interactions with the screen.

The correct way to remove a `UIWindow` in iOS is to set its hidden property to `YES`. Also, it is required to remove all references to the window (the associated `windowScene` for example) and ARC will automatically free this `UIWindow`.

The line after this change, set the `_alertWindow` reference to `nil`, but the window is already associated with a scene (see the screenshots from [this PR](https://github.com/facebook/react-native/pull/32305#discussion_r720521707)). So we also need to remove the `windowScene` from that window, as recommended by Apple: https://developer.apple.com/documentation/uikit/uiwindowscene/3198091-windows.
>To remove the window from the current scene, or move it to a different scene, change the value of the window's windowScene property.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - remove alert's window when call to `hide`.

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

Test Plan: See https://github.com/facebook/react-native/pull/32305

Reviewed By: hramos

Differential Revision: D33460430

Pulled By: lunaleaps

fbshipit-source-id: b13c2c7ee6404f1e1c787265bc4af8a31005bcf1
2022-01-20 10:42:28 -08:00
Distiller 857dbd9b20 [0.67.0] Bump version numbers 2022-01-18 22:12:57 +00:00
Luna Wei 900af2b3b6 TODO dummy commit 2022-01-18 14:04:47 -08:00
Luna Wei 842aac5a3c Update bump-oss-version.js to guide releaser through release actions (#32769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32769

Changelog: [Internal] Re-purpose bump-oss-version to guide releaser to correctly tag the release and trigger relevant CircleCI jobs

Reviewed By: sota000

Differential Revision: D33121691

fbshipit-source-id: 739f920cd9a04dfb436aff1abe9a05a51df4c32c
2022-01-18 13:08:45 -08:00
Luna Wei a59141fb28 Update comments in publish-npm and leverage isTaggedLatest
Summary:
Changelog: [Internal] Update the comments in publish-npm script to changes in release workflow and leverage `isTaggedLatest` utility.

A lot of this information will be moved to the Release wiki on Github

Reviewed By: ShikaSD

Differential Revision: D33110407

fbshipit-source-id: b01a555a3eed6e505a3b0ad220a0c2c54459ab03
2022-01-18 12:31:58 -08:00
Luna Wei e7296d6b34 Remove usages of bump-oss-version from generated scripts
Summary: Changelog: [Internal] - Update the source of the changes in generated files, no longer bump-oss-version but set-rn-version

Reviewed By: sota000

Differential Revision: D33110408

fbshipit-source-id: 8cd5004f5d40dde82fe4d6271d5b8598cd27ca31
2022-01-18 12:30:03 -08:00
Luna Wei 6fc004e95f Use tag to set publish version (#32757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32757

Changelog: [Internal] - Update release automation to still be manually triggered as from discussion: https://github.com/reactwg/react-native-releases/discussions/7

A releaser needs to do the following on a release branch like `0.99-stable`:
* For an initial release branch cut:
   * Tag the head of the branch `git tag publish-v0.99.0-rc.0`
   * `git push origin 0.99-stable --follow-tags`
* For cherry-picks on the pre-release:
   * Make the picks on `0.99-stable`
   * Tag the head of the branch `git tag publish-v0.99.0-rc.1`
   * `git push origin 0.99-stable --follow-tags`
* For promoting pre-release to stable with intention of making this the `latest` npm version:
   * Tag the head of the branch `git tag publish-v0.99.0`
   * Tag the head of the branch `git tag latest`
   * `git push origin 0.99-stable --follow-tags`

Follow-up diff to make this codified via a script

Reviewed By: sota000

Differential Revision: D33101594

fbshipit-source-id: 74b065229a3705fccbe1a25ed7ece4a28d9aa76d
2022-01-18 12:15:08 -08:00
Distiller c3aa86bea2 [0.67.0-rc.6] Bump version numbers 2021-12-14 19:32:53 +00:00
Simon FarshidandLuna Wei 22e4c8e1e7 Fix error when pod has no IPHONEOS_DEPLOYMENT_TARGET (#32746)
Summary:
Co-Authored-By: William Bell <williambell9708@outlook.com>

If one of the pods has no IPHONEOS_DEPLOYMENT_TARGET, the M1 postinstall workaround script fails. This commit updates the code to handle this special case.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - __apply_Xcode_12_5_M1_post_install_workaround failing when one of the Pods has no IPHONEOS_DEPLOYMENT_TARGET set

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

Test Plan: https://github.com/reactwg/react-native-releases/discussions/6#discussioncomment-1791520

Reviewed By: charlesbdudley

Differential Revision: D33063717

Pulled By: lunaleaps

fbshipit-source-id: f45bc47c85e42ffb5c37a277fbedd48a729ef5fb
2021-12-14 11:24:23 -08:00
Distiller 73afb97e89 [0.67.0-rc.5] Bump version numbers 2021-12-06 23:36:14 +00:00
Luna Wei f269c2d719 Fix workflow for automating version bumps
Summary: Changelog: [Internal] - Fix bugs in automate workflow

Reviewed By: cortinico, sota000

Differential Revision: D32810597

fbshipit-source-id: 13503fea871043224f673f2c5301804e1f4cf614
2021-12-06 15:27:17 -08:00
Luna Wei 1c73abbbb6 isTaggedVersion checks if the commit has a version tag on it
Summary: Changelog: [Internal] Add a `isTaggedVersion` function to filter out commits from release automation.

Reviewed By: sota000

Differential Revision: D32842035

fbshipit-source-id: 14bb262a1d2a96ffda87c759a3202c4f9a356141
2021-12-06 15:27:07 -08:00
Luna Wei 43eaf3cc37 Update CircleCI to auto-deploy release branch on push
Summary:
Changelog: [Internal] Update CircleCI to auto-deploy release branch on push

This work is part of an effort to automate the release process by using a push to a release branch as a trigger to prepare, package and deploy react-native to npm from CircleCI

The following diagram describes the context (what kind of releases we do, relevant scripts and what they do), the pre-existing process for the different types of release and how I've modified the process.
{F683387103}

This diff updates the relevant CircleCI workflows

Reviewed By: sota000

Differential Revision: D32702420

fbshipit-source-id: e20cdeb53eb4a8ce7e54e083e3e14bd89e11b789
2021-12-06 14:28:58 -08:00
Luna Wei 1de642af6a Extract logic from bump-oss-version specific to prod releases
Summary:
Changelog: [Internal] - Extract logic from bump-oss-version specific to prod releases

This work is part of an effort to automate the release process by using a push to a release branch as a trigger to prepare, package and deploy react-native to npm from CircleCI

The following diagram describes the context (what kind of releases we do, relevant scripts and what they do), the pre-existing process for the different types of release and how I've modified the process.
{F683387103}

This diff creates the `prepare-package-for-release` script referenced by extracting it out of `bump-oss-version` and leveraging `set-rn-version`. It adds some helper functions to `version-utils` with tests

Reviewed By: sota000

Differential Revision: D32556610

fbshipit-source-id: eb4ddc787498744156f985ab6d205c5d160e279b
2021-12-06 13:55:00 -08:00
Luna Wei c37a83e206 Extract release agnostic logic in bump-oss-version to set-rn-version
Summary:
Changelog: [Internal] Copy over universal (across dry-run, nightly, release) work in `bump-oss-version` script

This work is part of an effort to automate the release process by using a push to a release branch as a trigger to prepare, package and deploy react-native to npm from CircleCI

The following diagram describes the context (what kind of releases we do, relevant scripts and what they do), the pre-existing process for the different types of release and how I've modified the process.
{F683387103}

This diff creates the `set-rn-version` script referenced by extracting it out of `bump-oss-version`

Reviewed By: sota000

Differential Revision: D32556608

fbshipit-source-id: 6c2868c01ddd930375279a5105bcd0d447f65734
2021-12-06 13:54:49 -08:00
Luna Wei 9faa42ed7c Add getNextVersionFromTags
Summary:
Changelog: [Internal] - Add getNextVersionFromTags to determine next release version off a release branch

In more detail - this work is part of an effort to automate the release process by using a push to a release branch as a trigger to prepare, package and deploy react-native to npm from CircleCI

This function is later used in `prepare-package-for-release` script in D32556610 to bump the version

Reviewed By: cortinico, ShikaSD

Differential Revision: D32556609

fbshipit-source-id: 7d93ead0b34318a58ffeb876715fbd34d6041f4e
2021-12-06 13:54:25 -08:00
Simon FarshidandLuna Wei 87592fb5ca Fix post_install_workaround downgrading development targets (#32633)
Summary:
The `__apply_Xcode_12_5_M1_post_install_workaround` script changes the `IPHONEOS_DEPLOYMENT_TARGET` to `11.0` for all pods. This causes problems if the pods were targetting `12.0` or higher. Many expo modules are targetting `12.0`.

I fixed this issue by checking the existing version and only bumping the target if it is lower than `11.0`.

See also: this discussion post by mikehardy https://github.com/reactwg/react-native-releases/discussions/1#discussioncomment-1619523

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - __apply_Xcode_12_5_M1_post_install_workaround causing pods targetting iOS 12 and above to fail

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

Test Plan:
### Test (failing before this patch, passing after this patch)

1. pick an iOS Pod that has a minimum deployment target of iOS 12 or higher, I chose the Braintree package
2. `npx react-native init myrnapp`
3. Open `ios/Podfile` and add the pod as a dependency: `pod 'Braintree', '~> 5'` (and upgrade the Podfile target to 12 (`platform :ios, '12.0'`))
4. Compile the app.

Before applying this patch:  Build fails because Braintree uses iOS 12 features and was downgraded to target 11.0
After applying this patch:  Build succeeds

Reviewed By: fkgozali

Differential Revision: D32638171

Pulled By: philIip

fbshipit-source-id: 0487647583057f3cfefcf515820855c7d4b16d31
2021-12-06 13:52:04 -08:00
Luna Wei a510c2733f Revert "Bump package version for Hermes on iOS"
This reverts commit 02cc3d329b.
2021-12-06 13:50:39 -08:00
Luna Wei 16a16cf361 Revert "Bump package version for Hermes on Android"
This reverts commit 0150836ea8.
2021-12-06 13:50:27 -08:00
Luna Wei cd8fa9d3e8 [0.67.0-rc.4] Bump version numbers 2021-11-30 12:39:30 -08:00
Neil DharandLuna Wei 02cc3d329b Bump package version for Hermes on iOS
Summary:
allow-large-files

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D32416407

fbshipit-source-id: 7f7c7c4b25afe9d3852034958b57a45004e859a7
2021-11-30 11:59:57 -08:00
Neil DharandLuna Wei 0150836ea8 Bump package version for Hermes on Android
Summary:
Hermes 0.10.0 has been cut and released.

Changelog: [Internal]

allow-large-files

Reviewed By: lunaleaps

Differential Revision: D32416408

fbshipit-source-id: e61903ceca9a618cc06b5cc2a9666bc3b55656ef
2021-11-30 09:52:16 -08:00
Saad NajmiandLuna Wei 5f07417121 Revert "Fix Deadlock in RCTi18nUtil (iOS) (#31032)" (#32574)
Summary:
This reverts commit fcead14b0e.

This should close https://github.com/facebook/react-native/issues/32509 . There was a bug where il8nManager.forceRTL() wouldn't work on app launch, and required an app restart. That was caused by an earlier change (https://github.com/facebook/react-native/pull/31032) which should not be necessary (the deadlock it was attempting to fix was actually caused by separate code).

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - Fixed bug where forceRTL did not work on app launch

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

Test Plan: Simple revert back to previously working code.

Reviewed By: RSNara

Differential Revision: D32315034

Pulled By: GijsWeterings

fbshipit-source-id: dae6c1f0a2481e53f2f1e80f1ac083947681ef99
2021-11-30 09:52:05 -08:00
Luna Wei 636f4c76b0 Revert "Quote --sourcemap-output argument during ios build (#31587)"
This reverts commit f3fe7a0fb5.
2021-11-30 09:51:47 -08:00
Luna Wei 209bb94b9f [0.67.0-rc.3] Bump version numbers 2021-11-10 10:12:43 -08:00
Tim YungandLuna Wei 4ad177efc7 RN: Rename Keyboard.remove{Event =>}Listener
Summary:
Renames `Keyboard.removeEventListener` to `Keyboard.removeListener`.

When I implemented the compatibility layer in {D26589441 (https://github.com/facebook/react-native/commit/035718ba97bb44c68f2a4ccdd95e537e3d28690c)}, I accidentally used the wrong name. Since `Keyboard.removeEventListener` was always deprecated, this removes it completely.

Changelog:
[General][Changed] - Rename deprecated `Keyboard.removeEventListener` to `Keyboard.removeListener`.

Reviewed By: lunaleaps

Differential Revision: D32282743

fbshipit-source-id: 309382af3269f85f781d38367d115a2ce3690efb
2021-11-09 23:21:25 -08:00
Rubén NorteandLuna Wei f7a23a52a0 Revert changes in RN preprocessor
Summary: Changelog: [General][Fixed] Revert changes in Jest preprocessor to fix tests in external projects

Reviewed By: yungsters

Differential Revision: D32250044

fbshipit-source-id: 0ed4c9f7bcfa82349b5c2ec7af2ccda970bbb0ef
2021-11-09 23:21:13 -08:00
Luna Wei 6db77b68c8 Fix formatting on version-utils-test 2021-11-05 15:58:29 -07:00
Luna Wei 0eadbe7a9a Fix npm latest tag issue when releasing patches (#32543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32543

Changelog: [Internal] Fix npm `latest` tag issue that occurs when we release a patch on an older minor version

Context:
* There are two types of tags, git and npm, they are unrelated.

* When we publish a stable release, we set the git tag `latest`. This logic is faulty when we release a patch to an older version.

* When publishing a package to npm, if you don't provide an explicit tag, the `latest` tag will be applied -- at least that's how I've understood the [docs here](https://docs.npmjs.com/cli/v7/commands/npm-dist-tag#description). This again is faulty logic when we release a patch to an older version.

* npm and git's `latest` tag should always point to our most recent stable version

This change:
* Introduces a `--latest` flag for `bump-oss-script` that will indicate that the release we're running (either a stable or pre-release) should really be considered "latest"
* If the version is not a pre-release and the `--latest` flag is set, we will set the git `latest` tag
* Later, in the circleCI job that we use to publish the npm package, we will see if the current commit is git-tagged as `latest`. If it is, then we'll explicitly tell npm to use `latest` tag but most importantly, if it's not, we'll set a tag of the form `{major}.{minor}-stable`.
* This type of tag (ex. `0.66-stable`) is new and the intention is that it will always point to latest of that minor version.

Reviewed By: hramos

Differential Revision: D32196239

fbshipit-source-id: 4c881851eebcad8585732ff0c07322413ac46ce5
2021-11-05 15:26:24 -07:00
Luna Wei 20918b9911 Clean up publish-npm.js and use parseVersion
Summary:
Changelog: [Internal] Remove unnecessary logic and new parseVersions function

Changes:
* Remove `tagsForVersions` which in the past got all the tags for the `currentCommit` to figure out which one we're releasing to. I believe this is redundant because the CircleCI envvar `CIRCLE_TAG` should already have the version that we're releasing -- this is set in `bump-oss-version`. Note: this will only be set for full-on releases, (re: not nightly or commitly)
* Re-arrange some logic to group where we set `releaseVersion` and separate where we call `bump-oss-version` script for dryRun (commitly) && nightly builds

Reviewed By: hramos

Differential Revision: D32196237

fbshipit-source-id: 10f21f71bad1ea0496c5eb9094271cc4454a2544
2021-11-05 15:25:51 -07:00
Luna Wei 2726b89f14 Extract version parsing from release script
Summary: Changelog: [Internal] - extract logic for parsing version in bump-oss-version and add tests

Reviewed By: cortinico

Differential Revision: D32196238

fbshipit-source-id: 6ea7af3d282eea1d876118f056bca94a151e6182
2021-11-05 15:24:02 -07:00
Lorenzo SciandraandLuna Wei 218b9cd97c [LOCAL] reintroduce generated codegen files 2021-11-05 15:21:57 -07:00
Luna Wei a7d3ffee55 [0.67.0-rc.2] Bump version numbers 2021-10-25 14:00:47 -07:00
Luna Wei eede05c91b Add back Xcode_12_5_M1_post_install_workaround
Summary: Changelog: [Internal] Add back Xcode_12_5_M1_post_install_workaround workaround

Reviewed By: sota000

Differential Revision: D31902449

fbshipit-source-id: 5c9d962d0d1a55a9f14186bd7d6d8fe087101f0d
2021-10-25 12:59:54 -07:00
Tuomas JaakolaandLuna Wei abe9633b42 Load jsc or hermes lib in static method (#30749)
Summary:
Many have reported about the misguiding error `Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so` even though they don't use Hermes (for example issues https://github.com/facebook/react-native/issues/26075 #25923).

**The current code does not handle errors correctly when loading JSC or Hermes in `ReactInstanceManagerBuilder`**.

**ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java:**
```java
try {
  return new HermesExecutorFactory();
} catch (UnsatisfiedLinkError hermesE) {
  // We never get here because "new HermesExecutorFactory()" does not throw an exception!
  hermesE.printStackTrace();
  throw jscE;
}
```

In Java, when an exception is thrown in static block, it will be RuntimeException and it can't be caught. For example the exception from `SoLoader.loadLibrary` can't be caught and it will crash the app.

**ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java:**
```java
static {
  // Exception from this code block will be RuntimeException and it can't be caught!
  SoLoader.loadLibrary("hermes");
  try {
    SoLoader.loadLibrary("hermes-executor-debug");
    mode_ = "Debug";
  } catch (UnsatisfiedLinkError e) {
    SoLoader.loadLibrary("hermes-executor-release");
    mode_ = "Release";
  }
}
```

This PR fixes the code so that the original exception from failed JSC loading is not swallowed. It does not fix the original issue why JSC loading is failing with some devices, but it can be really helpful to know what the real error is. For example Firebase Crashlytics shows wrong stack trace with current code.

I'm sure that this fix could have been written better. It feels wrong to import `JSCExecutor` and `HermesExecutor` in `ReactInstanceManagerBuilder.java`. However, the main point of this PR is to give the idea what is wrong with the current code.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Fixed] - Fix error handling when loading JSC or Hermes

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

Test Plan:
* from this PR, modify  `ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.java` so that JSC loading will fail:
```java
// original
SoLoader.loadLibrary("jscexecutor");
// changed
SoLoader.loadLibrary("jscexecutor-does-not-exist");
```
* Run `rn-tester` app
* Check from Logcat that the app crashed with correct exception and stacktrace. It should **not** be `java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so`

Tested with Hermes

```
    SoLoader.loadLibrary("hermes-executor-test");
```
Got this one in logcat
```
09-24 20:12:39.552  6412  6455 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-executor-test.so
```

Reviewed By: cortinico

Differential Revision: D30346032

Pulled By: sota000

fbshipit-source-id: 09b032a9e471af233b7ac90b571c311952ab6342
2021-10-25 12:59:22 -07:00
Luna Wei f6895e9b53 [0.67.0-rc.1] Bump version numbers 2021-10-22 14:30:08 -07:00
Gustavo Sverzut BarbieriandLuna Wei 8c2a667e26 iOS Ruby Updates (#32456)
Summary:
Fix the `scripts/update-ruby.sh` so it always use the correct [bundle config](https://bundler.io/man/bundle-config.1.html#DESCRIPTION). In the current version it wasn't using the correct configuration inside the `template/` directory, resulting in incorrect platform for `template/Gemfile.lock`.

While at that, update the gems to their latest version:
- ethon 0.14.0 -> 0.15.0
- json 0.5.1 -> 0.6.0
- zeitwerk 2.4.2 -> 2.5.1
- bundler 2.2.28 -> 2.2.29

No changelog

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

Test Plan:
Run `bump-oss-version.js` and see `template/Gemfile.lock` lists `ruby` as the `PLATFORM` (no diff in that line).

 - https://github.com/facebook/react-native/commit/e18cf90d71d0bef2e2a0caf30a89e53129152965#r58230816

Reviewed By: yungsters

Differential Revision: D31841524

Pulled By: charlesbdudley

fbshipit-source-id: 695c245fcb344c866afed45f747e04233e5c91e4
2021-10-22 12:57:31 -07:00
Kevin Gozali 007317128d OSS CI: Store bundle size info for release branch as well (#32418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32418

This commit does 2 things:
* Process and store stats for *-stable branches, in addition to main
* Print out the new stats to stdout, so that CI jobs can display them for verification purpose

This also means a new field `branch` is used for the Firestore data.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D31717251

fbshipit-source-id: 9dbfa8fb8f0243c013dcd822230400d26c09eaa4
2021-10-18 20:09:52 -07:00
Luna Wei e18cf90d71 [0.67.0-rc.0] Bump version numbers 2021-10-16 14:08:10 -07:00
Kevin Gozali 07c454b2d2 OSS CI: skip bundle size reporting for *-stable branches
Summary:
The size information is currently not used for release branches. Further, the CI step failed because there is no PR associated with commits in RC branch. This commit fixed that error by skipping the entire work altogether.

Sample error: https://app.circleci.com/pipelines/github/facebook/react-native/10161/workflows/3625732a-531f-435d-83b6-1dbc638e1bab/jobs/215405/parallel-runs/0/steps/0-125

In theory, we should be storing RC bundle sizes as well, but the current backing Firebase DB has not been configured with proper index:

```
Error [FirebaseError]: The query requires an index.

...
```

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D31705912

fbshipit-source-id: 26757174f7937cb23d8e55066b833ae15ec011e3
2021-10-15 18:06:43 -07:00
54 changed files with 6375 additions and 1144 deletions
+59 -1
View File
@@ -710,6 +710,25 @@ jobs:
# -------------------------
# JOBS: Releases
# -------------------------
prepare_package_for_release:
parameters:
version:
type: string
latest:
type: boolean
default: false
executor: reactnativeios
steps:
- checkout
- run_yarn
- add_ssh_keys:
fingerprints:
- "1c:98:e0:3a:52:79:95:29:12:cd:b4:87:5b:41:e2:bb"
- run:
name: "Set new react-native version and commit changes"
command: |
node ./scripts/prepare-package-for-release.js -v << parameters.version >> -l << parameters.latest >>
build_npm_package:
parameters:
publish_npm_args:
@@ -774,13 +793,35 @@ jobs:
command: |
echo "Nightly build run"
# -------------------------
# PIPELINE PARAMETERS
# -------------------------
parameters:
run_package_release_workflow_only:
default: false
type: boolean
release_latest:
default: false
type: boolean
release_version:
default: "9999"
type: string
# -------------------------
# WORK FLOWS
#
# When creating a new workflow, make sure to include condition `unless: << pipeline.parameters.run_package_release_workflow_only >>`
# It's setup this way so we can trigger a release via a POST
# See limitations: https://support.circleci.com/hc/en-us/articles/360050351292-How-to-trigger-a-workflow-via-CircleCI-API-v2
# -------------------------
workflows:
version: 2
tests:
unless: << pipeline.parameters.run_package_release_workflow_only >>
jobs:
- test_js:
run_disabled_tests: false
@@ -841,11 +882,26 @@ workflows:
ignore: gh-pages
run_disabled_tests: false
releases:
# This workflow should only be triggered by release script
package_release:
when: << pipeline.parameters.run_package_release_workflow_only >>
jobs:
# This job will trigger publish_release workflow
- prepare_package_for_release:
name: prepare_package_for_release
version: << pipeline.parameters.release_version >>
latest : << pipeline.parameters.release_latest >>
publish_release:
unless: << pipeline.parameters.run_package_release_workflow_only >>
jobs:
# This job will trigger when a version tag is pushed (by package_release)
- build_npm_package:
name: build_and_publish_npm_package
publish_npm_args: --release
# CircleCI filters are OR-ed, with all branches triggering by default and tags excluded by default
# CircleCI env-vars are only set with the branch OR tag that triggered the job, not both.
# In this case, CIRCLE_BRANCH is unset, but CIRCLE_TAG is set
filters:
# Both of the following conditions must be included!
# Ignore any commit on any branch by default.
@@ -867,6 +923,7 @@ workflows:
ignore: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
analysis:
unless: << pipeline.parameters.run_package_release_workflow_only >>
jobs:
# Run lints on every commit other than those to the gh-pages branch
- analyze_code:
@@ -887,6 +944,7 @@ workflows:
ignore: gh-pages
nightly:
unless: << pipeline.parameters.run_package_release_workflow_only >>
triggers:
- schedule:
cron: "0 20 * * *"
-1
View File
@@ -105,7 +105,6 @@ package-lock.json
!/packages/rn-tester/Pods/__offline_mirrors__
# react-native-codegen
/React/FBReactNativeSpec/FBReactNativeSpec
/packages/react-native-codegen/lib
/ReactCommon/react/renderer/components/rncore/
/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec*
+20 -20
View File
@@ -1,25 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.4)
CFPropertyList (3.0.5)
rexml
activesupport (6.1.4.1)
activesupport (6.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.3)
cocoapods (1.11.2)
claide (1.1.0)
cocoapods (1.11.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.2)
cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -34,7 +34,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.2)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
@@ -45,7 +45,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
@@ -54,38 +54,38 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
escape (0.0.4)
ethon (0.14.0)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.4)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.10)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.5.1)
minitest (5.14.4)
json (2.6.2)
minitest (5.16.3)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
rexml (3.2.5)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.4.2)
zeitwerk (2.6.5)
PLATFORMS
ruby
@@ -97,4 +97,4 @@ RUBY VERSION
ruby 2.7.4p191
BUNDLED WITH
2.2.28
2.2.27
+2 -2
View File
@@ -141,9 +141,9 @@ class Keyboard {
}
/**
* @deprecated Use `remove` on the EventSubscription from `addEventListener`.
* @deprecated Use `remove` on the EventSubscription from `addListener`.
*/
removeEventListener<K: $Keys<KeyboardEventDefinitions>>(
removeListener<K: $Keys<KeyboardEventDefinitions>>(
eventType: K,
listener: (...$ElementType<KeyboardEventDefinitions, K>) => mixed,
): void {
@@ -11,12 +11,12 @@
'use strict';
import * as React from 'react';
import ScrollView from '../ScrollView';
import * as ReactNativeTestTools from '../../../Utilities/ReactNativeTestTools';
import ReactTestRenderer from 'react-test-renderer';
import View from '../../View/View';
import Text from '../../../Text/Text';
const React = require('react');
const ScrollView = require('../ScrollView');
const ReactNativeTestTools = require('../../../Utilities/ReactNativeTestTools');
const ReactTestRenderer = require('react-test-renderer');
const View = require('../../View/View');
const Text = require('../../../Text/Text');
describe('<ScrollView />', () => {
it('should render as expected', () => {
+2 -1
View File
@@ -170,7 +170,8 @@ const SwitchWithForwardedRef: React.AbstractComponent<
// that the update should be ignored and we should stick with the value
// that we have in JS.
const jsValue = value === true;
const shouldUpdateNativeSwitch = native.value !== jsValue;
const shouldUpdateNativeSwitch =
native.value != null && native.value !== jsValue;
if (
shouldUpdateNativeSwitch &&
nativeSwitchRef.current?.setNativeProps != null
+4 -4
View File
@@ -1,17 +1,17 @@
/**
* @generated by scripts/set-rn-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @generated by scripts/bump-oss-version.js
* @flow strict
*/
exports.version = {
major: 0,
minor: 0,
patch: 0,
minor: 67,
patch: 5,
prerelease: null,
};
@@ -10,12 +10,13 @@
*/
import type {PressEvent} from '../../Types/CoreEventTypes';
import * as HoverState from '../HoverState';
import Pressability from '../Pressability';
import invariant from 'invariant';
import nullthrows from 'nullthrows';
import Platform from '../../Utilities/Platform';
import UIManager from '../../ReactNative/UIManager';
const HoverState = require('../HoverState');
const Pressability = require('../Pressability').default;
const invariant = require('invariant');
const nullthrows = require('nullthrows');
const Platform = require('../../Utilities/Platform');
const UIManager = require('../../ReactNative/UIManager');
// TODO: Move this util to a shared location.
function getMock<TArguments: $ReadOnlyArray<mixed>, TReturn>(
@@ -147,21 +147,7 @@ static UIColor *defaultPlaceholderColor()
- (void)setAttributedText:(NSAttributedString *)attributedText
{
// Using `setAttributedString:` while user is typing breaks some internal mechanics
// when entering complex input languages such as Chinese, Korean or Japanese.
// see: https://github.com/facebook/react-native/issues/19339
// We try to avoid calling this method as much as we can.
// If the text has changed, there is nothing we can do.
if (![super.attributedText.string isEqualToString:attributedText.string]) {
[super setAttributedText:attributedText];
} else {
// But if the text is preserved, we just copying the attributes from the source string.
if (![super.attributedText isEqualToAttributedString:attributedText]) {
[self copyTextAttributesFrom:attributedText];
}
}
[super setAttributedText:attributedText];
[self textDidChange];
}
@@ -311,18 +297,4 @@ static UIColor *defaultPlaceholderColor()
#pragma mark - Utility Methods
- (void)copyTextAttributesFrom:(NSAttributedString *)sourceString
{
[self.textStorage beginEditing];
NSTextStorage *textStorage = self.textStorage;
[sourceString enumerateAttributesInRange:NSMakeRange(0, sourceString.length)
options:NSAttributedStringEnumerationReverse
usingBlock:^(NSDictionary<NSAttributedStringKey,id> * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) {
[textStorage setAttributes:attrs range:range];
}];
[self.textStorage endEditing];
}
@end
@@ -104,6 +104,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
// Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
// text that we should disregard. See https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc
// for more info.
// Also, updating the attributed text while inputting Korean language will break input mechanism.
// If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in NSOriginalFont.
// Lastly, when entering a password, etc., there will be additional styling on the field as the native text view
// handles showing the last character for a split second.
@@ -116,6 +117,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
BOOL shouldFallbackToBareTextComparison =
[self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] ||
[self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] ||
self.backedTextInputView.markedTextRange ||
self.backedTextInputView.isSecureTextEntry ||
fontHasBeenUpdatedBySystem;
+6 -6
View File
@@ -1,5 +1,5 @@
/**
* @generated by scripts/bump-oss-version.js
* @generated by scripts/set-rn-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
@@ -21,11 +21,11 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(0),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
};
RCTVersionMajor: @(0),
RCTVersionMinor: @(67),
RCTVersionPatch: @(5),
RCTVersionPrerelease: [NSNull null],
};
});
return __rnVersion;
}
+6
View File
@@ -35,6 +35,12 @@
- (void)hide
{
[_alertWindow setHidden:YES];
if (@available(iOS 13, *)) {
_alertWindow.windowScene = nil;
}
_alertWindow = nil;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -580,8 +580,9 @@ using namespace facebook::react;
// the settings on a dictation.
// Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
// text that we should disregard. See
// https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info. If
// the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
// https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info.
// Also, updating the attributed text while inputting Korean language will break input mechanism.
// If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
// NSOriginalFont. Lastly, when entering a password, etc., there will be additional styling on the field as the native
// text view handles showing the last character for a split second.
__block BOOL fontHasBeenUpdatedBySystem = false;
@@ -596,6 +597,7 @@ using namespace facebook::react;
BOOL shouldFallbackToBareTextComparison =
[_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] ||
[_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] ||
_backedTextInputView.markedTextRange || _backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem;
if (shouldFallbackToBareTextComparison) {
+6 -14
View File
@@ -18,19 +18,11 @@
+ (instancetype)sharedInstance;
- (BOOL)isRTL;
/**
* Should be used very early during app start up
* Before the bridge is initialized
*/
@property (atomic, setter=allowRTL:) BOOL isRTLAllowed;
/**
* Could be used to test RTL layout with English
* Used for development and testing purpose
*/
@property (atomic, setter=forceRTL:) BOOL isRTLForced;
@property (atomic, setter=swapLeftAndRightInRTL:) BOOL doLeftAndRightSwapInRTL;
- (BOOL)isRTLAllowed;
- (void)allowRTL:(BOOL)value;
- (BOOL)isRTLForced;
- (void)forceRTL:(BOOL)value;
- (BOOL)doLeftAndRightSwapInRTL;
- (void)swapLeftAndRightInRTL:(BOOL)value;
@end
+47 -1
View File
@@ -18,7 +18,6 @@
dispatch_once(&onceToken, ^{
sharedInstance = [self new];
[sharedInstance swapLeftAndRightInRTL:true];
[sharedInstance allowRTL:true];
});
return sharedInstance;
@@ -41,6 +40,53 @@
return NO;
}
/**
* Should be used very early during app start up
* Before the bridge is initialized
* @return whether the app allows RTL layout, default is true
*/
- (BOOL)isRTLAllowed
{
NSNumber *value = [[NSUserDefaults standardUserDefaults] objectForKey:@"RCTI18nUtil_allowRTL"];
if (value == nil) {
return YES;
}
return [value boolValue];
}
- (void)allowRTL:(BOOL)rtlStatus
{
[[NSUserDefaults standardUserDefaults] setBool:rtlStatus forKey:@"RCTI18nUtil_allowRTL"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
/**
* Could be used to test RTL layout with English
* Used for development and testing purpose
*/
- (BOOL)isRTLForced
{
BOOL rtlStatus = [[NSUserDefaults standardUserDefaults] boolForKey:@"RCTI18nUtil_forceRTL"];
return rtlStatus;
}
- (void)forceRTL:(BOOL)rtlStatus
{
[[NSUserDefaults standardUserDefaults] setBool:rtlStatus forKey:@"RCTI18nUtil_forceRTL"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
- (BOOL)doLeftAndRightSwapInRTL
{
return [[NSUserDefaults standardUserDefaults] boolForKey:@"RCTI18nUtil_makeRTLFlipLeftAndRightStyles"];
}
- (void)swapLeftAndRightInRTL:(BOOL)value
{
[[NSUserDefaults standardUserDefaults] setBool:value forKey:@"RCTI18nUtil_makeRTLFlipLeftAndRightStyles"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
// Check if the current device language is RTL
- (BOOL)isDevicePreferredLanguageRTL
{
+2 -2
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-main
VERSION_NAME=0.67.5
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -12,7 +12,7 @@ JUNIT_VERSION=4.12
ANDROIDX_TEST_VERSION=1.1.0
FRESCO_VERSION=2.5.0
OKHTTP_VERSION=4.9.1
OKHTTP_VERSION=4.9.2
SO_LOADER_VERSION=0.10.1
BOOST_VERSION=1_63_0
@@ -16,14 +16,20 @@ public class HermesExecutor extends JavaScriptExecutor {
private static String mode_;
static {
// libhermes must be loaded explicitly to invoke its JNI_OnLoad.
SoLoader.loadLibrary("hermes");
try {
SoLoader.loadLibrary("hermes-executor-debug");
mode_ = "Debug";
} catch (UnsatisfiedLinkError e) {
SoLoader.loadLibrary("hermes-executor-release");
mode_ = "Release";
loadLibrary();
}
public static void loadLibrary() throws UnsatisfiedLinkError {
if (mode_ == null) {
// libhermes must be loaded explicitly to invoke its JNI_OnLoad.
SoLoader.loadLibrary("hermes");
try {
SoLoader.loadLibrary("hermes-executor-debug");
mode_ = "Debug";
} catch (UnsatisfiedLinkError e) {
SoLoader.loadLibrary("hermes-executor-release");
mode_ = "Release";
}
}
}
@@ -14,6 +14,7 @@ import android.app.Activity;
import android.app.Application;
import android.content.Context;
import androidx.annotation.Nullable;
import com.facebook.hermes.reactexecutor.HermesExecutor;
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.JSBundleLoader;
@@ -28,6 +29,7 @@ import com.facebook.react.devsupport.DevSupportManagerFactory;
import com.facebook.react.devsupport.RedBoxHandler;
import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener;
import com.facebook.react.devsupport.interfaces.DevSupportManager;
import com.facebook.react.jscexecutor.JSCExecutor;
import com.facebook.react.jscexecutor.JSCExecutorFactory;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
import com.facebook.react.packagerconnection.RequestHandler;
@@ -347,7 +349,7 @@ public class ReactInstanceManagerBuilder {
try {
// If JSC is included, use it as normal
initializeSoLoaderIfNecessary(applicationContext);
SoLoader.loadLibrary("jscexecutor");
JSCExecutor.loadLibrary();
return new JSCExecutorFactory(appName, deviceName);
} catch (UnsatisfiedLinkError jscE) {
// https://github.com/facebook/hermes/issues/78 shows that
@@ -365,6 +367,7 @@ public class ReactInstanceManagerBuilder {
// Otherwise use Hermes
try {
HermesExecutor.loadLibrary();
return new HermesExecutorFactory();
} catch (UnsatisfiedLinkError hermesE) {
// If we get here, either this is a JSC build, and of course
@@ -26,6 +26,7 @@ import android.view.Surface;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
@@ -775,9 +776,12 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
getRootView().getWindowVisibleDisplayFrame(mVisibleViewArea);
int notchHeight = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
DisplayCutout displayCutout = getRootView().getRootWindowInsets().getDisplayCutout();
if (displayCutout != null) {
notchHeight = displayCutout.getSafeInsetTop();
WindowInsets insets = getRootView().getRootWindowInsets();
if (insets != null) {
DisplayCutout displayCutout = insets.getDisplayCutout();
if (displayCutout != null) {
notchHeight = displayCutout.getSafeInsetTop();
}
}
}
final int heightDiff =
@@ -14,8 +14,13 @@ import com.facebook.react.bridge.ReadableNativeMap;
import com.facebook.soloader.SoLoader;
@DoNotStrip
/* package */ class JSCExecutor extends JavaScriptExecutor {
/* package */ public class JSCExecutor extends JavaScriptExecutor {
static {
loadLibrary();
}
public static void loadLibrary() throws UnsatisfiedLinkError {
SoLoader.loadLibrary("jscexecutor");
}
@@ -1,5 +1,5 @@
/**
* @generated by scripts/bump-oss-version.js
* @generated by scripts/set-rn-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
@@ -16,7 +16,7 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 0,
"minor", 0,
"patch", 0,
"minor", 67,
"patch", 5,
"prerelease", null);
}
@@ -343,11 +343,6 @@ public class ReactTextShadowNode extends ReactBaseTextShadowNode {
mJustificationMode);
uiViewOperationQueue.enqueueUpdateExtraData(getReactTag(), reactTextUpdate);
}
if (mAdjustsFontSizeToFit) {
// Nodes with `adjustsFontSizeToFit` enabled need to be remeasured on every relayout.
markUpdated();
}
}
@ReactProp(name = "onTextLayout")
+4 -4
View File
@@ -30,8 +30,8 @@ rn_prebuilt_jar(
fb_native.remote_file(
name = "okhttp3-binary.jar",
sha1 = "51215279c3fe472c59b6b7dd7491e6ac2e28a81b",
url = "mvn:com.squareup.okhttp3:okhttp:jar:4.9.1",
sha1 = "5302714ee9320b64cf65ed865e5f65981ef9ba46",
url = "mvn:com.squareup.okhttp3:okhttp:jar:4.9.2",
)
rn_prebuilt_jar(
@@ -41,6 +41,6 @@ rn_prebuilt_jar(
fb_native.remote_file(
name = "okhttp3-urlconnection-binary.jar",
sha1 = "f45e809215bd0961350148cf5b78707865084e6f",
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:4.9.1",
sha1 = "3b9e64d3d56370bc7488ed8b336d17a8013cb336",
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:4.9.2",
)
+3 -3
View File
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated by scripts/bump-oss-version.js
* @generated by scripts/set-rn-version.js
*/
#pragma once
@@ -16,8 +16,8 @@ namespace facebook::react {
constexpr struct {
int32_t Major = 0;
int32_t Minor = 0;
int32_t Patch = 0;
int32_t Minor = 67;
int32_t Patch = 5;
std::string_view Prerelease = "";
} ReactNativeVersion;
+6 -2
View File
@@ -92,12 +92,14 @@ function getBinarySizesCollection(db) {
* @param {firebase.firestore.CollectionReference<firebase.firestore.DocumentData>} collection
* @param {string} sha The Git SHA used to identify the entry
* @param {firebase.firestore.UpdateData} data The data to be inserted/updated
* @param {string} branch The Git branch where this data was computed for
* @returns {Promise<void>}
*/
function createOrUpdateDocument(collectionRef, sha, data) {
function createOrUpdateDocument(collectionRef, sha, data, branch) {
const stampedData = {
...data,
timestamp: firestore.Timestamp.now(),
branch,
};
const docRef = firestore.doc(collectionRef, sha);
return firestore.updateDoc(docRef, stampedData).catch(async error => {
@@ -115,14 +117,16 @@ function createOrUpdateDocument(collectionRef, sha, data) {
* Returns the latest document in collection.
*
* @param {firebase.firestore.CollectionReference<firebase.firestore.DocumentData>} collection
* @param {string} branch The Git branch for the data
* @returns {Promise<firebase.firestore.DocumentData | undefined>}
*/
async function getLatestDocument(collectionRef) {
async function getLatestDocument(collectionRef, branch) {
try {
const querySnapshot = await firestore.getDocs(
firestore.query(
collectionRef,
firestore.orderBy('timestamp', 'desc'),
firestore.where('branch', '==', branch),
firestore.limit(1),
),
);
+67 -45
View File
@@ -25,7 +25,7 @@ const datastore = require('./datastore');
const {createOrUpdateComment} = require('./make-comment');
/**
* Generates and submits a comment. If this is run on main branch, data is
* Generates and submits a comment. If this is run on the main or release branch, data is
* committed to the store instead.
* @param {{
'android-hermes-arm64-v8a'?: number;
@@ -47,7 +47,7 @@ async function reportSizeStats(stats, replacePattern) {
);
const collection = datastore.getBinarySizesCollection(store);
if (GITHUB_REF === 'main') {
if (GITHUB_REF === 'main' || GITHUB_REF.endsWith('-stable')) {
// Ensure we only store numbers greater than zero.
const validatedStats = Object.keys(stats).reduce((validated, key) => {
const value = stats[key];
@@ -58,63 +58,85 @@ async function reportSizeStats(stats, replacePattern) {
validated[key] = value;
return validated;
}, {});
if (Object.keys(validatedStats).length > 0) {
// Print out the new stats
const document =
(await datastore.getLatestDocument(collection, GITHUB_REF)) || {};
const formattedStats = formatBundleStats(document, validatedStats);
console.log(formattedStats);
await datastore.createOrUpdateDocument(
collection,
GITHUB_SHA,
validatedStats,
GITHUB_REF,
);
}
} else {
const document = await datastore.getLatestDocument(collection);
const diffFormatter = new Intl.NumberFormat('en', {signDisplay: 'always'});
const sizeFormatter = new Intl.NumberFormat('en', {});
// | Platform | Engine | Arch | Size (bytes) | Diff |
// |:---------|:-------|:------------|-------------:|-----:|
// | android | hermes | arm64-v8a | 9437184 | ±0 |
// | android | hermes | armeabi-v7a | 9015296 | ±0 |
// | android | hermes | x86 | 9498624 | ±0 |
// | android | hermes | x86_64 | 9965568 | ±0 |
// | android | jsc | arm64-v8a | 9236480 | ±0 |
// | android | jsc | armeabi-v7a | 8814592 | ±0 |
// | android | jsc | x86 | 9297920 | ±0 |
// | android | jsc | x86_64 | 9764864 | ±0 |
// | android | jsc | x86_64 | 9764864 | ±0 |
// | ios | - | universal | 10715136 | ±0 |
const comment = [
'| Platform | Engine | Arch | Size (bytes) | Diff |',
'|:---------|:-------|:-----|-------------:|-----:|',
...Object.keys(stats).map(identifier => {
const [size, diff] = (() => {
const statSize = stats[identifier];
if (!statSize) {
return ['n/a', '--'];
} else if (!(identifier in document)) {
return [statSize, 'n/a'];
} else {
return [
sizeFormatter.format(statSize),
diffFormatter.format(statSize - document[identifier]),
];
}
})();
const [platform, engineOrArch, ...archParts] = identifier.split('-');
const arch = archParts.join('-') || engineOrArch;
const engine = arch === engineOrArch ? '-' : engineOrArch; // e.g. 'ios-universal'
return `| ${platform} | ${engine} | ${arch} | ${size} | ${diff} |`;
}),
'',
`Base commit: ${document.commit}`,
].join('\n');
// For PRs, always compare vs main.
const document =
(await datastore.getLatestDocument(collection, 'main')) || {};
const comment = formatBundleStats(document, stats);
createOrUpdateComment(comment, replacePattern);
}
await datastore.terminateStore(store);
}
/**
* Format the new bundle stats as compared to the latest stored entry.
* @param {firebase.firestore.DocumentData} document the latest entry to compare against
* @param {firebase.firestore.UpdateData} stats The stats to be formatted
* @returns {string}
*/
function formatBundleStats(document, stats) {
const diffFormatter = new Intl.NumberFormat('en', {signDisplay: 'always'});
const sizeFormatter = new Intl.NumberFormat('en', {});
// | Platform | Engine | Arch | Size (bytes) | Diff |
// |:---------|:-------|:------------|-------------:|-----:|
// | android | hermes | arm64-v8a | 9437184 | ±0 |
// | android | hermes | armeabi-v7a | 9015296 | ±0 |
// | android | hermes | x86 | 9498624 | ±0 |
// | android | hermes | x86_64 | 9965568 | ±0 |
// | android | jsc | arm64-v8a | 9236480 | ±0 |
// | android | jsc | armeabi-v7a | 8814592 | ±0 |
// | android | jsc | x86 | 9297920 | ±0 |
// | android | jsc | x86_64 | 9764864 | ±0 |
// | android | jsc | x86_64 | 9764864 | ±0 |
// | ios | - | universal | 10715136 | ±0 |
const formatted = [
'| Platform | Engine | Arch | Size (bytes) | Diff |',
'|:---------|:-------|:-----|-------------:|-----:|',
...Object.keys(stats).map(identifier => {
const [size, diff] = (() => {
const statSize = stats[identifier];
if (!statSize) {
return ['n/a', '--'];
} else if (!(identifier in document)) {
return [statSize, 'n/a'];
} else {
return [
sizeFormatter.format(statSize),
diffFormatter.format(statSize - document[identifier]),
];
}
})();
const [platform, engineOrArch, ...archParts] = identifier.split('-');
const arch = archParts.join('-') || engineOrArch;
const engine = arch === engineOrArch ? '-' : engineOrArch; // e.g. 'ios-universal'
return `| ${platform} | ${engine} | ${arch} | ${size} | ${diff} |`;
}),
'',
`Base commit: ${document.commit || '<unknown>'}`,
`Branch: ${document.branch || '<unknown>'}`,
].join('\n');
return formatted;
}
/**
* Returns the size of the file at specified path in bytes.
* @param {fs.PathLike} path
+2 -2
View File
@@ -13,11 +13,11 @@
'use strict';
const React = require('react');
const Modal = require('../Libraries/Modal/Modal');
import typeof Modal from '../Libraries/Modal/Modal';
function mockModal(BaseComponent: $FlowFixMe) {
class ModalMock extends BaseComponent {
render(): React.Element<typeof Modal> {
render(): React.Element<Modal> {
return (
<BaseComponent {...this.props}>
{this.props.visible !== true ? null : this.props.children}
+7 -75
View File
@@ -13,42 +13,10 @@
'use strict';
const babelRegisterOnly = require('metro-babel-register');
const nullthrows = require('nullthrows');
const createCacheKeyFunction = require('@jest/create-cache-key-function')
.default;
const t = require('@babel/types');
const {statements} = require('@babel/template').default;
const importDefault = '__importDefault__';
const importAll = '__importAll__';
// prelude
const importPrelude = statements(`
function ${importDefault}(moduleId) {
const exports = require(moduleId);
if (exports && exports.__esModule) {
return exports.default;
}
return exports;
};
function ${importAll}(moduleId) {
const exports = require(moduleId);
if (exports && exports.__esModule) {
return exports;
}
return Object.assign({}, exports, {default: exports});
};
`);
const {
transformSync: babelTransformSync,
transformFromAstSync: babelTransformFromAstSync,
} = require('@babel/core');
const {transformSync: babelTransformSync} = require('@babel/core');
const generate = require('@babel/generator').default;
const nodeFiles = new RegExp(
@@ -73,13 +41,13 @@ module.exports = {
}).code;
}
let {ast} = transformer.transform({
const {ast} = transformer.transform({
filename: file,
options: {
ast: true, // needed for open source (?) https://github.com/facebook/react-native/commit/f8d6b97140cffe8d18b2558f94570c8d1b410d5c#r28647044
dev: true,
enableBabelRuntime: false,
experimentalImportSupport: true,
experimentalImportSupport: false,
globalPrefix: '',
hot: false,
inlineRequires: true,
@@ -111,6 +79,10 @@ module.exports = {
[require('@babel/plugin-transform-regenerator')],
[require('@babel/plugin-transform-sticky-regex')],
[require('@babel/plugin-transform-unicode-regex')],
[
require('@babel/plugin-transform-modules-commonjs'),
{strict: false, allowTopLevelThis: true},
],
[require('@babel/plugin-transform-classes')],
[require('@babel/plugin-transform-arrow-functions')],
[require('@babel/plugin-transform-spread')],
@@ -127,46 +99,6 @@ module.exports = {
],
});
// We're not using @babel/plugin-transform-modules-commonjs so
// we need to add 'use strict' manually
const directives = ast.program.directives;
if (
ast.program.sourceType === 'module' &&
(directives == null ||
directives.findIndex(d => d.value.value === 'use strict') === -1)
) {
ast.program.directives = [
...(directives || []),
t.directive(t.directiveLiteral('use strict')),
];
}
// Postprocess the transformed module to handle ESM and inline requires.
// We need to do this in a separate pass to avoid issues tracking references.
const babelTransformResult = babelTransformFromAstSync(ast, src, {
ast: true,
retainLines: true,
plugins: [
[
require('metro-transform-plugins').importExportPlugin,
{importDefault, importAll},
],
[
require('babel-preset-fbjs/plugins/inline-requires.js'),
{inlineableCalls: [importDefault, importAll]},
],
],
sourceType: 'module',
});
ast = nullthrows(babelTransformResult.ast);
// Inject import helpers *after* running the inline-requires transform,
// because otherwise it will assume they are user code and bail out of
// inlining calls to them.
ast.program.body.unshift(...importPrelude());
return generate(
ast,
// $FlowFixMe[prop-missing] Error found when improving flow typing for libs
+46 -9
View File
@@ -1,7 +1,6 @@
{
"name": "react-native",
"private": true,
"version": "1000.0.0",
"version": "0.67.5",
"bin": "./cli.js",
"description": "A framework for building native apps using React",
"license": "MIT",
@@ -80,10 +79,6 @@
"test-ios-e2e": "detox test -c ios.sim.release packages/rn-tester/e2e",
"test-ios": "./scripts/objc-test.sh test"
},
"workspaces": [
"packages/!(eslint-config-react-native-community)",
"repo-config"
],
"peerDependencies": {
"react": "17.0.2"
},
@@ -116,11 +111,53 @@
"stacktrace-parser": "^0.1.3",
"use-subscription": "^1.0.0",
"whatwg-fetch": "^3.0.0",
"ws": "^6.1.4"
"ws": "^6.1.4",
"react-native-codegen": "^0.0.8"
},
"devDependencies": {
"flow-bin": "^0.162.0",
"react": "17.0.2"
"react": "17.0.2",
"@babel/core": "^7.14.0",
"@babel/generator": "^7.14.0",
"@babel/template": "^7.0.0",
"@babel/types": "^7.0.0",
"@react-native-community/eslint-plugin": "*",
"@reactions/component": "^2.0.2",
"async": "^2.4.0",
"babel-eslint": "^10.1.0",
"babel-preset-fbjs": "^3.4.0",
"clang-format": "^1.2.4",
"connect": "^3.6.5",
"coveralls": "^3.0.2",
"detox": "16.7.2",
"eslint": "7.12.0",
"eslint-config-fb-strict": "^24.9.0",
"eslint-config-fbjs": "2.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-eslint-comments": "^3.1.1",
"eslint-plugin-flowtype": "2.50.3",
"eslint-plugin-jest": "22.4.1",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-prettier": "2.6.2",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react-native": "3.10.0",
"eslint-plugin-relay": "1.8.1",
"jest": "^26.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.11.0",
"metro-babel-register": "0.66.2",
"metro-transform-plugins": "^0.66.2",
"mkdirp": "^0.5.1",
"prettier": "1.19.1",
"react-shallow-renderer": "16.14.1",
"react-test-renderer": "17.0.2",
"shelljs": "^0.7.8",
"signedsource": "^1.0.0",
"ws": "^6.1.4",
"yargs": "^15.3.1",
"inquirer": "^7.1.0"
},
"detox": {
"test-runner": "jest",
@@ -159,4 +196,4 @@
}
}
}
}
}
@@ -244,10 +244,6 @@ private fun Project.cleanupVMFiles(
} else {
// For JSC, delete all the libhermes* files
it.include("**/libhermes*.so")
// Delete the libjscexecutor from release build
if (cleanup) {
it.include("**/libjscexecutor.so")
}
}
}
.visit { visit ->
+1
View File
@@ -52,4 +52,5 @@ end
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
File diff suppressed because it is too large Load Diff
+14 -4
View File
@@ -363,10 +363,6 @@ afterEvaluate {
} else {
// For JSC, delete all the libhermes* files
include "**/libhermes*.so"
// Delete the libjscexecutor from release build
if (cleanup) {
include "**/libjscexecutor.so"
}
}
}.visit { details ->
def targetVariant1 = ".*/transforms/[^/]*/${targetPath}/.*"
@@ -398,3 +394,17 @@ afterEvaluate {
}
}
}
// Patch needed for https://github.com/facebook/react-native/issues/35210
// This is a patch to short-circuit the "+" dependencies inside the
// users' app/build.gradle file and the various .gradle files of libraries.
// As using plain "+" dependencies causes Gradle to always download the latest,
// this logic forces Gradle to use latest release in the minor series.
project.rootProject.allprojects {
configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:0.67.+"
force "com.facebook.react:hermes-engine:0.67.+"
}
}
}
+1 -4
View File
@@ -11,13 +11,10 @@
"dependencies": {
"@babel/core": "^7.14.0",
"@babel/generator": "^7.14.0",
"@babel/template": "^7.0.0",
"@babel/types": "^7.0.0",
"@react-native-community/eslint-plugin": "*",
"@reactions/component": "^2.0.2",
"async": "^2.4.0",
"babel-eslint": "^10.1.0",
"babel-preset-fbjs": "^3.4.0",
"clang-format": "^1.2.4",
"connect": "^3.6.5",
"coveralls": "^3.0.2",
@@ -37,11 +34,11 @@
"eslint-plugin-react-native": "3.10.0",
"eslint-plugin-relay": "1.8.1",
"flow-bin": "^0.162.0",
"inquirer": "^7.1.0",
"jest": "^26.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.11.0",
"metro-babel-register": "0.66.2",
"metro-transform-plugins": "^0.66.2",
"mkdirp": "^0.5.1",
"prettier": "1.19.1",
"react": "17.0.2",
+132
View File
@@ -0,0 +1,132 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const {
parseVersion,
isTaggedLatest,
isReleaseBranch,
} = require('../version-utils');
let execResult = null;
jest.mock('shelljs', () => ({
exec: () => {
return {
stdout: execResult,
};
},
}));
describe('version-utils', () => {
describe('isReleaseBranch', () => {
it('should identify as release branch', () => {
expect(isReleaseBranch('v0.66-stable')).toBe(true);
expect(isReleaseBranch('0.66-stable')).toBe(true);
expect(isReleaseBranch('made-up-stuff-stable')).toBe(true);
});
it('should not identify as release branch', () => {
expect(isReleaseBranch('main')).toBe(false);
expect(isReleaseBranch('pull/32659')).toBe(false);
});
});
describe('isTaggedLatest', () => {
it('it should identify commit as tagged `latest`', () => {
execResult = '6c19dc3266b84f47a076b647a1c93b3c3b69d2c5\n';
expect(isTaggedLatest('6c19dc3266b84f47a076b647a1c93b3c3b69d2c5')).toBe(
true,
);
});
it('it should not identify commit as tagged `latest`', () => {
execResult = '6c19dc3266b84f47a076b647a1c93b3c3b69d2c5\n';
expect(isTaggedLatest('6c19dc3266b8')).toBe(false);
});
});
describe('parseVersion', () => {
it('should throw error if invalid match', () => {
function testInvalidVersion() {
parseVersion('<invalid version>');
}
expect(testInvalidVersion).toThrowErrorMatchingInlineSnapshot(
`"You must pass a correctly formatted version; couldn't parse <invalid version>"`,
);
});
it('should parse pre-release version with .', () => {
const {version, major, minor, patch, prerelease} = parseVersion(
'0.66.0-rc.4',
);
expect(version).toBe('0.66.0-rc.4');
expect(major).toBe('0');
expect(minor).toBe('66');
expect(patch).toBe('0');
expect(prerelease).toBe('rc.4');
});
it('should parse pre-release version with -', () => {
const {version, major, minor, patch, prerelease} = parseVersion(
'0.66.0-rc-4',
);
expect(version).toBe('0.66.0-rc-4');
expect(major).toBe('0');
expect(minor).toBe('66');
expect(patch).toBe('0');
expect(prerelease).toBe('rc-4');
});
it('should parse stable version', () => {
const {version, major, minor, patch, prerelease} = parseVersion('0.66.0');
expect(version).toBe('0.66.0');
expect(major).toBe('0');
expect(minor).toBe('66');
expect(patch).toBe('0');
expect(prerelease).toBeUndefined();
});
it('should parse pre-release version from tag', () => {
const {version, major, minor, patch, prerelease} = parseVersion(
'v0.66.1-rc.4',
);
expect(version).toBe('0.66.1-rc.4');
expect(major).toBe('0');
expect(minor).toBe('66');
expect(patch).toBe('1');
expect(prerelease).toBe('rc.4');
});
it('should parse stable version from tag', () => {
const {version, major, minor, patch, prerelease} = parseVersion(
'v0.66.0',
);
expect(version).toBe('0.66.0');
expect(major).toBe('0');
expect(minor).toBe('66');
expect(patch).toBe('0');
expect(prerelease).toBeUndefined();
});
it('should parse nightly fake version', () => {
const {version, major, minor, patch, prerelease} = parseVersion('0.0.0');
expect(version).toBe('0.0.0');
expect(major).toBe('0');
expect(minor).toBe('0');
expect(patch).toBe('0');
expect(prerelease).toBeUndefined();
});
it('should parse dryrun fake version', () => {
const {version, major, minor, patch, prerelease} = parseVersion(
'1000.0.0',
);
expect(version).toBe('1000.0.0');
expect(major).toBe('1000');
expect(minor).toBe('0');
expect(patch).toBe('0');
expect(prerelease).toBeUndefined();
});
});
});
+123 -197
View File
@@ -11,223 +11,149 @@
'use strict';
/**
* This script bumps a new version for open source releases.
* It updates the version in json/gradle files and makes sure they are consistent between each other
* After changing the files it makes a commit and tags it.
* All you have to do is push changes to remote and CI will make a new build.
* This script walks a releaser through bumping the version for a release
* It will commit the appropriate tags to trigger the CircleCI jobs.
* TODO change this workflow to use POST a trigger vs. using tags
*/
const fs = require('fs');
const {cat, echo, exec, exit, sed} = require('shelljs');
const {exec, exit} = require('shelljs');
const yargs = require('yargs');
const inquirer = require('inquirer');
const request = require('request');
const {
parseVersion,
isReleaseBranch,
getBranchName,
} = require('./version-utils');
let argv = yargs
.option('r', {
alias: 'remote',
default: 'origin',
})
.option('n', {
alias: 'nightly',
type: 'boolean',
default: false,
.option('t', {
alias: 'token',
describe:
'Your CircleCI personal API token. See https://circleci.com/docs/2.0/managing-api-tokens/#creating-a-personal-api-token to set one',
required: true,
})
.option('v', {
alias: 'to-version',
type: 'string',
describe: 'Version you aim to release, ex. 0.67.0-rc.1, 0.66.3',
required: true,
})
.check(() => {
const branch = getBranchName();
exitIfNotOnReleaseBranch(branch);
return true;
}).argv;
const nightlyBuild = argv.nightly;
const version = argv.toVersion;
if (!version) {
echo(
'You must specify a version using -v',
);
exit(1);
function exitIfNotOnReleaseBranch(branch) {
if (!isReleaseBranch(branch)) {
console.log(
'This script must be run in a react-native git repository checkout and on a release branch',
);
exit(1);
}
}
let branch;
if (!nightlyBuild) {
// Check we are in release branch, e.g. 0.33-stable
branch = exec('git symbolic-ref --short HEAD', {
function getLatestTag(versionPrefix) {
const tags = exec(`git tag --list "v${versionPrefix}*" --sort=-refname`, {
silent: true,
}).stdout.trim();
if (branch.indexOf('-stable') === -1) {
echo('You must be in 0.XX-stable branch to bump a version');
exit(1);
}
// e.g. 0.33
let versionMajor = branch.slice(0, branch.indexOf('-stable'));
// - check that argument version matches branch
// e.g. 0.33.1 or 0.33.0-rc4
if (version.indexOf(versionMajor) !== 0) {
echo(
`You must specify a version tag like 0.${versionMajor}.[X]-rc[Y] to bump a version`,
);
exit(1);
})
.stdout.trim()
.split('\n')
.filter(tag => tag.length > 0);
if (tags.length > 0) {
return tags[0];
}
return null;
}
// Generate version files to detect mismatches between JS and native.
let match = version.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);
if (!match) {
echo(
`You must pass a correctly formatted version; couldn't parse ${version}`,
function triggerReleaseWorkflow(options) {
return new Promise((resolve, reject) => {
request(options, function (error, response, body) {
if (error) {
reject(error);
} else {
resolve(body);
}
});
});
}
async function main() {
const branch = getBranchName();
const token = argv.token;
const releaseVersion = argv.toVersion;
const {pushed} = await inquirer.prompt({
type: 'confirm',
name: 'pushed',
message: `This script will trigger a release with whatever changes are on the remote branch: ${branch}. \nMake sure you have pushed any updates remotely.`,
});
if (!pushed) {
console.log(`Please run 'git push ${argv.remote} ${branch}'`);
exit(1);
return;
}
let latest = false;
const {version, prerelease} = parseVersion(releaseVersion);
if (!prerelease) {
const {setLatest} = await inquirer.prompt({
type: 'confirm',
name: 'setLatest',
message: `Do you want to set ${version} as "latest" release on npm?`,
});
latest = setLatest;
}
const npmTag = latest ? 'latest' : !prerelease ? branch : 'next';
const {confirmRelease} = await inquirer.prompt({
type: 'confirm',
name: 'confirmRelease',
message: `Releasing version "${version}" with npm tag "${npmTag}". Is this correct?`,
});
if (!confirmRelease) {
console.log('Aborting.');
return;
}
const parameters = {
release_version: version,
release_latest: latest,
run_package_release_workflow_only: true,
};
const options = {
method: 'POST',
url: 'https://circleci.com/api/v2/project/github/facebook/react-native/pipeline',
headers: {
'Circle-Token': token,
'content-type': 'application/json',
},
body: {
branch,
parameters,
},
json: true,
};
// See response: https://circleci.com/docs/api/v2/#operation/triggerPipeline
const body = await triggerReleaseWorkflow(options);
console.log(
`Monitor your release workflow: https://app.circleci.com/pipelines/github/facebook/react-native/${body.number}`,
);
exit(1);
}
let [, major, minor, patch, prerelease] = match;
fs.writeFileSync(
'ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java',
cat('scripts/versiontemplates/ReactNativeVersion.java.template')
.replace('${major}', major)
.replace('${minor}', minor)
.replace('${patch}', patch)
.replace(
'${prerelease}',
prerelease !== undefined ? `"${prerelease}"` : 'null',
),
'utf-8',
);
fs.writeFileSync(
'React/Base/RCTVersion.m',
cat('scripts/versiontemplates/RCTVersion.m.template')
.replace('${major}', `@(${major})`)
.replace('${minor}', `@(${minor})`)
.replace('${patch}', `@(${patch})`)
.replace(
'${prerelease}',
prerelease !== undefined ? `@"${prerelease}"` : '[NSNull null]',
),
'utf-8',
);
fs.writeFileSync(
'ReactCommon/cxxreact/ReactNativeVersion.h',
cat('scripts/versiontemplates/ReactNativeVersion.h.template')
.replace('${major}', major)
.replace('${minor}', minor)
.replace('${patch}', patch)
.replace(
'${prerelease}',
prerelease !== undefined ? `"${prerelease}"` : '""',
),
'utf-8',
);
fs.writeFileSync(
'Libraries/Core/ReactNativeVersion.js',
cat('scripts/versiontemplates/ReactNativeVersion.js.template')
.replace('${major}', major)
.replace('${minor}', minor)
.replace('${patch}', patch)
.replace(
'${prerelease}',
prerelease !== undefined ? `'${prerelease}'` : 'null',
),
'utf-8',
);
let packageJson = JSON.parse(cat('package.json'));
packageJson.version = version;
delete packageJson.workspaces;
delete packageJson.private;
// Copy dependencies over from repo-config/package.json
const repoConfigJson = JSON.parse(cat('repo-config/package.json'));
packageJson.devDependencies = {...packageJson.devDependencies, ...repoConfigJson.dependencies};
// Make react-native-codegen a direct dependency of react-native
delete packageJson.devDependencies['react-native-codegen'];
packageJson.dependencies = {...packageJson.dependencies, 'react-native-codegen': repoConfigJson.dependencies['react-native-codegen']};
fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2), 'utf-8');
// Change ReactAndroid/gradle.properties
if (
sed(
'-i',
/^VERSION_NAME=.*/,
`VERSION_NAME=${version}`,
'ReactAndroid/gradle.properties',
).code
) {
echo("Couldn't update version for Gradle");
exit(1);
// TODO
// - Output the release changelog to paste into Github releases
// - Link to release discussions to update
// - Verify RN-diff publish is through
}
// Change react-native version in the template's package.json
exec(`node scripts/set-rn-template-version.js ${version}`);
// Verify that files changed, we just do a git diff and check how many times version is added across files
const filesToValidate = [
'package.json',
'ReactAndroid/gradle.properties',
'template/package.json',
];
let numberOfChangedLinesWithNewVersion = exec(
`git diff -U0 ${filesToValidate.join(' ')}| grep '^[+]' | grep -c ${version} `,
{silent: true},
).stdout.trim();
// Make sure to update ruby version
if (exec('scripts/update-ruby.sh').code) {
echo('Failed to update Ruby version');
exit(1);
}
// Release builds should commit the version bumps, and create tags.
// Nightly builds do not need to do that.
if (!nightlyBuild) {
if (+numberOfChangedLinesWithNewVersion !== filesToValidate.length) {
echo(
`Failed to update all the files: [${filesToValidate.join(', ')}] must have versions in them`,
);
echo('Fix the issue, revert and try again');
exec('git diff');
exit(1);
}
// Update Podfile.lock only on release builds, not nightlies.
// Nightly builds don't need it as the main branch will already be up-to-date.
echo('Updating RNTester Podfile.lock...');
if (exec('source scripts/update_podfile_lock.sh && update_pods').code) {
echo('Failed to update RNTester Podfile.lock.');
echo('Fix the issue, revert and try again.');
exit(1);
}
// Make commit [0.21.0-rc] Bump version numbers
if (exec(`git commit -a -m "[${version}] Bump version numbers"`).code) {
echo('failed to commit');
exit(1);
}
// Add tag v0.21.0-rc
if (exec(`git tag v${version}`).code) {
echo(
`failed to tag the commit with v${version}, are you sure this release wasn't made earlier?`,
);
echo('You may want to rollback the last commit');
echo('git reset --hard HEAD~1');
exit(1);
}
// Push newly created tag
let remote = argv.remote;
exec(`git push ${remote} v${version}`);
// Tag latest if doing stable release
if (version.indexOf('rc') === -1) {
exec('git tag -d latest');
exec(`git push ${remote} :latest`);
exec('git tag latest');
exec(`git push ${remote} latest`);
}
exec(`git push ${remote} ${branch} --follow-tags`);
}
exit(0);
main().then(() => {
exit(0);
});
+6 -2
View File
@@ -19,12 +19,16 @@ fi
# Define NVM_DIR and source the nvm.sh setup script
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
# Source nvm with '--no-use' and then `nvm use` to respect .nvmrc
# See: https://github.com/nvm-sh/nvm/issues/2053
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
# shellcheck source=/dev/null
. "$HOME/.nvm/nvm.sh"
. "$HOME/.nvm/nvm.sh" --no-use
nvm use 2> /dev/null || nvm use default
elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
# shellcheck source=/dev/null
. "$(brew --prefix nvm)/nvm.sh"
. "$(brew --prefix nvm)/nvm.sh" --no-use
nvm use 2> /dev/null || nvm use default
fi
# Set up the nodenv node version manager if present
+98
View File
@@ -0,0 +1,98 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
/**
* This script prepares a release package to be pushed to npm
* It is triggered to run on CircleCI
* It will:
* * It updates the version in json/gradle files and makes sure they are consistent between each other (set-rn-version)
* * Updates podfile for RNTester
* * Commits changes and tags with the next version based off of last version tag.
* This in turn will trigger another CircleCI job to publish to npm
*/
const {echo, exec, exit} = require('shelljs');
const yargs = require('yargs');
const {isReleaseBranch, parseVersion} = require('./version-utils');
const argv = yargs
.option('r', {
alias: 'remote',
default: 'origin',
})
.option('v', {
alias: 'to-version',
type: 'string',
required: true,
})
.option('l', {
alias: 'latest',
type: 'boolean',
default: false,
}).argv;
const currentCommit = process.env.CIRCLE_SHA1;
const branch = process.env.CIRCLE_BRANCH;
const remote = argv.remote;
const releaseVersion = argv.toVersion;
const isLatest = argv.latest;
if (!isReleaseBranch(branch)) {
console.error(`This needs to be on a release branch. On branch: ${branch}`);
exit(1);
}
const {version} = parseVersion(releaseVersion);
if (version == null) {
console.error(`Invalid version provided: ${releaseVersion}`);
exit(1);
}
if (exec(`node scripts/set-rn-version.js --to-version ${version}`).code) {
echo(`Failed to set React Native version to ${version}`);
exit(1);
}
// Release builds should commit the version bumps, and create tags.
echo('Updating RNTester Podfile.lock...');
if (exec('source scripts/update_podfile_lock.sh && update_pods').code) {
echo('Failed to update RNTester Podfile.lock.');
echo('Fix the issue, revert and try again.');
exit(1);
}
// Make commit [0.21.0-rc] Bump version numbers
if (exec(`git commit -a -m "[${version}] Bump version numbers"`).code) {
echo('failed to commit');
exit(1);
}
// Add tag v0.21.0-rc.1
if (exec(`git tag -a v${version} -m "v${version}"`).code) {
echo(
`failed to tag the commit with v${version}, are you sure this release wasn't made earlier?`,
);
echo('You may want to rollback the last commit');
echo('git reset --hard HEAD~1');
exit(1);
}
// If `isLatest`, this git tag will also set npm release as `latest`
if (isLatest) {
exec('git tag -d latest');
exec(`git push ${remote} :latest`);
// This will be pushed with the `--follow-tags`
exec('git tag -a latest -m "latest"');
}
exec(`git push ${remote} ${branch} --follow-tags`);
exit(0);
+73 -110
View File
@@ -10,50 +10,35 @@
'use strict';
/**
* This script publishes a new version of react-native to NPM.
* This script prepares a release version of react-native and may publish to NPM.
* It is supposed to run in CI environment, not on a developer's machine.
*
* To make it easier for developers it uses some logic to identify with which
* version to publish the package.
* For a dry run (commitly), this script will:
* * Version the commitly of the form `1000.0.0-<commitSha>`
* * Create Android artifacts
* * It will not publish to npm
*
* To cut a branch (and release RC):
* - Developer: `git checkout -b 0.XY-stable`
* - Developer: `./scripts/bump-oss-version.js -v v0.XY.0-rc.0`
* - CI: test and deploy to npm (run this script) with version `0.XY.0-rc.0`
* with tag "next"
* For a nightly run, this script will:
* * Version the nightly release of the form `0.0.0-<dateIdentifier>-<commitSha>`
* * Create Android artifacts
* * Publish to npm using `nightly` tag
*
* To update RC release:
* - Developer: `git checkout 0.XY-stable`
* - Developer: cherry-pick whatever changes needed
* - Developer: `./scripts/bump-oss-version.js -v v0.XY.0-rc.1`
* - CI: test and deploy to npm (run this script) with version `0.XY.0-rc.1`
* with tag "next"
*
* To publish a release:
* - Developer: `git checkout 0.XY-stable`
* - Developer: cherry-pick whatever changes needed
* - Developer: `./scripts/bump-oss-version.js -v v0.XY.0`
* - CI: test and deploy to npm (run this script) with version `0.XY.0`
* and no tag ("latest" is implied by npm)
*
* To patch old release:
* - Developer: `git checkout 0.XY-stable`
* - Developer: cherry-pick whatever changes needed
* - Developer: `git tag v0.XY.Z`
* - Developer: `git push` to git@github.com:facebook/react-native.git (or merge as pull request)
* - CI: test and deploy to npm (run this script) with version 0.XY.Z with no tag, npm will not mark it as latest if
* there is a version higher than XY
*
* Important tags:
* If tag v0.XY.0-rc.Z is present on the commit then publish to npm with version 0.XY.0-rc.Z and tag next
* If tag v0.XY.Z is present on the commit then publish to npm with version 0.XY.Z and no tag (npm will consider it latest)
* For a release run, this script will:
* * Version the release by the tag version that triggered CI
* * Create Android artifacts
* * Publish to npm
* * using `latest` tag if commit is currently tagged `latest`
* * or otherwise `{major}.{minor}-stable`
*/
/*eslint-disable no-undef */
require('shelljs/global');
const {exec, echo, exit, test} = require('shelljs');
const yargs = require('yargs');
const {parseVersion, isTaggedLatest} = require('./version-utils');
let argv = yargs
const buildTag = process.env.CIRCLE_TAG;
const otp = process.env.NPM_CONFIG_OTP;
const argv = yargs
.option('n', {
alias: 'nightly',
type: 'boolean',
@@ -64,90 +49,60 @@ let argv = yargs
type: 'boolean',
default: false,
}).argv;
const nightlyBuild = argv.nightly;
const dryRunBuild = argv.dryRun;
const buildFromMain = nightlyBuild || dryRunBuild;
const buildTag = process.env.CIRCLE_TAG;
const otp = process.env.NPM_CONFIG_OTP;
let branchVersion = 0;
if (buildFromMain) {
branchVersion = 0;
} else {
if (!buildTag) {
echo('Error: We publish only from git tags');
exit(1);
}
let match = buildTag.match(/^v(\d+\.\d+)\.\d+(?:-.+)?$/);
if (!match) {
echo('Error: We publish only from release version git tags');
exit(1);
}
[, branchVersion] = match;
}
// 0.33
// 34c034298dc9cad5a4553964a5a324450fda0385
const currentCommit = exec('git rev-parse HEAD', {silent: true}).stdout.trim();
// Note: We rely on tagsWithVersion to be alphabetically sorted
// [34c034298dc9cad5a4553964a5a324450fda0385, refs/heads/0.33-stable, refs/tags/latest, refs/tags/v0.33.1, refs/tags/v0.34.1-rc]
const tagsWithVersion = exec(`git ls-remote origin | grep ${currentCommit}`, {
const currentCommit = exec('git rev-parse HEAD', {
silent: true,
})
.stdout.split(/\s/)
// ['refs/tags/v0.33.0', 'refs/tags/v0.33.0-rc', 'refs/tags/v0.33.0-rc1', 'refs/tags/v0.33.0-rc2', 'refs/tags/v0.34.0']
.filter(
version =>
!!version && version.indexOf(`refs/tags/v${branchVersion}`) === 0,
)
// ['refs/tags/v0.33.0', 'refs/tags/v0.33.0-rc', 'refs/tags/v0.33.0-rc1', 'refs/tags/v0.33.0-rc2']
.filter(version => version.indexOf(branchVersion) !== -1)
// ['0.33.0', '0.33.0-rc', '0.33.0-rc1', '0.33.0-rc2']
.map(version => version.slice('refs/tags/v'.length));
}).stdout.trim();
const shortCommit = currentCommit.slice(0, 9);
if (!buildFromMain && tagsWithVersion.length === 0) {
echo(
'Error: Cannot find version tag in current commit. To deploy to NPM you must add tag v0.XY.Z[-rc] to your commit',
);
const rawVersion =
// 0.0.0 triggers issues with cocoapods for codegen when building template project.
dryRunBuild
? '1000.0.0'
: // For nightly we continue to use 0.0.0 for clarity for npm
nightlyBuild
? '0.0.0'
: // For pre-release and stable releases, we use the git tag of the version we're releasing (set in bump-oss-version)
buildTag;
let version,
major,
minor,
prerelease = null;
try {
({version, major, minor, prerelease} = parseVersion(rawVersion));
} catch (e) {
echo(e.message);
exit(1);
}
let releaseVersion;
if (dryRunBuild) {
releaseVersion = `${version}-${shortCommit}`;
} else if (nightlyBuild) {
// 2021-09-28T05:38:40.669Z -> 20210928-0538
const dateIdentifier = new Date()
.toISOString()
.slice(0, -8)
.replace(/[-:]/g, '')
.replace(/[T]/g, '-');
releaseVersion = `${version}-${dateIdentifier}-${shortCommit}`;
} else {
releaseVersion = version;
}
if (buildFromMain) {
releaseVersion = '0.0.0';
if (nightlyBuild) {
releaseVersion += '-';
// 2021-09-28T05:38:40.669Z -> 20210928-0538
releaseVersion += new Date()
.toISOString()
.slice(0, -8)
.replace(/[-:]/g, '')
.replace(/[T]/g, '-');
}
releaseVersion += `-${currentCommit.slice(0, 9)}`;
// Bump version number in various files (package.json, gradle.properties etc)
// Bump version number in various files (package.json, gradle.properties etc)
// For stable, pre-release releases, we rely on CircleCI job `prepare_package_for_release` to handle this
if (nightlyBuild || dryRunBuild) {
if (
exec(
`node scripts/bump-oss-version.js --nightly --to-version ${releaseVersion}`,
).code
exec(`node scripts/set-rn-version.js --to-version ${releaseVersion}`).code
) {
echo('Failed to bump version number');
echo(`Failed to set version number to ${releaseVersion}`);
exit(1);
}
} else if (tagsWithVersion[0].indexOf('-rc') === -1) {
// if first tag on this commit is non -rc then we are making a stable release
// '0.33.0'
releaseVersion = tagsWithVersion[0];
} else {
// otherwise pick last -rc tag, indicates latest rc version due to alpha-sort
// '0.33.0-rc2'
releaseVersion = tagsWithVersion[tagsWithVersion.length - 1];
}
// -------- Generating Android Artifacts with JavaDoc
@@ -182,12 +137,21 @@ if (dryRunBuild) {
exit(0);
}
// if version contains -rc, tag as prerelease
// Running to see if this commit has been git tagged as `latest`
const isLatest = isTaggedLatest(currentCommit);
const releaseBranch = `${major}.${minor}-stable`;
// Set the right tag for nightly and prerelease builds
// If a release is not git-tagged as `latest` we use `releaseBranch` to prevent
// npm from overriding the current `latest` version tag, which it will do if no tag is set.
const tagFlag = nightlyBuild
? '--tag nightly'
: releaseVersion.indexOf('-rc') === -1
? ''
: '--tag next';
: prerelease != null
? '--tag next'
: isLatest
? '--tag latest'
: `--tag ${releaseBranch}`;
// use otp from envvars if available
const otpFlag = otp ? `--otp ${otp}` : '';
@@ -199,4 +163,3 @@ if (exec(`npm publish ${tagFlag} ${otpFlag}`).code) {
echo(`Published to npm ${releaseVersion}`);
exit(0);
}
/*eslint-enable no-undef */
+5 -5
View File
@@ -117,7 +117,7 @@ fi
BUNDLE_FILE="$CONFIGURATION_BUILD_DIR/main.jsbundle"
EXTRA_ARGS=()
EXTRA_ARGS=
case "$PLATFORM_NAME" in
"macosx")
@@ -144,12 +144,12 @@ if [[ $EMIT_SOURCEMAP == true ]]; then
else
PACKAGER_SOURCEMAP_FILE="$SOURCEMAP_FILE"
fi
EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
EXTRA_ARGS="$EXTRA_ARGS --sourcemap-output $PACKAGER_SOURCEMAP_FILE"
fi
# Hermes doesn't require JS minification.
if [[ $USE_HERMES == true && $DEV == false ]]; then
EXTRA_ARGS+=("--minify" "false")
EXTRA_ARGS="$EXTRA_ARGS --minify false"
fi
"$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \
@@ -160,8 +160,8 @@ fi
--reset-cache \
--bundle-output "$BUNDLE_FILE" \
--assets-dest "$DEST" \
"${EXTRA_ARGS[@]}" \
"${EXTRA_PACKAGER_ARGS[@]}"
$EXTRA_ARGS \
$EXTRA_PACKAGER_ARGS
if [[ $USE_HERMES != true ]]; then
cp "$BUNDLE_FILE" "$DEST/"
+20 -3
View File
@@ -374,8 +374,25 @@ end
# See https://github.com/facebook/react-native/issues/31480#issuecomment-902912841 for more context.
# Actual fix was authored by https://github.com/mikehardy.
# New app template will call this for now until the underlying issue is resolved.
#
# It's not needed anymore and will be removed later
def __apply_Xcode_12_5_M1_post_install_workaround(installer)
puts "__apply_Xcode_12_5_M1_post_install_workaround() is not needed anymore"
# Flipper podspecs are still targeting an older iOS deployment target, and may cause an error like:
# "error: thread-local storage is not supported for the current target"
# The most reliable known workaround is to bump iOS deployment target to match react-native (iOS 11 now).
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# ensure IPHONEOS_DEPLOYMENT_TARGET is at least 11.0
deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f
should_upgrade = deployment_target < 11.0 && deployment_target != 0.0
if should_upgrade
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
# But... doing so caused another issue in Flipper:
# "Time.h:52:17: error: typedef redefinition with different types"
# We need to make a patch to RCT-Folly - remove the `__IPHONE_OS_VERSION_MIN_REQUIRED` check.
# See https://github.com/facebook/flipper/issues/834 for more details.
time_header = "#{Pod::Config.instance.installation_root.to_s}/Pods/RCT-Folly/folly/portability/Time.h"
`sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' #{time_header}`
end
+163
View File
@@ -0,0 +1,163 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
/**
* This script updates relevant React Native files with supplied version:
* * Prepares a package.json suitable for package consumption
* * Updates package.json for template project
* * Updates the version in gradle files and makes sure they are consistent between each other
* * Creates a gemfile
*/
const fs = require('fs');
const {cat, echo, exec, exit, sed} = require('shelljs');
const yargs = require('yargs');
const {parseVersion} = require('./version-utils');
let argv = yargs.option('v', {
alias: 'to-version',
type: 'string',
}).argv;
const version = argv.toVersion;
if (!version) {
echo('You must specify a version using -v');
exit(1);
}
let major,
minor,
patch,
prerelease = -1;
try {
({major, minor, patch, prerelease} = parseVersion(version));
} catch (e) {
echo(e.message);
exit(1);
}
fs.writeFileSync(
'ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java',
cat('scripts/versiontemplates/ReactNativeVersion.java.template')
.replace('${major}', major)
.replace('${minor}', minor)
.replace('${patch}', patch)
.replace(
'${prerelease}',
prerelease !== undefined ? `"${prerelease}"` : 'null',
),
'utf-8',
);
fs.writeFileSync(
'React/Base/RCTVersion.m',
cat('scripts/versiontemplates/RCTVersion.m.template')
.replace('${major}', `@(${major})`)
.replace('${minor}', `@(${minor})`)
.replace('${patch}', `@(${patch})`)
.replace(
'${prerelease}',
prerelease !== undefined ? `@"${prerelease}"` : '[NSNull null]',
),
'utf-8',
);
fs.writeFileSync(
'ReactCommon/cxxreact/ReactNativeVersion.h',
cat('scripts/versiontemplates/ReactNativeVersion.h.template')
.replace('${major}', major)
.replace('${minor}', minor)
.replace('${patch}', patch)
.replace(
'${prerelease}',
prerelease !== undefined ? `"${prerelease}"` : '""',
),
'utf-8',
);
fs.writeFileSync(
'Libraries/Core/ReactNativeVersion.js',
cat('scripts/versiontemplates/ReactNativeVersion.js.template')
.replace('${major}', major)
.replace('${minor}', minor)
.replace('${patch}', patch)
.replace(
'${prerelease}',
prerelease !== undefined ? `'${prerelease}'` : 'null',
),
'utf-8',
);
let packageJson = JSON.parse(cat('package.json'));
packageJson.version = version;
delete packageJson.workspaces;
delete packageJson.private;
// Copy dependencies over from repo-config/package.json
const repoConfigJson = JSON.parse(cat('repo-config/package.json'));
packageJson.devDependencies = {
...packageJson.devDependencies,
...repoConfigJson.dependencies,
};
// Make react-native-codegen a direct dependency of react-native
delete packageJson.devDependencies['react-native-codegen'];
packageJson.dependencies = {
...packageJson.dependencies,
'react-native-codegen': repoConfigJson.dependencies['react-native-codegen'],
};
fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2), 'utf-8');
// Change ReactAndroid/gradle.properties
if (
sed(
'-i',
/^VERSION_NAME=.*/,
`VERSION_NAME=${version}`,
'ReactAndroid/gradle.properties',
).code
) {
echo("Couldn't update version for Gradle");
exit(1);
}
// Change react-native version in the template's package.json
exec(`node scripts/set-rn-template-version.js ${version}`);
// Make sure to update ruby version
if (exec('scripts/update-ruby.sh').code) {
echo('Failed to update Ruby version');
exit(1);
}
// Verify that files changed, we just do a git diff and check how many times version is added across files
const filesToValidate = [
'package.json',
'ReactAndroid/gradle.properties',
'template/package.json',
];
const numberOfChangedLinesWithNewVersion = exec(
`git diff -U0 ${filesToValidate.join(
' ',
)}| grep '^[+]' | grep -c ${version} `,
{silent: true},
).stdout.trim();
if (+numberOfChangedLinesWithNewVersion !== filesToValidate.length) {
echo(
`Failed to update all the files: [${filesToValidate.join(
', ',
)}] must have versions in them`,
);
echo('Fix the issue and try again');
exit(1);
}
exit(0);
+3
View File
@@ -55,6 +55,9 @@ sed_i -e "s/^\(ruby '\)[^']*\('.*\)$/\1$VERSION\2/" template/Gemfile
rm -f Gemfile.lock template/Gemfile.lock
export BUNDLE_APP_CONFIG="$ROOT/.bundle"
cp "$BUNDLE_APP_CONFIG/"* template/_bundle # sync!
bundle lock
(cd template && bundle lock)
+54
View File
@@ -0,0 +1,54 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const {exec} = require('shelljs');
const VERSION_REGEX = /^v?((\d+)\.(\d+)\.(\d+)(?:-(.+))?)$/;
function parseVersion(versionStr) {
const match = versionStr.match(VERSION_REGEX);
if (!match) {
throw new Error(
`You must pass a correctly formatted version; couldn't parse ${versionStr}`,
);
}
const [, version, major, minor, patch, prerelease] = match;
return {
version,
major,
minor,
patch,
prerelease,
};
}
function isReleaseBranch(branch) {
return branch.endsWith('-stable');
}
function getBranchName() {
return exec('git rev-parse --abbrev-ref HEAD', {
silent: true,
}).stdout.trim();
}
function isTaggedLatest(commitSha) {
return (
exec(`git rev-list -1 latest | grep ${commitSha}`, {
silent: true,
}).stdout.trim() === commitSha
);
}
module.exports = {
getBranchName,
isTaggedLatest,
parseVersion,
isReleaseBranch,
};
@@ -1,5 +1,5 @@
/**
* @generated by scripts/bump-oss-version.js
* @generated by scripts/set-rn-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated by scripts/bump-oss-version.js
* @generated by scripts/set-rn-version.js
*/
#pragma once
@@ -1,5 +1,5 @@
/**
* @generated by scripts/bump-oss-version.js
* @generated by scripts/set-rn-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
@@ -1,5 +1,5 @@
/**
* @generated by scripts/bump-oss-version.js
* @generated by scripts/set-rn-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
+21 -21
View File
@@ -1,25 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.4)
CFPropertyList (3.0.5)
rexml
activesupport (6.1.4.1)
activesupport (6.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.3)
cocoapods (1.11.2)
claide (1.1.0)
cocoapods (1.11.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.2)
cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -34,7 +34,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.2)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
@@ -45,7 +45,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
@@ -54,41 +54,41 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
escape (0.0.4)
ethon (0.14.0)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.4)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.10)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.5.1)
minitest (5.14.4)
json (2.6.2)
minitest (5.16.3)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
rexml (3.2.5)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.4.2)
zeitwerk (2.6.5)
PLATFORMS
arm64-darwin-20
ruby
DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
@@ -97,4 +97,4 @@ RUBY VERSION
ruby 2.7.4p191
BUNDLED WITH
2.2.28
2.2.27
+1
View File
@@ -25,5 +25,6 @@ target 'HelloWorld' do
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
+1 -1
View File
@@ -11,7 +11,7 @@
},
"dependencies": {
"react": "17.0.2",
"react-native": "1000.0.0"
"react-native": "0.67.5"
},
"devDependencies": {
"@babel/core": "^7.12.9",
+139 -10
View File
@@ -1103,6 +1103,26 @@
sudo-prompt "^9.0.0"
wcwidth "^1.0.1"
"@react-native-community/eslint-plugin@*":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.1.0.tgz#e42b1bef12d2415411519fd528e64b593b1363dc"
integrity sha512-W/J0fNYVO01tioHjvYWQ9m6RgndVtbElzYozBq1ZPrHO/iCzlqoySHl4gO/fpCl9QEFjvJfjPgtPMTMlsoq5DQ==
"@react-native/assets@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e"
integrity sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ==
"@react-native/normalize-color@2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.0.0.tgz#da955909432474a9a0fe1cbffc66576a0447f567"
integrity sha512-Wip/xsc5lw8vsBlmY2MO/gFLp3MvuZ2baBZjDeTjjndMgM0h5sxz7AZR62RDPGgstp8Np7JzjvVqVT7tpFZqsw==
"@react-native/polyfills@2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-2.0.0.tgz#4c40b74655c83982c8cf47530ee7dc13d957b6aa"
integrity sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==
"@reactions/component@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@reactions/component/-/component-2.0.2.tgz#40f8c1c2c37baabe57a0c944edb9310dc1ec6642"
@@ -1926,11 +1946,24 @@ chalk@^4.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chalk@^4.1.0:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
char-regex@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==
chardet@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
child-process-promise@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/child-process-promise/-/child-process-promise-2.2.1.tgz#4730a11ef610fad450b8f223c79d31d7bdad8074"
@@ -1976,11 +2009,23 @@ cli-cursor@^2.1.0:
dependencies:
restore-cursor "^2.0.0"
cli-cursor@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
dependencies:
restore-cursor "^3.1.0"
cli-spinners@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7"
integrity sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA==
cli-width@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==
cliui@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49"
@@ -2907,6 +2952,15 @@ extend@~3.0.2:
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
external-editor@^3.0.3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
dependencies:
chardet "^0.7.0"
iconv-lite "^0.4.24"
tmp "^0.0.33"
extglob@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
@@ -2953,6 +3007,13 @@ fb-watchman@^2.0.0:
dependencies:
bser "^2.0.0"
figures@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
dependencies:
escape-string-regexp "^1.0.5"
file-entry-cache@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
@@ -3355,7 +3416,7 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
iconv-lite@0.4.24:
iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
@@ -3424,6 +3485,25 @@ ini@^1.3.4:
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
inquirer@^7.1.0:
version "7.3.3"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003"
integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==
dependencies:
ansi-escapes "^4.2.1"
chalk "^4.1.0"
cli-cursor "^3.1.0"
cli-width "^3.0.0"
external-editor "^3.0.3"
figures "^3.0.0"
lodash "^4.17.19"
mute-stream "0.0.8"
run-async "^2.4.0"
rxjs "^6.6.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"
through "^2.3.6"
internal-slot@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.2.tgz#9c2e9fb3cd8e5e4256c6f45fe310067fcfa378a3"
@@ -4436,11 +4516,16 @@ lodash.throttle@^4.1.1:
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=
lodash@4.x.x, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.5:
lodash@4.x.x, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
lodash@^4.17.19:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
log-driver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
@@ -4904,6 +4989,11 @@ ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
mute-stream@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
mv@~2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/mv/-/mv-2.1.1.tgz#ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2"
@@ -5242,7 +5332,7 @@ os-locale@^3.1.0:
lcid "^2.0.0"
mem "^4.0.0"
os-tmpdir@^1.0.0:
os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
@@ -5572,6 +5662,15 @@ react-is@^16.8.1, react-is@^16.8.4:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react-native-codegen@^0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/react-native-codegen/-/react-native-codegen-0.0.8.tgz#b7796a54074139d956fff2862cf1285db43c891b"
integrity sha512-k/944+0XD+8l7zDaiKfYabyEKmAmyZgS1mj+4LcSRPyHnrjgCHKrh/Y6jM6kucQ6xU1+1uyMmF/dSkikxK8i+Q==
dependencies:
flow-parser "^0.121.0"
jscodeshift "^0.11.0"
nullthrows "^1.1.1"
react-refresh@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.0.tgz#d421f9bd65e0e4b9822a399f14ac56bda9c92292"
@@ -5833,6 +5932,14 @@ restore-cursor@^2.0.0:
onetime "^2.0.0"
signal-exit "^3.0.2"
restore-cursor@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
dependencies:
onetime "^5.1.0"
signal-exit "^3.0.2"
ret@~0.1.10:
version "0.1.15"
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
@@ -5874,6 +5981,18 @@ rsvp@^3.3.3:
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a"
integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==
run-async@^2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
rxjs@^6.6.0:
version "6.6.7"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==
dependencies:
tslib "^1.9.0"
safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
@@ -6171,13 +6290,6 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
source-map-support@0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.0.tgz#2018a7ad2bdf8faf2691e5fddab26bed5a2bacab"
integrity sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==
dependencies:
source-map "^0.6.0"
source-map-support@^0.5.16, source-map-support@^0.5.6:
version "0.5.16"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
@@ -6545,6 +6657,18 @@ through2@^2.0.1:
readable-stream "~2.3.6"
xtend "~4.0.1"
through@^2.3.6:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
dependencies:
os-tmpdir "~1.0.2"
tmpl@1.0.x:
version "1.0.4"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
@@ -6618,6 +6742,11 @@ truncate-utf8-bytes@^1.0.0:
dependencies:
utf8-byte-length "^1.0.1"
tslib@^1.9.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"