react-native 0.73.3 → 0.73.4
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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Modules/RCTUIManager.m +10 -5
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.java +11 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +9 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +14 -6
- package/package.json +3 -3
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +3 -3
package/React/Base/RCTVersion.m
CHANGED
|
@@ -179,15 +179,20 @@ RCT_EXPORT_MODULE()
|
|
|
179
179
|
_componentDataByName[componentData.name] = componentData;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
|
|
182
|
+
// Preload the a11yManager as the RCTUIManager needs it to listen for notification
|
|
183
|
+
// By eagerly preloading it in the setBridge method, we make sure that the manager is
|
|
184
|
+
// properly initialized in the Main Thread and that we do not incur in any race condition
|
|
185
|
+
// or concurrency problem.
|
|
186
|
+
id<RCTBridgeModule> a11yManager = [self->_bridge moduleForName:@"AccessibilityManager"
|
|
187
|
+
lazilyLoadIfNecessary:YES];
|
|
188
|
+
__weak NSObject * a11yManagerWeakObject = a11yManager;
|
|
183
189
|
// This dispatch_async avoids a deadlock while configuring native modules
|
|
184
|
-
dispatch_async(
|
|
185
|
-
|
|
186
|
-
lazilyLoadIfNecessary:YES];
|
|
190
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
191
|
+
__strong NSObject * a11yManagerStrongObject = a11yManagerWeakObject;
|
|
187
192
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
188
193
|
selector:@selector(didReceiveNewContentSizeMultiplier)
|
|
189
194
|
name:@"RCTAccessibilityManagerDidUpdateMultiplierNotification"
|
|
190
|
-
object:
|
|
195
|
+
object:a11yManagerStrongObject];
|
|
191
196
|
});
|
|
192
197
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
193
198
|
selector:@selector(namedOrientationDidChange)
|
package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.java
CHANGED
|
@@ -10,6 +10,8 @@ package com.facebook.react.bridge.queue;
|
|
|
10
10
|
import android.os.Handler;
|
|
11
11
|
import android.os.Looper;
|
|
12
12
|
import android.os.Message;
|
|
13
|
+
import com.facebook.common.logging.FLog;
|
|
14
|
+
import com.facebook.react.common.ReactConstants;
|
|
13
15
|
|
|
14
16
|
/** Handler that can catch and dispatch Exceptions to an Exception handler. */
|
|
15
17
|
public class MessageQueueThreadHandler extends Handler {
|
|
@@ -26,6 +28,15 @@ public class MessageQueueThreadHandler extends Handler {
|
|
|
26
28
|
try {
|
|
27
29
|
super.dispatchMessage(msg);
|
|
28
30
|
} catch (Exception e) {
|
|
31
|
+
if (e instanceof NullPointerException) {
|
|
32
|
+
FLog.e(
|
|
33
|
+
ReactConstants.TAG,
|
|
34
|
+
"Caught NullPointerException when dispatching message in MessageQueueThreadHandler. This is likely caused by runnable"
|
|
35
|
+
+ "(msg.callback) being nulled in Android Handler after dispatching and before handling (see T170239922 for more details)."
|
|
36
|
+
+ "Currently we observe that it only happen once which is during initialisation. Due to fixing probably involve Android "
|
|
37
|
+
+ "System code, we decide to ignore here for now and print an error message for debugging purpose in case this cause more serious issues in future.");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
29
40
|
mExceptionHandler.handleException(e);
|
|
30
41
|
}
|
|
31
42
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java
CHANGED
|
@@ -206,7 +206,15 @@ import java.util.Set;
|
|
|
206
206
|
}
|
|
207
207
|
for (String oldKey : keysToNormalize) {
|
|
208
208
|
Object value = events.get(oldKey);
|
|
209
|
-
String
|
|
209
|
+
String baseKey = "";
|
|
210
|
+
if (oldKey.startsWith("on")) {
|
|
211
|
+
// Drop "on" prefix.
|
|
212
|
+
baseKey = oldKey.substring(2);
|
|
213
|
+
} else {
|
|
214
|
+
// Capitalize first letter.
|
|
215
|
+
baseKey = oldKey.substring(0, 1).toUpperCase() + oldKey.substring(1);
|
|
216
|
+
}
|
|
217
|
+
String newKey = "top" + baseKey;
|
|
210
218
|
events.put(newKey, value);
|
|
211
219
|
}
|
|
212
220
|
}
|
|
@@ -16,18 +16,26 @@
|
|
|
16
16
|
|
|
17
17
|
namespace facebook::react {
|
|
18
18
|
|
|
19
|
+
static bool hasPrefix(const std::string& str, const std::string& prefix) {
|
|
20
|
+
return str.compare(0, prefix.length(), prefix) == 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
// TODO(T29874519): Get rid of "top" prefix once and for all.
|
|
20
24
|
/*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
25
|
+
* Replaces "on" with "top" if present. Or capitalizes the first letter and adds
|
|
26
|
+
* "top" prefix. E.g. "eventName" becomes "topEventName", "onEventName" also
|
|
27
|
+
* becomes "topEventName".
|
|
23
28
|
*/
|
|
24
29
|
static std::string normalizeEventType(std::string type) {
|
|
25
30
|
auto prefixedType = std::move(type);
|
|
26
|
-
if (prefixedType
|
|
27
|
-
prefixedType
|
|
28
|
-
|
|
31
|
+
if (facebook::react::hasPrefix(prefixedType, "top")) {
|
|
32
|
+
return prefixedType;
|
|
33
|
+
}
|
|
34
|
+
if (facebook::react::hasPrefix(prefixedType, "on")) {
|
|
35
|
+
return "top" + prefixedType.substr(2);
|
|
29
36
|
}
|
|
30
|
-
|
|
37
|
+
prefixedType[0] = static_cast<char>(toupper(prefixedType[0]));
|
|
38
|
+
return "top" + prefixedType;
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
std::mutex& EventEmitter::DispatchMutex() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.4",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"@react-native-community/cli-platform-android": "12.3.2",
|
|
98
98
|
"@react-native-community/cli-platform-ios": "12.3.2",
|
|
99
99
|
"@react-native/assets-registry": "0.73.1",
|
|
100
|
-
"@react-native/community-cli-plugin": "0.73.
|
|
101
|
-
"@react-native/codegen": "0.73.
|
|
100
|
+
"@react-native/community-cli-plugin": "0.73.16",
|
|
101
|
+
"@react-native/codegen": "0.73.3",
|
|
102
102
|
"@react-native/gradle-plugin": "0.73.4",
|
|
103
103
|
"@react-native/js-polyfills": "0.73.1",
|
|
104
104
|
"@react-native/normalize-colors": "0.73.2",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/package.json
CHANGED
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "0.73.
|
|
14
|
+
"react-native": "0.73.4"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@babel/core": "^7.20.0",
|
|
18
18
|
"@babel/preset-env": "^7.20.0",
|
|
19
19
|
"@babel/runtime": "^7.20.0",
|
|
20
|
-
"@react-native/babel-preset": "0.73.
|
|
20
|
+
"@react-native/babel-preset": "0.73.21",
|
|
21
21
|
"@react-native/eslint-config": "0.73.2",
|
|
22
|
-
"@react-native/metro-config": "0.73.
|
|
22
|
+
"@react-native/metro-config": "0.73.5",
|
|
23
23
|
"@react-native/typescript-config": "0.73.1",
|
|
24
24
|
"@types/react": "^18.2.6",
|
|
25
25
|
"@types/react-test-renderer": "^18.0.0",
|