react-native 0.64.0-rc.3 → 0.64.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/Libraries/Blob/URL.js +1 -1
  2. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -0
  3. package/Libraries/Core/ReactNativeVersion.js +2 -2
  4. package/React/Base/RCTVersion.m +2 -2
  5. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +2075 -0
  6. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +2543 -0
  7. package/React/Views/RefreshControl/RCTRefreshControl.m +5 -0
  8. package/React.podspec +1 -1
  9. package/ReactAndroid/gradle.properties +1 -1
  10. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp +15 -0
  11. package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +1 -0
  12. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
  13. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.java +12 -3
  14. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +2 -3
  15. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  16. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2-javadoc.jar +0 -0
  17. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2-javadoc.jar.md5 +1 -0
  18. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2-javadoc.jar.sha1 +1 -0
  19. package/android/com/facebook/react/react-native/{0.64.0-rc.3/react-native-0.64.0-rc.3-sources.jar → 0.64.2/react-native-0.64.2-sources.jar} +0 -0
  20. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2-sources.jar.md5 +1 -0
  21. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2-sources.jar.sha1 +1 -0
  22. package/android/com/facebook/react/react-native/{0.64.0-rc.3/react-native-0.64.0-rc.3.aar → 0.64.2/react-native-0.64.2.aar} +0 -0
  23. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2.aar.md5 +1 -0
  24. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2.aar.sha1 +1 -0
  25. package/android/com/facebook/react/react-native/{0.64.0-rc.3/react-native-0.64.0-rc.3.pom → 0.64.2/react-native-0.64.2.pom} +1 -1
  26. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2.pom.md5 +1 -0
  27. package/android/com/facebook/react/react-native/0.64.2/react-native-0.64.2.pom.sha1 +1 -0
  28. package/android/com/facebook/react/react-native/maven-metadata.xml +3 -3
  29. package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
  30. package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
  31. package/package.json +6 -4
  32. package/react.gradle +3 -9
  33. package/scripts/find-node.sh +37 -0
  34. package/scripts/generate-specs-cli.js +1 -1
  35. package/scripts/generate-specs.sh +7 -17
  36. package/scripts/react-native-xcode.sh +2 -23
  37. package/scripts/react_native_pods.rb +35 -4
  38. package/template/_editorconfig +3 -0
  39. package/template/_gitattributes +3 -0
  40. package/template/android/gradle.properties +1 -1
  41. package/template/package.json +1 -2
  42. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3-javadoc.jar +0 -0
  43. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3-javadoc.jar.md5 +0 -1
  44. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3-javadoc.jar.sha1 +0 -1
  45. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3-sources.jar.md5 +0 -1
  46. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3-sources.jar.sha1 +0 -1
  47. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3.aar.md5 +0 -1
  48. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3.aar.sha1 +0 -1
  49. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3.pom.md5 +0 -1
  50. package/android/com/facebook/react/react-native/0.64.0-rc.3/react-native-0.64.0-rc.3.pom.sha1 +0 -1
@@ -41,6 +41,11 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
41
41
  {
42
42
  [super layoutSubviews];
43
43
 
44
+ // Fix for bug #7976
45
+ if (self.backgroundColor == nil) {
46
+ self.backgroundColor = [UIColor clearColor];
47
+ }
48
+
44
49
  // If the control is refreshing when mounted we need to call
45
50
  // beginRefreshing in layoutSubview or it doesn't work.
46
51
  if (_currentRefreshingState && _isInitialRender) {
package/React.podspec CHANGED
@@ -39,7 +39,7 @@ Pod::Spec.new do |s|
39
39
  s.platforms = { :ios => "10.0" }
40
40
  s.source = source
41
41
  s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
42
- s.cocoapods_version = ">= 1.2.0"
42
+ s.cocoapods_version = ">= 1.10.1"
43
43
 
44
44
  s.dependency "React-Core", version
45
45
  s.dependency "React-Core/DevSupport", version
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.64.0-rc.3
1
+ VERSION_NAME=0.64.2
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative
@@ -7,7 +7,9 @@
7
7
 
8
8
  #include <../instrumentation/HermesMemoryDumper.h>
9
9
  #include <HermesExecutorFactory.h>
10
+ #include <android/log.h>
10
11
  #include <fbjni/fbjni.h>
12
+ #include <glog/logging.h>
11
13
  #include <hermes/Public/GCConfig.h>
12
14
  #include <hermes/Public/RuntimeConfig.h>
13
15
  #include <jni.h>
@@ -21,6 +23,13 @@
21
23
  namespace facebook {
22
24
  namespace react {
23
25
 
26
+ static void hermesFatalHandler(const std::string &reason) {
27
+ LOG(ERROR) << "Hermes Fatal: " << reason << "\n";
28
+ __android_log_assert(nullptr, "Hermes", "%s", reason.c_str());
29
+ }
30
+
31
+ static std::once_flag flag;
32
+
24
33
  static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) {
25
34
  namespace vm = ::hermes::vm;
26
35
  auto gcConfigBuilder =
@@ -62,6 +71,9 @@ class HermesExecutorHolder
62
71
  jni::alias_ref<jclass>) {
63
72
  JReactMarker::setLogPerfMarkerIfNeeded();
64
73
 
74
+ std::call_once(flag, []() {
75
+ facebook::hermes::HermesRuntime::setFatalHandler(hermesFatalHandler);
76
+ });
65
77
  return makeCxxInstance(
66
78
  std::make_unique<HermesExecutorFactory>(installBindings));
67
79
  }
@@ -71,6 +83,9 @@ class HermesExecutorHolder
71
83
  jlong heapSizeMB) {
72
84
  JReactMarker::setLogPerfMarkerIfNeeded();
73
85
  auto runtimeConfig = makeRuntimeConfig(heapSizeMB);
86
+ std::call_once(flag, []() {
87
+ facebook::hermes::HermesRuntime::setFatalHandler(hermesFatalHandler);
88
+ });
74
89
  return makeCxxInstance(std::make_unique<HermesExecutorFactory>(
75
90
  installBindings, JSIExecutor::defaultTimeoutInvoker, runtimeConfig));
76
91
  }
@@ -756,6 +756,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
756
756
  return;
757
757
  }
758
758
  mDeviceRotation = rotation;
759
+ DisplayMetricsHolder.initDisplayMetrics(getContext().getApplicationContext());
759
760
  emitOrientationChanged(rotation);
760
761
  }
761
762
 
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 64,
20
- "patch", 0,
21
- "prerelease", "rc.3");
20
+ "patch", 2,
21
+ "prerelease", null);
22
22
  }
@@ -86,9 +86,18 @@ public class UIManagerHelper {
86
86
  }
87
87
  }
88
88
  CatalystInstance catalystInstance = context.getCatalystInstance();
89
- return uiManagerType == FABRIC
90
- ? (UIManager) catalystInstance.getJSIModule(JSIModuleType.UIManager)
91
- : catalystInstance.getNativeModule(UIManagerModule.class);
89
+ try {
90
+ return uiManagerType == FABRIC
91
+ ? (UIManager) catalystInstance.getJSIModule(JSIModuleType.UIManager)
92
+ : catalystInstance.getNativeModule(UIManagerModule.class);
93
+ } catch (IllegalArgumentException ex) {
94
+ // TODO T67518514 Clean this up once we migrate everything over to bridgeless mode
95
+ ReactSoftException.logSoftException(
96
+ "UIManagerHelper",
97
+ new ReactNoCrashSoftException(
98
+ "Cannot get UIManager for UIManagerType: " + uiManagerType));
99
+ return catalystInstance.getNativeModule(UIManagerModule.class);
100
+ }
92
101
  }
93
102
 
94
103
  /**
@@ -419,11 +419,10 @@ public class ReactEditText extends AppCompatEditText
419
419
  @Override
420
420
  public void setInputType(int type) {
421
421
  Typeface tf = super.getTypeface();
422
- // Input type password defaults to monospace font, so we need to re-apply the font
423
- super.setTypeface(tf);
424
-
425
422
  super.setInputType(type);
426
423
  mStagedInputType = type;
424
+ // Input type password defaults to monospace font, so we need to re-apply the font
425
+ super.setTypeface(tf);
427
426
 
428
427
  /**
429
428
  * If set forces multiline on input, because of a restriction on Android source that enables
@@ -17,8 +17,8 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 64;
20
- int32_t Patch = 0;
21
- std::string_view Prerelease = "rc.3";
20
+ int32_t Patch = 2;
21
+ std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -0,0 +1 @@
1
+ e8a3a3f036a7a55542771d47423f418a
@@ -0,0 +1 @@
1
+ 9a9a2a82e3c0ccab2be64811dbcf410daaad0606
@@ -0,0 +1 @@
1
+ 800c212ea74543460073cf215e14ecc1
@@ -0,0 +1 @@
1
+ e7cc76356f65928f018b08474ee2d7531da0c6a7
@@ -0,0 +1 @@
1
+ a1f4484c294eb3e3e436da5edee9c0c5
@@ -0,0 +1 @@
1
+ 01a1fcfa725f135acc21e96ed71ff432b1fc553f
@@ -4,7 +4,7 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>com.facebook.react</groupId>
6
6
  <artifactId>react-native</artifactId>
7
- <version>0.64.0-rc.3</version>
7
+ <version>0.64.2</version>
8
8
  <packaging>aar</packaging>
9
9
  <name>ReactNative</name>
10
10
  <description>A framework for building native apps with React</description>
@@ -0,0 +1 @@
1
+ 389f95f84193a6364d9a78816107b307
@@ -0,0 +1 @@
1
+ 48fcceb199d9f1fa6010c5e9e54d824cb21ce869
@@ -3,10 +3,10 @@
3
3
  <groupId>com.facebook.react</groupId>
4
4
  <artifactId>react-native</artifactId>
5
5
  <versioning>
6
- <release>0.64.0-rc.3</release>
6
+ <release>0.64.2</release>
7
7
  <versions>
8
- <version>0.64.0-rc.3</version>
8
+ <version>0.64.2</version>
9
9
  </versions>
10
- <lastUpdated>20210205214620</lastUpdated>
10
+ <lastUpdated>20210603172949</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -1 +1 @@
1
- 11ae1bcb22c1790acd75ec488eecd092
1
+ bbff08476171883317414c491685e186
@@ -1 +1 @@
1
- 06d09162330ca9c0d9d5eab4fb59598882ee70b6
1
+ 9cd18d3514fed67424012c4c3b34b3e533a63c7a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.64.0-rc.3",
3
+ "version": "0.64.2",
4
4
  "bin": "./cli.js",
5
5
  "description": "A framework for building native apps using React",
6
6
  "license": "MIT",
@@ -46,6 +46,7 @@
46
46
  "scripts/packager.sh",
47
47
  "scripts/react_native_pods.rb",
48
48
  "scripts/react-native-xcode.sh",
49
+ "scripts/find-node.sh",
49
50
  "template.config.js",
50
51
  "template",
51
52
  "third-party-podspecs"
@@ -83,9 +84,9 @@
83
84
  },
84
85
  "dependencies": {
85
86
  "@jest/create-cache-key-function": "^26.5.0",
86
- "@react-native-community/cli": "^5.0.1-alpha.0",
87
- "@react-native-community/cli-platform-android": "^5.0.1-alpha.0",
88
- "@react-native-community/cli-platform-ios": "^5.0.1-alpha.0",
87
+ "@react-native-community/cli": "^5.0.1-alpha.1",
88
+ "@react-native-community/cli-platform-android": "^5.0.1-alpha.1",
89
+ "@react-native-community/cli-platform-ios": "^5.0.1-alpha.1",
89
90
  "@react-native/assets": "1.0.0",
90
91
  "@react-native/normalize-color": "1.0.0",
91
92
  "@react-native/polyfills": "1.0.0",
@@ -105,6 +106,7 @@
105
106
  "promise": "^8.0.3",
106
107
  "prop-types": "^15.7.2",
107
108
  "react-devtools-core": "^4.6.0",
109
+ "react-native-codegen": "^0.0.6",
108
110
  "react-refresh": "^0.4.0",
109
111
  "regenerator-runtime": "^0.13.2",
110
112
  "scheduler": "^0.20.1",
package/react.gradle CHANGED
@@ -28,17 +28,11 @@ def detectCliPath(config) {
28
28
  if (config.cliPath) {
29
29
  return config.cliPath
30
30
  }
31
-
32
- def cliPath = ["node", "-e", "console.log(require('react-native/cli').bin);"].execute([], projectDir).text.trim()
33
-
34
- if (cliPath) {
35
- return cliPath
36
- } else if (new File("${projectDir}/../../node_modules/react-native/cli.js").exists()) {
31
+ if (new File("${projectDir}/../../node_modules/react-native/cli.js").exists()) {
37
32
  return "${projectDir}/../../node_modules/react-native/cli.js"
38
- } else {
39
- throw new Exception("Couldn't determine CLI location. " +
40
- "Please set `project.ext.react.cliPath` to the path of the react-native cli.js");
41
33
  }
34
+ throw new Exception("Couldn't determine CLI location. " +
35
+ "Please set `project.ext.react.cliPath` to the path of the react-native cli.js");
42
36
  }
43
37
 
44
38
  def composeSourceMapsPath = config.composeSourceMapsPath ?: "node_modules/react-native/scripts/compose-source-maps.js"
@@ -0,0 +1,37 @@
1
+ #!/bin/bash
2
+ # Copyright (c) Facebook, Inc. and its affiliates.
3
+ #
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ set -e
8
+
9
+ # Define NVM_DIR and source the nvm.sh setup script
10
+ [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
11
+
12
+ if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
13
+ . "$HOME/.nvm/nvm.sh"
14
+ elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
15
+ . "$(brew --prefix nvm)/nvm.sh"
16
+ fi
17
+
18
+ # Set up the nodenv node version manager if present
19
+ if [[ -x "$HOME/.nodenv/bin/nodenv" ]]; then
20
+ eval "$("$HOME/.nodenv/bin/nodenv" init -)"
21
+ elif [[ -x "$(command -v brew)" && -x "$(brew --prefix nodenv)/bin/nodenv" ]]; then
22
+ eval "$("$(brew --prefix nodenv)/bin/nodenv" init -)"
23
+ fi
24
+
25
+ # Set up the ndenv of anyenv if preset
26
+ if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
27
+ export PATH=${HOME}/.anyenv/bin:${PATH}
28
+ if [[ "$(anyenv envs | grep -c ndenv )" -eq 1 ]]; then
29
+ eval "$(anyenv init -)"
30
+ fi
31
+ fi
32
+
33
+ # Support Homebrew on M1
34
+ HOMEBREW_M1_BIN=/opt/homebrew/bin
35
+ if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
36
+ export PATH="$HOMEBREW_M1_BIN:$PATH"
37
+ fi
@@ -25,7 +25,7 @@ const path = require('path');
25
25
 
26
26
  const GENERATORS = {
27
27
  android: ['modulesAndroid'],
28
- ios: ['componentsIOS', 'modulesIOS'],
28
+ ios: ['modulesIOS'],
29
29
  };
30
30
 
31
31
  function generateSpec(
@@ -27,6 +27,10 @@ set -e
27
27
  THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
28
28
  TEMP_DIR=$(mktemp -d /tmp/react-native-codegen-XXXXXXXX)
29
29
  RN_DIR=$(cd "$THIS_DIR/.." && pwd)
30
+
31
+ # find node path
32
+ source "$RN_DIR/scripts/find-node.sh"
33
+
30
34
  NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
31
35
  USE_FABRIC="${USE_FABRIC:-0}"
32
36
 
@@ -53,33 +57,19 @@ main() {
53
57
  TEMP_OUTPUT_DIR="$TEMP_DIR/out"
54
58
  SCHEMA_FILE="$TEMP_DIR/schema.json"
55
59
 
56
- CODEGEN_REPO_PATH="$RN_DIR/packages/react-native-codegen"
57
- CODEGEN_NPM_PATH="$RN_DIR/../react-native-codegen"
58
-
59
- if [ -z "$NODE_BINARY" ]; then
60
+ if [ -z "$NODE_BINARY" ]; then
60
61
  echo "Error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable." 1>&2
61
62
  exit 1
62
63
  fi
63
64
 
64
- if [ -d "$CODEGEN_REPO_PATH" ]; then
65
- CODEGEN_PATH=$(cd "$CODEGEN_REPO_PATH" && pwd)
66
- elif [ -d "$CODEGEN_NPM_PATH" ]; then
67
- CODEGEN_PATH=$(cd "$CODEGEN_NPM_PATH" && pwd)
68
- else
69
- echo "Error: Could not determine react-native-codegen location. Try running 'yarn install' or 'npm install' in your project root." 1>&2
70
- exit 1
71
- fi
65
+ CODEGEN_PATH=$("$NODE_BINARY" -e "console.log(require('path').dirname(require.resolve('react-native-codegen/package.json')))")
72
66
 
67
+ # Special case for running CodeGen from source: build it
73
68
  if [ ! -d "$CODEGEN_PATH/lib" ]; then
74
69
  describe "Building react-native-codegen package"
75
70
  bash "$CODEGEN_PATH/scripts/oss/build.sh"
76
71
  fi
77
72
 
78
- if [ -z "$NODE_BINARY" ]; then
79
- echo "Error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable." 1>&2
80
- exit 1
81
- fi
82
-
83
73
  describe "Generating schema from flow types"
84
74
  "$NODE_BINARY" "$CODEGEN_PATH/lib/cli/combine/combine-js-to-schema-cli.js" "$SCHEMA_FILE" "$SRCS_DIR"
85
75
 
@@ -64,9 +64,6 @@ PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../.."}
64
64
 
65
65
  cd "$PROJECT_ROOT" || exit
66
66
 
67
- # Define NVM_DIR and source the nvm.sh setup script
68
- [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
69
-
70
67
  # Define entry file
71
68
  if [[ "$ENTRY_FILE" ]]; then
72
69
  # Use ENTRY_FILE defined by user
@@ -82,26 +79,8 @@ if [[ $DEV != true && ! -f "$ENTRY_FILE" ]]; then
82
79
  exit 2
83
80
  fi
84
81
 
85
- if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
86
- . "$HOME/.nvm/nvm.sh"
87
- elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
88
- . "$(brew --prefix nvm)/nvm.sh"
89
- fi
90
-
91
- # Set up the nodenv node version manager if present
92
- if [[ -x "$HOME/.nodenv/bin/nodenv" ]]; then
93
- eval "$("$HOME/.nodenv/bin/nodenv" init -)"
94
- elif [[ -x "$(command -v brew)" && -x "$(brew --prefix nodenv)/bin/nodenv" ]]; then
95
- eval "$("$(brew --prefix nodenv)/bin/nodenv" init -)"
96
- fi
97
-
98
- # Set up the ndenv of anyenv if preset
99
- if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
100
- export PATH=${HOME}/.anyenv/bin:${PATH}
101
- if [[ "$(anyenv envs | grep -c ndenv )" -eq 1 ]]; then
102
- eval "$(anyenv init -)"
103
- fi
104
- fi
82
+ # find node path
83
+ source "$REACT_NATIVE_DIR/scripts/find-node.sh"
105
84
 
106
85
  # check and assign NODE_BINARY env
107
86
  # shellcheck source=/dev/null
@@ -64,17 +64,17 @@ def use_react_native! (options={})
64
64
  if hermes_enabled
65
65
  pod 'React-Core/Hermes', :path => "#{prefix}/"
66
66
  pod 'hermes-engine', '~> 0.7.2'
67
- pod 'libevent', :podspec => "#{prefix}/third-party-podspecs/libevent.podspec"
67
+ pod 'libevent', '~> 2.1.12'
68
68
  end
69
69
  end
70
70
 
71
71
  def use_flipper!(versions = {}, configurations: ['Debug'])
72
- versions['Flipper'] ||= '~> 0.54.0'
72
+ versions['Flipper'] ||= '~> 0.75.1'
73
73
  versions['Flipper-DoubleConversion'] ||= '1.1.7'
74
- versions['Flipper-Folly'] ||= '~> 2.2'
74
+ versions['Flipper-Folly'] ||= '~> 2.5.3'
75
75
  versions['Flipper-Glog'] ||= '0.3.6'
76
76
  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
77
- versions['Flipper-RSocket'] ||= '~> 1.1'
77
+ versions['Flipper-RSocket'] ||= '~> 1.3'
78
78
  pod 'FlipperKit', versions['Flipper'], :configurations => configurations
79
79
  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configurations => configurations
80
80
  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configurations => configurations
@@ -138,10 +138,26 @@ def exclude_architectures(installer)
138
138
  end
139
139
 
140
140
  def react_native_post_install(installer)
141
+ pods_prefix = File.dirname(installer.pods_project.path)
142
+
141
143
  if has_pod(installer, 'Flipper')
142
144
  flipper_post_install(installer)
143
145
  end
144
146
 
147
+ ## Fix for RTC-Folly on iOS 14.5 - makes Hermes work again
148
+ find_and_replace(
149
+ "#{pods_prefix}/RCT-Folly/folly/synchronization/DistributedMutex-inl.h",
150
+ 'atomic_notify_one(state)',
151
+ 'folly::atomic_notify_one(state)'
152
+ )
153
+
154
+ find_and_replace(
155
+ "#{pods_prefix}Pods/RCT-Folly/folly/synchronization/DistributedMutex-inl.h",
156
+ 'atomic_wait_until(&state, previous | data, deadline)',
157
+ 'folly::atomic_wait_until(&state, previous | data, deadline)'
158
+ )
159
+
160
+ ## Exclude `i386` from valid architectures when building with Hermes on iOS
145
161
  exclude_architectures(installer)
146
162
  end
147
163
 
@@ -199,3 +215,18 @@ def use_react_native_codegen!(spec, options={})
199
215
 
200
216
  spec.prepare_command = "#{mkdir_command} && touch #{generated_files.reduce() { |str, file| str + " " + file }}"
201
217
  end
218
+
219
+ # Local method for the Xcode 12.5 fix
220
+ def find_and_replace(dir, findstr, replacestr)
221
+ Dir[dir].each do |name|
222
+ text = File.read(name)
223
+ replace = text.gsub(findstr, replacestr)
224
+ replaced = text.index(replacestr)
225
+ next if !replaced.nil? || text == replace
226
+
227
+ puts "Patching #{name}"
228
+ File.open(name, 'w') { |file| file.puts replace }
229
+ $stdout.flush
230
+ end
231
+ Dir["#{dir}*/"].each(&method(:find_and_replace))
232
+ end
@@ -0,0 +1,3 @@
1
+ # Windows files
2
+ [*.bat]
3
+ end_of_line = crlf
@@ -0,0 +1,3 @@
1
+ # Windows files should use crlf line endings
2
+ # https://help.github.com/articles/dealing-with-line-endings/
3
+ *.bat text eol=crlf
@@ -25,4 +25,4 @@ android.useAndroidX=true
25
25
  android.enableJetifier=true
26
26
 
27
27
  # Version of flipper SDK to use with React Native
28
- FLIPPER_VERSION=0.54.0
28
+ FLIPPER_VERSION=0.75.1
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "17.0.1",
14
- "react-native": "0.64.0-rc.3"
14
+ "react-native": "0.64.2"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.12.9",
@@ -21,7 +21,6 @@
21
21
  "eslint": "7.14.0",
22
22
  "jest": "^26.6.3",
23
23
  "metro-react-native-babel-preset": "^0.64.0",
24
- "react-native-codegen": "^0.0.7",
25
24
  "react-test-renderer": "17.0.1"
26
25
  },
27
26
  "jest": {
@@ -1 +0,0 @@
1
- e259bd69dd7e634132b9e0e48963143a6453fa93
@@ -1 +0,0 @@
1
- e86de9cb86f79b778e215c6a69f230994b41227b
@@ -1 +0,0 @@
1
- 9082cf595af1061296e0a274bd73c1bc
@@ -1 +0,0 @@
1
- 1fa4f8db66e914ba7f16f0f43393ecdf2e0043ec
@@ -1 +0,0 @@
1
- 37557cdfec0612ab2d05c812283aa240
@@ -1 +0,0 @@
1
- c81792f2faf5e32ed1ae1b5ef8946df729c744ac