Compare commits

...
Author SHA1 Message Date
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
38 changed files with 6121 additions and 827 deletions
+22
View File
@@ -710,6 +710,19 @@ jobs:
# -------------------------
# JOBS: Releases
# -------------------------
prepare_package_for_release:
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
build_npm_package:
parameters:
publish_npm_args:
@@ -843,6 +856,15 @@ workflows:
releases:
jobs:
# This job will trigger on pushes to release branch and commit a version tag to trigger `build_npm_package` for release
- prepare_package_for_release:
name: prepare_package_for_release
filters:
branches:
only:
- /^(\d+)\.(\d+)-stable$/
# This job will trigger when a version tag is pushed (by prepare_package_for_release)
- build_npm_package:
name: build_and_publish_npm_package
publish_npm_args: --release
-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*
+6 -6
View File
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.4)
CFPropertyList (3.0.5)
rexml
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -56,16 +56,16 @@ GEM
colored2 (3.1.2)
concurrent-ruby (1.1.9)
escape (0.0.4)
ethon (0.14.0)
ethon (0.15.0)
ffi (>= 1.15.0)
ffi (1.15.4)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.10)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
json (2.5.1)
json (2.6.1)
minitest (5.14.4)
molinillo (0.8.0)
nanaimo (0.3.0)
@@ -85,7 +85,7 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.4.2)
zeitwerk (2.5.1)
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', () => {
+4 -4
View File
@@ -1,17 +1,17 @@
/**
* @generated by scripts/bump-oss-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,
minor: 67,
patch: 0,
prerelease: null,
prerelease: 'rc.6',
};
@@ -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>(
+5 -5
View File
@@ -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: @(0),
RCTVersionPrerelease: @"rc.6",
};
});
return __rnVersion;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+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
{
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-main
VERSION_NAME=0.67.0-rc.6
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -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
@@ -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");
}
@@ -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,
"minor", 67,
"patch", 0,
"prerelease", null);
"prerelease", "rc.6");
}
+2 -2
View File
@@ -16,9 +16,9 @@ namespace facebook::react {
constexpr struct {
int32_t Major = 0;
int32_t Minor = 0;
int32_t Minor = 67;
int32_t Patch = 0;
std::string_view Prerelease = "";
std::string_view Prerelease = "rc.6";
} ReactNativeVersion;
} // namespace facebook::react
+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
+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
+45 -9
View File
@@ -1,7 +1,6 @@
{
"name": "react-native",
"private": true,
"version": "1000.0.0",
"version": "0.67.0-rc.6",
"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,52 @@
"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"
},
"detox": {
"test-runner": "jest",
@@ -159,4 +195,4 @@
}
}
}
}
}
+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
-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",
@@ -41,7 +38,6 @@
"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",
+180
View File
@@ -0,0 +1,180 @@
/**
* 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,
getNextVersionFromTags,
isTaggedLatest,
isTaggedVersion,
isReleaseBranch,
} = require('../version-utils');
let execResult = null;
jest.mock('shelljs', () => ({
exec: () => {
return {
stdout: execResult,
};
},
}));
describe('version-utils', () => {
describe('isTaggedVersion', () => {
it('should return true on pre-release versions', () => {
execResult = 'v0.66.0-rc.3\nlatest\n\n';
expect(isTaggedVersion('6c19dc3266b84f47a076b647a1c93b3c3b69d2c5')).toBe(
true,
);
});
it('should return true on release versions', () => {
execResult = 'latest\nv0.66.2\n\n';
expect(isTaggedVersion('6c19dc3266b84f47a076b647a1c93b3c3b69d2c5')).toBe(
true,
);
});
it('should return false when no tags', () => {
execResult = '\n';
expect(isTaggedVersion('6c19dc3266b84f47a076b647a1c93b3c3b69d2c5')).toBe(
false,
);
});
it('should return false on tags that are not versions', () => {
execResult = 'latest\n0.someother-made-up-tag\n\n';
expect(isTaggedVersion('6c19dc3266b84f47a076b647a1c93b3c3b69d2c5')).toBe(
false,
);
});
});
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('getNextVersionFromTags', () => {
it('should increment last stable tag', () => {
execResult =
'v0.66.3\nv0.66.2\nv0.66.1\nv0.66.0-rc.4\nv0.66.0-rc.3\nv0.66.0-rc.2\nv0.66.0-rc.1\nv0.66.0-rc.0';
expect(getNextVersionFromTags('0.66-stable')).toBe('0.66.4');
});
it('should find last prerelease tag and increment', () => {
execResult =
'v0.66.0-rc.4\nv0.66.0-rc.3\nv0.66.0-rc.2\nv0.66.0-rc.1\nv0.66.0-rc.0';
expect(getNextVersionFromTags('0.66-stable')).toBe('0.66.0-rc.5');
});
it('should return rc.0 version if no previous tags', () => {
execResult = '\n';
expect(getNextVersionFromTags('0.66-stable')).toBe('0.66.0-rc.0');
});
});
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();
});
});
});
+17 -9
View File
@@ -19,6 +19,7 @@
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('r', {
@@ -33,6 +34,11 @@ let argv = yargs
.option('v', {
alias: 'to-version',
type: 'string',
})
.option('l', {
alias: 'latest',
type: 'boolean',
default: false,
}).argv;
const nightlyBuild = argv.nightly;
@@ -70,15 +76,16 @@ if (!nightlyBuild) {
}
}
// 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}`,
);
let major,
minor,
patch,
prerelease = -1;
try {
({major, minor, patch, prerelease} = parseVersion(version));
} catch (e) {
echo(e.message);
exit(1);
}
let [, major, minor, patch, prerelease] = match;
fs.writeFileSync(
'ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java',
@@ -219,8 +226,9 @@ if (!nightlyBuild) {
let remote = argv.remote;
exec(`git push ${remote} v${version}`);
// Tag latest if doing stable release
if (version.indexOf('rc') === -1) {
// Tag latest if doing stable release.
// This will also tag npm release as `latest`
if (prerelease == null && argv.latest) {
exec('git tag -d latest');
exec(`git push ${remote} :latest`);
exec('git tag latest');
+102
View File
@@ -0,0 +1,102 @@
/**
* 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 run by CircleCI on a push to a release branch
* 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,
isTaggedLatest,
isTaggedVersion,
getNextVersionFromTags,
} = require('./version-utils');
const branch = process.env.CIRCLE_BRANCH;
const currentCommit = process.env.CIRCLE_SHA1;
const argv = yargs.option('r', {
alias: 'remote',
default: 'origin',
}).argv;
// We do this check to prevent a loop of commit in this script to trigger the job again.
// I haven't figured out a way for CircleCI to filter out commits from CircleCI jobs
if (isTaggedVersion(currentCommit)) {
console.log(
'Skip running prepare-package-for-release as this job was triggered from previous run of this script.',
);
exit(0);
}
if (!isReleaseBranch(branch)) {
console.error('This needs to be on a release branch');
exit(1);
}
// Progress the version by 1 using existing git tags
const version = getNextVersionFromTags(branch);
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);
}
// Check if this release has been tagged as latest
const isLatest = isTaggedLatest(currentCommit);
// 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);
}
// Since we just committed, if `isLatest`, move the tag to commit we just made
// This tag will also update npm release as `latest`
if (isLatest) {
exec('git tag -d latest');
exec(`git push ${remote} :latest`);
exec('git tag latest');
exec(`git push ${remote} latest`);
}
// Add tag v0.21.0-rc.1
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}`);
exec(`git push ${remote} ${branch} --follow-tags`);
exit(0);
+61 -77
View File
@@ -10,7 +10,7 @@
'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
@@ -49,11 +49,14 @@
* 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)
*/
/*eslint-disable no-undef */
require('shelljs/global');
const {exec, echo, exit, test} = require('shelljs');
const yargs = require('yargs');
const {parseVersion} = 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 +67,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 manually call bump-oss-version on release branch
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');
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 +155,24 @@ if (dryRunBuild) {
exit(0);
}
// if version contains -rc, tag as prerelease
// Running to see if this commit has been git tagged as `latest`
const latestCommit = exec("git rev-list -n 1 'latest'", {
silent: true,
}).stdout.replace('\n', '');
const isLatest = currentCommit === latestCommit;
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 +184,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/"
+19 -3
View File
@@ -374,8 +374,24 @@ 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.
`sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' Pods/RCT-Folly/folly/portability/Time.h`
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)
+100
View File
@@ -0,0 +1,100 @@
/**
* 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 getLatestVersionTag(branchVersion) {
// Returns list of tags like ["v0.67.2", "v0.67.1", "v0.67.0-rc.3", "v0.67.0-rc.2", ...] in reverse lexical order
const tags = exec(`git tag --list "v${branchVersion}*" --sort=-refname`, {
silent: true,
})
.stdout.trim()
.split('\n')
.filter(tag => tag.length > 0);
// If there are no tags, return null
if (tags.length === 0) {
return null;
}
// Return most recent tag (with the "v" prefix)
return tags[0];
}
function getNextVersionFromTags(branch) {
// Assumption that branch names will follow pattern `{major}.{minor}-stable`
// Ex. "0.67-stable" -> "0.67"
const branchVersion = branch.replace('-stable', '');
// Get the latest version tag of the release branch
const versionTag = getLatestVersionTag(branchVersion);
// If there are no tags , we assume this is the first pre-release
if (versionTag == null) {
return `${branchVersion}.0-rc.0`;
}
const {major, minor, patch, prerelease} = parseVersion(versionTag);
if (prerelease != null) {
// prelease is of the form "rc.X"
const prereleasePatch = parseInt(prerelease.slice(3), 10);
return `${major}.${minor}.${patch}-rc.${prereleasePatch + 1}`;
}
// If not prerelease, increment the patch version
return `${major}.${minor}.${parseInt(patch, 10) + 1}`;
}
function isReleaseBranch(branch) {
return branch.endsWith('-stable');
}
function isTaggedVersion(commitSha) {
const tags = exec(`git tag --points-at ${commitSha}`, {
silent: true,
})
.stdout.trim()
.split('\n');
return tags.some(tag => !!tag.match(VERSION_REGEX));
}
function isTaggedLatest(commitSha) {
return (
exec(`git rev-list -1 latest | grep ${commitSha}`, {
silent: true,
}).stdout.trim() === commitSha
);
}
module.exports = {
isTaggedLatest,
isTaggedVersion,
parseVersion,
getNextVersionFromTags,
isReleaseBranch,
};
+7 -7
View File
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.4)
CFPropertyList (3.0.5)
rexml
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -56,16 +56,16 @@ GEM
colored2 (3.1.2)
concurrent-ruby (1.1.9)
escape (0.0.4)
ethon (0.14.0)
ethon (0.15.0)
ffi (>= 1.15.0)
ffi (1.15.4)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.10)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
json (2.5.1)
json (2.6.1)
minitest (5.14.4)
molinillo (0.8.0)
nanaimo (0.3.0)
@@ -85,10 +85,10 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.4.2)
zeitwerk (2.5.1)
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.0-rc.6"
},
"devDependencies": {
"@babel/core": "^7.12.9",
+29 -7
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"
@@ -5572,6 +5592,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"
@@ -6171,13 +6200,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"