react-native 0.64.0-rc.4 → 0.64.3

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/CoreModules/RCTAppearance.mm +3 -1
  6. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +2075 -0
  7. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +2543 -0
  8. package/React/Views/RefreshControl/RCTRefreshControl.m +5 -0
  9. package/React.podspec +1 -1
  10. package/ReactAndroid/gradle.properties +1 -1
  11. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp +15 -0
  12. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +7 -0
  13. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +7 -0
  14. package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +1 -0
  15. package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java +10 -1
  16. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
  17. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.java +12 -3
  18. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +2 -3
  19. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  20. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3-javadoc.jar +0 -0
  21. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3-javadoc.jar.md5 +1 -0
  22. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3-javadoc.jar.sha1 +1 -0
  23. package/android/com/facebook/react/react-native/{0.64.0-rc.4/react-native-0.64.0-rc.4-sources.jar → 0.64.3/react-native-0.64.3-sources.jar} +0 -0
  24. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3-sources.jar.md5 +1 -0
  25. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3-sources.jar.sha1 +1 -0
  26. package/android/com/facebook/react/react-native/{0.64.0-rc.4/react-native-0.64.0-rc.4.aar → 0.64.3/react-native-0.64.3.aar} +0 -0
  27. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3.aar.md5 +1 -0
  28. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3.aar.sha1 +1 -0
  29. package/android/com/facebook/react/react-native/{0.64.0-rc.4/react-native-0.64.0-rc.4.pom → 0.64.3/react-native-0.64.3.pom} +1 -1
  30. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3.pom.md5 +1 -0
  31. package/android/com/facebook/react/react-native/0.64.3/react-native-0.64.3.pom.sha1 +1 -0
  32. package/android/com/facebook/react/react-native/maven-metadata.xml +3 -3
  33. package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
  34. package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
  35. package/package.json +4 -4
  36. package/react.gradle +3 -9
  37. package/scripts/find-node.sh +7 -1
  38. package/scripts/react_native_pods.rb +32 -1
  39. package/template/_editorconfig +3 -0
  40. package/template/_gitattributes +3 -0
  41. package/template/package.json +1 -1
  42. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4-javadoc.jar +0 -0
  43. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4-javadoc.jar.md5 +0 -1
  44. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4-javadoc.jar.sha1 +0 -1
  45. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4-sources.jar.md5 +0 -1
  46. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4-sources.jar.sha1 +0 -1
  47. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4.aar.md5 +0 -1
  48. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4.aar.sha1 +0 -1
  49. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4.pom.md5 +0 -1
  50. package/android/com/facebook/react/react-native/0.64.0-rc.4/react-native-0.64.0-rc.4.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.4
1
+ VERSION_NAME=0.64.3
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
  }
@@ -8,6 +8,7 @@
8
8
  package com.facebook.react;
9
9
 
10
10
  import android.content.Intent;
11
+ import android.content.res.Configuration;
11
12
  import android.os.Bundle;
12
13
  import android.view.KeyEvent;
13
14
  import androidx.annotation.Nullable;
@@ -120,6 +121,12 @@ public abstract class ReactActivity extends AppCompatActivity
120
121
  mDelegate.onWindowFocusChanged(hasFocus);
121
122
  }
122
123
 
124
+ @Override
125
+ public void onConfigurationChanged(Configuration newConfig) {
126
+ super.onConfigurationChanged(newConfig);
127
+ mDelegate.onConfigurationChanged(newConfig);
128
+ }
129
+
123
130
  protected final ReactNativeHost getReactNativeHost() {
124
131
  return mDelegate.getReactNativeHost();
125
132
  }
@@ -11,6 +11,7 @@ import android.annotation.TargetApi;
11
11
  import android.app.Activity;
12
12
  import android.content.Context;
13
13
  import android.content.Intent;
14
+ import android.content.res.Configuration;
14
15
  import android.os.Build;
15
16
  import android.os.Bundle;
16
17
  import android.view.KeyEvent;
@@ -154,6 +155,12 @@ public class ReactActivityDelegate {
154
155
  }
155
156
  }
156
157
 
158
+ public void onConfigurationChanged(Configuration newConfig) {
159
+ if (getReactNativeHost().hasInstance()) {
160
+ getReactInstanceManager().onConfigurationChanged(getContext(), newConfig);
161
+ }
162
+ }
163
+
157
164
  @TargetApi(Build.VERSION_CODES.M)
158
165
  public void requestPermissions(
159
166
  String[] permissions, int requestCode, PermissionListener listener) {
@@ -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
 
@@ -7,6 +7,7 @@
7
7
 
8
8
  package com.facebook.react.modules.appearance;
9
9
 
10
+ import android.app.Activity;
10
11
  import android.content.Context;
11
12
  import android.content.res.Configuration;
12
13
  import androidx.annotation.Nullable;
@@ -74,7 +75,15 @@ public class AppearanceModule extends NativeAppearanceSpec {
74
75
 
75
76
  @Override
76
77
  public String getColorScheme() {
77
- mColorScheme = colorSchemeForCurrentConfiguration(getReactApplicationContext());
78
+ // Attempt to use the Activity context first in order to get the most up to date
79
+ // scheme. This covers the scenario when AppCompatDelegate.setDefaultNightMode()
80
+ // is called directly (which can occur in Brownfield apps for example).
81
+ Activity activity = getCurrentActivity();
82
+
83
+ mColorScheme =
84
+ colorSchemeForCurrentConfiguration(
85
+ activity != null ? activity : getReactApplicationContext());
86
+
78
87
  return mColorScheme;
79
88
  }
80
89
 
@@ -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.4");
20
+ "patch", 3,
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.4";
20
+ int32_t Patch = 3;
21
+ std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -0,0 +1 @@
1
+ 72d6a6b364bfe42709f701c11690b4d3
@@ -0,0 +1 @@
1
+ 642a7df62ed900cf62f369776e512575f9d38158
@@ -0,0 +1 @@
1
+ 5e29dde11cfa8efa02db8824bb240067
@@ -0,0 +1 @@
1
+ db3abca58136782da3a093c5b9eaa625be5637bd
@@ -0,0 +1 @@
1
+ 9250c1f87e25c2824138f039450d9b17
@@ -0,0 +1 @@
1
+ 654ef2ffdf7482e57c8699b3a0f8217d4050e581
@@ -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.4</version>
7
+ <version>0.64.3</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
+ 83a7a81248847a9b98c3158d74119496
@@ -0,0 +1 @@
1
+ 2e42f2fe647d72ab193cb92ea94b5ac9ea258bd0
@@ -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.4</release>
6
+ <release>0.64.3</release>
7
7
  <versions>
8
- <version>0.64.0-rc.4</version>
8
+ <version>0.64.3</version>
9
9
  </versions>
10
- <lastUpdated>20210301194623</lastUpdated>
10
+ <lastUpdated>20211104212221</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -1 +1 @@
1
- e1db36338d56ae54c79930054315902b
1
+ e293d1fe02f2adb7a9e27084ab808332
@@ -1 +1 @@
1
- 520c1ed955799023b46aa0cd89a207f68f81a751
1
+ 986a21d91084f453cc9a13e853a9bbb8c362fd72
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.64.0-rc.4",
3
+ "version": "0.64.3",
4
4
  "bin": "./cli.js",
5
5
  "description": "A framework for building native apps using React",
6
6
  "license": "MIT",
@@ -84,9 +84,9 @@
84
84
  },
85
85
  "dependencies": {
86
86
  "@jest/create-cache-key-function": "^26.5.0",
87
- "@react-native-community/cli": "^5.0.1-alpha.0",
88
- "@react-native-community/cli-platform-android": "^5.0.1-alpha.0",
89
- "@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",
90
90
  "@react-native/assets": "1.0.0",
91
91
  "@react-native/normalize-color": "1.0.0",
92
92
  "@react-native/polyfills": "1.0.0",
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"
@@ -28,4 +28,10 @@ if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
28
28
  if [[ "$(anyenv envs | grep -c ndenv )" -eq 1 ]]; then
29
29
  eval "$(anyenv init -)"
30
30
  fi
31
- 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
@@ -71,7 +71,7 @@ end
71
71
  def use_flipper!(versions = {}, configurations: ['Debug'])
72
72
  versions['Flipper'] ||= '~> 0.75.1'
73
73
  versions['Flipper-DoubleConversion'] ||= '1.1.7'
74
- versions['Flipper-Folly'] ||= '~> 2.5'
74
+ versions['Flipper-Folly'] ||= '~> 2.5.3'
75
75
  versions['Flipper-Glog'] ||= '0.3.6'
76
76
  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
77
77
  versions['Flipper-RSocket'] ||= '~> 1.3'
@@ -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
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "17.0.1",
14
- "react-native": "0.64.0-rc.4"
14
+ "react-native": "0.64.3"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.12.9",
@@ -1 +0,0 @@
1
- d6fe67ffc150b4d6da0438ae7526fe87271a193f
@@ -1 +0,0 @@
1
- cc5e334a2c98773aa3f8deb25279b1ed14dcf4ec
@@ -1 +0,0 @@
1
- 0bba93a4348f044730d774c848d64c96
@@ -1 +0,0 @@
1
- 7278d5546c6900172c98d52aeb11a63ce0b6da94
@@ -1 +0,0 @@
1
- 573ccaf8abeeb31d664b9144ecf39305
@@ -1 +0,0 @@
1
- fe57ec2ab544150abd8e4250cc825e7baf3f0683