react-native 0.82.0-rc.0 → 0.82.0-rc.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.
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +1 -0
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +1 -0
- package/Libraries/Core/setUpPerformance.js +3 -5
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTAlertController.mm +6 -1
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +12 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +18 -0
- package/ReactAndroid/build.gradle.kts +7 -0
- package/ReactAndroid/gradle.properties +2 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +28 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/jni/CMakeLists.txt +5 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +4 -0
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +4 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +4 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/executor/CMakeLists.txt +4 -0
- package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +8 -5
- package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +4 -0
- package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.cpp +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.h +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.cpp +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.h +2 -2
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +2 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +44 -26
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +10 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
- package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +1 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +8 -0
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
- package/ReactCommon/react/nativemodule/webperformance/CMakeLists.txt +1 -1
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +9 -9
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.h +3 -0
- package/ReactCommon/react/nativemodule/webperformance/React-webperformancenativemodule.podspec +58 -0
- package/ReactCommon/react/runtime/CMakeLists.txt +4 -0
- package/ReactCommon/react/runtime/hermes/CMakeLists.txt +4 -0
- package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +7 -3
- package/ReactCommon/react/timing/primitives.h +12 -0
- package/flow/bom.js.flow +158 -1
- package/package.json +9 -8
- package/scripts/cocoapods/autolinking.rb +6 -0
- package/scripts/cocoapods/codegen_utils.rb +1 -1
- package/scripts/cocoapods/jsengine.rb +2 -1
- package/scripts/cocoapods/utils.rb +8 -2
- package/scripts/codegen/generate-artifacts-executor/index.js +5 -6
- package/scripts/codegen/generate-artifacts-executor/utils.js +41 -10
- package/scripts/react_native_pods.rb +1 -0
- package/scripts/replace-rncore-version.js +4 -2
- package/sdks/hermes-engine/hermes-engine.podspec +35 -12
- package/sdks/hermes-engine/hermes-utils.rb +41 -10
- package/sdks/hermes-engine/utils/build-apple-framework.sh +7 -1
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +8 -1
- package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +1 -1
- package/sdks/hermes-engine/utils/replace_hermes_version.js +4 -2
- package/sdks/hermes-engine/version.properties +1 -0
- 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/settings.gradle.kts +9 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +6 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
- package/src/private/setup/{setUpPerformanceObserver.js → setUpPerformanceModern.js} +43 -18
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- package/src/private/webapis/performance/EventTiming.js +34 -15
- package/src/private/webapis/performance/LongTasks.js +35 -2
- package/src/private/webapis/performance/Performance.js +49 -13
- package/src/private/webapis/performance/PerformanceEntry.js +21 -8
- package/src/private/webapis/performance/PerformanceObserver.js +30 -1
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +3 -24
- package/src/private/webapis/performance/ResourceTiming.js +29 -18
- package/src/private/webapis/performance/UserTiming.js +33 -28
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -4
- package/src/private/webapis/performance/specs/NativePerformance.js +2 -0
- package/third-party-podspecs/replace_dependencies_version.js +4 -2
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 82;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'rc.
|
|
32
|
+
static prerelease: string | null = 'rc.3';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -4,19 +4,17 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @flow strict
|
|
7
|
+
* @flow strict-local
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import setUpPerformanceModern from '../../src/private/setup/setUpPerformanceModern';
|
|
11
12
|
import NativePerformance from '../../src/private/webapis/performance/specs/NativePerformance';
|
|
12
13
|
|
|
13
14
|
// In case if the native implementation of the Performance API is available, use it,
|
|
14
15
|
// otherwise fall back to the legacy/default one, which only defines 'Performance.now()'
|
|
15
16
|
if (NativePerformance) {
|
|
16
|
-
|
|
17
|
-
require('../../src/private/webapis/performance/Performance').default;
|
|
18
|
-
// $FlowExpectedError[cannot-write]
|
|
19
|
-
global.performance = new Performance();
|
|
17
|
+
setUpPerformanceModern();
|
|
20
18
|
} else {
|
|
21
19
|
if (!global.performance) {
|
|
22
20
|
// $FlowExpectedError[cannot-write]
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
- (UIWindow *)alertWindow
|
|
21
21
|
{
|
|
22
22
|
if (_alertWindow == nil) {
|
|
23
|
-
|
|
23
|
+
UIWindowScene *scene = RCTKeyWindow().windowScene;
|
|
24
|
+
if (scene != nil) {
|
|
25
|
+
_alertWindow = [[UIWindow alloc] initWithWindowScene:scene];
|
|
26
|
+
} else {
|
|
27
|
+
_alertWindow = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
|
28
|
+
}
|
|
24
29
|
|
|
25
30
|
if (_alertWindow) {
|
|
26
31
|
_alertWindow.rootViewController = [UIViewController new];
|
|
@@ -307,6 +307,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableV
|
|
|
307
307
|
rt
|
|
308
308
|
);
|
|
309
309
|
}
|
|
310
|
+
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableWebPerformanceAPIsByDefault(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
311
|
+
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableWebPerformanceAPIsByDefault(
|
|
312
|
+
rt
|
|
313
|
+
);
|
|
314
|
+
}
|
|
310
315
|
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
311
316
|
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->fixMappingOfEventPrioritiesBetweenFabricAndReact(
|
|
312
317
|
rt
|
|
@@ -480,6 +485,7 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
|
|
|
480
485
|
methodMap_["enableVirtualViewDebugFeatures"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewDebugFeatures};
|
|
481
486
|
methodMap_["enableVirtualViewRenderState"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewRenderState};
|
|
482
487
|
methodMap_["enableVirtualViewWindowFocusDetection"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewWindowFocusDetection};
|
|
488
|
+
methodMap_["enableWebPerformanceAPIsByDefault"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableWebPerformanceAPIsByDefault};
|
|
483
489
|
methodMap_["fixMappingOfEventPrioritiesBetweenFabricAndReact"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact};
|
|
484
490
|
methodMap_["fuseboxEnabledRelease"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledRelease};
|
|
485
491
|
methodMap_["fuseboxNetworkInspectionEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled};
|
|
@@ -3151,6 +3157,11 @@ static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_now(jsi::Runtime &r
|
|
|
3151
3157
|
rt
|
|
3152
3158
|
);
|
|
3153
3159
|
}
|
|
3160
|
+
static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_timeOrigin(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
3161
|
+
return static_cast<NativePerformanceCxxSpecJSI *>(&turboModule)->timeOrigin(
|
|
3162
|
+
rt
|
|
3163
|
+
);
|
|
3164
|
+
}
|
|
3154
3165
|
static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_reportMark(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
3155
3166
|
static_cast<NativePerformanceCxxSpecJSI *>(&turboModule)->reportMark(
|
|
3156
3167
|
rt,
|
|
@@ -3273,6 +3284,7 @@ static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_clearEventCountsFor
|
|
|
3273
3284
|
NativePerformanceCxxSpecJSI::NativePerformanceCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3274
3285
|
: TurboModule("NativePerformanceCxx", jsInvoker) {
|
|
3275
3286
|
methodMap_["now"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_now};
|
|
3287
|
+
methodMap_["timeOrigin"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_timeOrigin};
|
|
3276
3288
|
methodMap_["reportMark"] = MethodMetadata {3, __hostFunction_NativePerformanceCxxSpecJSI_reportMark};
|
|
3277
3289
|
methodMap_["reportMeasure"] = MethodMetadata {4, __hostFunction_NativePerformanceCxxSpecJSI_reportMeasure};
|
|
3278
3290
|
methodMap_["getMarkTime"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_getMarkTime};
|
|
@@ -371,6 +371,7 @@ public:
|
|
|
371
371
|
virtual bool enableVirtualViewDebugFeatures(jsi::Runtime &rt) = 0;
|
|
372
372
|
virtual bool enableVirtualViewRenderState(jsi::Runtime &rt) = 0;
|
|
373
373
|
virtual bool enableVirtualViewWindowFocusDetection(jsi::Runtime &rt) = 0;
|
|
374
|
+
virtual bool enableWebPerformanceAPIsByDefault(jsi::Runtime &rt) = 0;
|
|
374
375
|
virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) = 0;
|
|
375
376
|
virtual bool fuseboxEnabledRelease(jsi::Runtime &rt) = 0;
|
|
376
377
|
virtual bool fuseboxNetworkInspectionEnabled(jsi::Runtime &rt) = 0;
|
|
@@ -786,6 +787,14 @@ private:
|
|
|
786
787
|
return bridging::callFromJs<bool>(
|
|
787
788
|
rt, &T::enableVirtualViewWindowFocusDetection, jsInvoker_, instance_);
|
|
788
789
|
}
|
|
790
|
+
bool enableWebPerformanceAPIsByDefault(jsi::Runtime &rt) override {
|
|
791
|
+
static_assert(
|
|
792
|
+
bridging::getParameterCount(&T::enableWebPerformanceAPIsByDefault) == 1,
|
|
793
|
+
"Expected enableWebPerformanceAPIsByDefault(...) to have 1 parameters");
|
|
794
|
+
|
|
795
|
+
return bridging::callFromJs<bool>(
|
|
796
|
+
rt, &T::enableWebPerformanceAPIsByDefault, jsInvoker_, instance_);
|
|
797
|
+
}
|
|
789
798
|
bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) override {
|
|
790
799
|
static_assert(
|
|
791
800
|
bridging::getParameterCount(&T::fixMappingOfEventPrioritiesBetweenFabricAndReact) == 1,
|
|
@@ -8724,6 +8733,7 @@ protected:
|
|
|
8724
8733
|
|
|
8725
8734
|
public:
|
|
8726
8735
|
virtual double now(jsi::Runtime &rt) = 0;
|
|
8736
|
+
virtual double timeOrigin(jsi::Runtime &rt) = 0;
|
|
8727
8737
|
virtual void reportMark(jsi::Runtime &rt, jsi::String name, double startTime, jsi::Value entry) = 0;
|
|
8728
8738
|
virtual void reportMeasure(jsi::Runtime &rt, jsi::String name, double startTime, double duration, jsi::Value entry) = 0;
|
|
8729
8739
|
virtual std::optional<double> getMarkTime(jsi::Runtime &rt, jsi::String name) = 0;
|
|
@@ -8780,6 +8790,14 @@ private:
|
|
|
8780
8790
|
return bridging::callFromJs<double>(
|
|
8781
8791
|
rt, &T::now, jsInvoker_, instance_);
|
|
8782
8792
|
}
|
|
8793
|
+
double timeOrigin(jsi::Runtime &rt) override {
|
|
8794
|
+
static_assert(
|
|
8795
|
+
bridging::getParameterCount(&T::timeOrigin) == 1,
|
|
8796
|
+
"Expected timeOrigin(...) to have 1 parameters");
|
|
8797
|
+
|
|
8798
|
+
return bridging::callFromJs<double>(
|
|
8799
|
+
rt, &T::timeOrigin, jsInvoker_, instance_);
|
|
8800
|
+
}
|
|
8783
8801
|
void reportMark(jsi::Runtime &rt, jsi::String name, double startTime, jsi::Value entry) override {
|
|
8784
8802
|
static_assert(
|
|
8785
8803
|
bridging::getParameterCount(&T::reportMark) == 4,
|
|
@@ -39,6 +39,9 @@ val downloadsDir =
|
|
|
39
39
|
val thirdPartyNdkDir = File("$buildDir/third-party-ndk")
|
|
40
40
|
val reactNativeRootDir = projectDir.parent
|
|
41
41
|
|
|
42
|
+
val hermesV1Enabled =
|
|
43
|
+
rootProject.extensions.getByType(PrivateReactExtension::class.java).hermesV1Enabled.get()
|
|
44
|
+
|
|
42
45
|
// We put the publishing version from gradle.properties inside ext. so other
|
|
43
46
|
// subprojects can access it as well.
|
|
44
47
|
extra["publishing_version"] = project.findProperty("VERSION_NAME")?.toString()!!
|
|
@@ -565,6 +568,10 @@ android {
|
|
|
565
568
|
"-DCMAKE_POLICY_DEFAULT_CMP0069=NEW",
|
|
566
569
|
)
|
|
567
570
|
|
|
571
|
+
if (hermesV1Enabled) {
|
|
572
|
+
arguments("-DHERMES_V1_ENABLED=1")
|
|
573
|
+
}
|
|
574
|
+
|
|
568
575
|
targets(
|
|
569
576
|
"reactnative",
|
|
570
577
|
"jsi",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import com.facebook.react.internal.PrivateReactExtension
|
|
8
9
|
import com.facebook.react.tasks.internal.*
|
|
9
10
|
import de.undercouch.gradle.tasks.download.Download
|
|
10
11
|
import org.apache.tools.ant.taskdefs.condition.Os
|
|
@@ -50,6 +51,8 @@ fun getSDKManagerPath(): String {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
val hermesV1Enabled =
|
|
55
|
+
rootProject.extensions.getByType(PrivateReactExtension::class.java).hermesV1Enabled.get()
|
|
53
56
|
val reactNativeRootDir = project(":packages:react-native:ReactAndroid").projectDir.parent
|
|
54
57
|
val customDownloadDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR")
|
|
55
58
|
val downloadsDir =
|
|
@@ -79,12 +82,21 @@ val hermesBuildOutputFileTree =
|
|
|
79
82
|
fileTree(hermesBuildDir.toString())
|
|
80
83
|
.include("**/*.cmake", "**/*.marks", "**/compiler_depends.ts", "**/Makefile", "**/link.txt")
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
val hermesVersionProvider: Provider<String> =
|
|
86
|
+
providers.provider {
|
|
87
|
+
var hermesVersion = if (hermesV1Enabled) "250829098.0.0-stable" else "main"
|
|
88
|
+
val hermesVersionFile =
|
|
89
|
+
File(
|
|
90
|
+
reactNativeRootDir,
|
|
91
|
+
if (hermesV1Enabled) "sdks/.hermesv1version" else "sdks/.hermesversion",
|
|
92
|
+
)
|
|
84
93
|
|
|
85
|
-
if (hermesVersionFile.exists()) {
|
|
86
|
-
|
|
87
|
-
}
|
|
94
|
+
if (hermesVersionFile.exists()) {
|
|
95
|
+
hermesVersion = hermesVersionFile.readText()
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
hermesVersion
|
|
99
|
+
}
|
|
88
100
|
|
|
89
101
|
val ndkBuildJobs = Runtime.getRuntime().availableProcessors().toString()
|
|
90
102
|
val prefabHeadersDir = File("$buildDir/prefab-headers")
|
|
@@ -95,7 +107,11 @@ val jsiDir = File(reactNativeRootDir, "ReactCommon/jsi")
|
|
|
95
107
|
val downloadHermesDest = File(downloadsDir, "hermes.tar.gz")
|
|
96
108
|
val downloadHermes by
|
|
97
109
|
tasks.registering(Download::class) {
|
|
98
|
-
src(
|
|
110
|
+
src(
|
|
111
|
+
providers.provider {
|
|
112
|
+
"https://github.com/facebook/hermes/tarball/${hermesVersionProvider.get()}"
|
|
113
|
+
}
|
|
114
|
+
)
|
|
99
115
|
onlyIfModified(true)
|
|
100
116
|
overwrite(true)
|
|
101
117
|
quiet(true)
|
|
@@ -151,6 +167,7 @@ val configureBuildForHermes by
|
|
|
151
167
|
"-B",
|
|
152
168
|
hermesBuildDir.toString(),
|
|
153
169
|
"-DJSI_DIR=" + jsiDir.absolutePath,
|
|
170
|
+
"-DCMAKE_BUILD_TYPE=Release",
|
|
154
171
|
)
|
|
155
172
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
156
173
|
cmakeCommandLine = cmakeCommandLine + "-GNMake Makefiles"
|
|
@@ -295,7 +312,11 @@ android {
|
|
|
295
312
|
// Therefore we're passing as build type Release, to provide a faster build.
|
|
296
313
|
// This has the (unlucky) side effect of letting AGP call the build
|
|
297
314
|
// tasks `configureCMakeRelease` while is actually building the debug flavor.
|
|
298
|
-
arguments(
|
|
315
|
+
arguments(
|
|
316
|
+
"-DCMAKE_BUILD_TYPE=Release",
|
|
317
|
+
// For debug builds, explicitly enable the Hermes Debugger.
|
|
318
|
+
"-DHERMES_ENABLE_DEBUGGER=True",
|
|
319
|
+
)
|
|
299
320
|
}
|
|
300
321
|
}
|
|
301
322
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<2ecd46fdcab0202d62304dd9cdff76e0>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -294,6 +294,12 @@ public object ReactNativeFeatureFlags {
|
|
|
294
294
|
@JvmStatic
|
|
295
295
|
public fun enableVirtualViewWindowFocusDetection(): Boolean = accessor.enableVirtualViewWindowFocusDetection()
|
|
296
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Enable Web Performance APIs (Performance Timeline, User Timings, etc.) by default.
|
|
299
|
+
*/
|
|
300
|
+
@JvmStatic
|
|
301
|
+
public fun enableWebPerformanceAPIsByDefault(): Boolean = accessor.enableWebPerformanceAPIsByDefault()
|
|
302
|
+
|
|
297
303
|
/**
|
|
298
304
|
* Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
|
|
299
305
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<3cbd83777e0840419fee9d582b4da692>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -64,6 +64,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
64
64
|
private var enableVirtualViewDebugFeaturesCache: Boolean? = null
|
|
65
65
|
private var enableVirtualViewRenderStateCache: Boolean? = null
|
|
66
66
|
private var enableVirtualViewWindowFocusDetectionCache: Boolean? = null
|
|
67
|
+
private var enableWebPerformanceAPIsByDefaultCache: Boolean? = null
|
|
67
68
|
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
|
|
68
69
|
private var fuseboxEnabledReleaseCache: Boolean? = null
|
|
69
70
|
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
|
|
@@ -486,6 +487,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
486
487
|
return cached
|
|
487
488
|
}
|
|
488
489
|
|
|
490
|
+
override fun enableWebPerformanceAPIsByDefault(): Boolean {
|
|
491
|
+
var cached = enableWebPerformanceAPIsByDefaultCache
|
|
492
|
+
if (cached == null) {
|
|
493
|
+
cached = ReactNativeFeatureFlagsCxxInterop.enableWebPerformanceAPIsByDefault()
|
|
494
|
+
enableWebPerformanceAPIsByDefaultCache = cached
|
|
495
|
+
}
|
|
496
|
+
return cached
|
|
497
|
+
}
|
|
498
|
+
|
|
489
499
|
override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean {
|
|
490
500
|
var cached = fixMappingOfEventPrioritiesBetweenFabricAndReactCache
|
|
491
501
|
if (cached == null) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<b92c1fc5d527033d0f7988d88533eb03>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -116,6 +116,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
116
116
|
|
|
117
117
|
@DoNotStrip @JvmStatic public external fun enableVirtualViewWindowFocusDetection(): Boolean
|
|
118
118
|
|
|
119
|
+
@DoNotStrip @JvmStatic public external fun enableWebPerformanceAPIsByDefault(): Boolean
|
|
120
|
+
|
|
119
121
|
@DoNotStrip @JvmStatic public external fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
|
|
120
122
|
|
|
121
123
|
@DoNotStrip @JvmStatic public external fun fuseboxEnabledRelease(): Boolean
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<71354bd41b222239b80129659f5f5d21>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -111,6 +111,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
111
111
|
|
|
112
112
|
override fun enableVirtualViewWindowFocusDetection(): Boolean = false
|
|
113
113
|
|
|
114
|
+
override fun enableWebPerformanceAPIsByDefault(): Boolean = false
|
|
115
|
+
|
|
114
116
|
override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = false
|
|
115
117
|
|
|
116
118
|
override fun fuseboxEnabledRelease(): Boolean = false
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<4ad6fc15663277c2c8b4843f42a078f8>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -68,6 +68,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
68
68
|
private var enableVirtualViewDebugFeaturesCache: Boolean? = null
|
|
69
69
|
private var enableVirtualViewRenderStateCache: Boolean? = null
|
|
70
70
|
private var enableVirtualViewWindowFocusDetectionCache: Boolean? = null
|
|
71
|
+
private var enableWebPerformanceAPIsByDefaultCache: Boolean? = null
|
|
71
72
|
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
|
|
72
73
|
private var fuseboxEnabledReleaseCache: Boolean? = null
|
|
73
74
|
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
|
|
@@ -534,6 +535,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
534
535
|
return cached
|
|
535
536
|
}
|
|
536
537
|
|
|
538
|
+
override fun enableWebPerformanceAPIsByDefault(): Boolean {
|
|
539
|
+
var cached = enableWebPerformanceAPIsByDefaultCache
|
|
540
|
+
if (cached == null) {
|
|
541
|
+
cached = currentProvider.enableWebPerformanceAPIsByDefault()
|
|
542
|
+
accessedFeatureFlags.add("enableWebPerformanceAPIsByDefault")
|
|
543
|
+
enableWebPerformanceAPIsByDefaultCache = cached
|
|
544
|
+
}
|
|
545
|
+
return cached
|
|
546
|
+
}
|
|
547
|
+
|
|
537
548
|
override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean {
|
|
538
549
|
var cached = fixMappingOfEventPrioritiesBetweenFabricAndReactCache
|
|
539
550
|
if (cached == null) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<4464982256b8ce543d9235fccbf67054>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -27,6 +27,8 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android : ReactN
|
|
|
27
27
|
|
|
28
28
|
override fun enableFabricRenderer(): Boolean = true
|
|
29
29
|
|
|
30
|
+
override fun enableWebPerformanceAPIsByDefault(): Boolean = true
|
|
31
|
+
|
|
30
32
|
override fun useNativeViewConfigsInBridgelessMode(): Boolean = true
|
|
31
33
|
|
|
32
34
|
override fun useTurboModuleInterop(): Boolean = true
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<51e9b65c32aa4a990f21afd4f0244223>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -111,6 +111,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
|
|
111
111
|
|
|
112
112
|
@DoNotStrip public fun enableVirtualViewWindowFocusDetection(): Boolean
|
|
113
113
|
|
|
114
|
+
@DoNotStrip public fun enableWebPerformanceAPIsByDefault(): Boolean
|
|
115
|
+
|
|
114
116
|
@DoNotStrip public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
|
|
115
117
|
|
|
116
118
|
@DoNotStrip public fun fuseboxEnabledRelease(): Boolean
|
|
@@ -22,6 +22,8 @@ file(TO_CMAKE_PATH "${REACT_ANDROID_DIR}" REACT_ANDROID_DIR)
|
|
|
22
22
|
file(TO_CMAKE_PATH "${REACT_BUILD_DIR}" REACT_BUILD_DIR)
|
|
23
23
|
file(TO_CMAKE_PATH "${REACT_COMMON_DIR}" REACT_COMMON_DIR)
|
|
24
24
|
|
|
25
|
+
set(HERMES_V1_ENABLED OFF CACHE BOOL "Build with support for Hermes v1")
|
|
26
|
+
|
|
25
27
|
# If you have ccache installed, we're going to honor it.
|
|
26
28
|
find_program(CCACHE_FOUND ccache)
|
|
27
29
|
if(CCACHE_FOUND)
|
|
@@ -122,6 +124,7 @@ add_react_common_subdir(react/nativemodule/dom)
|
|
|
122
124
|
add_react_common_subdir(react/nativemodule/featureflags)
|
|
123
125
|
add_react_common_subdir(react/nativemodule/microtasks)
|
|
124
126
|
add_react_common_subdir(react/nativemodule/idlecallbacks)
|
|
127
|
+
add_react_common_subdir(react/nativemodule/webperformance)
|
|
125
128
|
add_react_common_subdir(jserrorhandler)
|
|
126
129
|
add_react_common_subdir(react/runtime)
|
|
127
130
|
add_react_common_subdir(react/runtime/hermes)
|
|
@@ -188,6 +191,7 @@ add_library(reactnative
|
|
|
188
191
|
$<TARGET_OBJECTS:react_nativemodule_featureflags>
|
|
189
192
|
$<TARGET_OBJECTS:react_nativemodule_idlecallbacks>
|
|
190
193
|
$<TARGET_OBJECTS:react_nativemodule_microtasks>
|
|
194
|
+
$<TARGET_OBJECTS:react_nativemodule_webperformance>
|
|
191
195
|
$<TARGET_OBJECTS:react_newarchdefaults>
|
|
192
196
|
$<TARGET_OBJECTS:react_performance_cdpmetrics>
|
|
193
197
|
$<TARGET_OBJECTS:react_performance_timeline>
|
|
@@ -277,6 +281,7 @@ target_include_directories(reactnative
|
|
|
277
281
|
$<TARGET_PROPERTY:react_nativemodule_featureflags,INTERFACE_INCLUDE_DIRECTORIES>
|
|
278
282
|
$<TARGET_PROPERTY:react_nativemodule_idlecallbacks,INTERFACE_INCLUDE_DIRECTORIES>
|
|
279
283
|
$<TARGET_PROPERTY:react_nativemodule_microtasks,INTERFACE_INCLUDE_DIRECTORIES>
|
|
284
|
+
$<TARGET_PROPERTY:react_nativemodule_webperformance,INTERFACE_INCLUDE_DIRECTORIES>
|
|
280
285
|
$<TARGET_PROPERTY:react_newarchdefaults,INTERFACE_INCLUDE_DIRECTORIES>
|
|
281
286
|
$<TARGET_PROPERTY:react_performance_cdpmetrics,INTERFACE_INCLUDE_DIRECTORIES>
|
|
282
287
|
$<TARGET_PROPERTY:react_performance_timeline,INTERFACE_INCLUDE_DIRECTORIES>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f4ec3b7b6f99dd3409d872470872ece6>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -303,6 +303,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
|
|
303
303
|
return method(javaProvider_);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
+
bool enableWebPerformanceAPIsByDefault() override {
|
|
307
|
+
static const auto method =
|
|
308
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableWebPerformanceAPIsByDefault");
|
|
309
|
+
return method(javaProvider_);
|
|
310
|
+
}
|
|
311
|
+
|
|
306
312
|
bool fixMappingOfEventPrioritiesBetweenFabricAndReact() override {
|
|
307
313
|
static const auto method =
|
|
308
314
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
|
@@ -677,6 +683,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableVirtualViewWindowFocusDetection(
|
|
|
677
683
|
return ReactNativeFeatureFlags::enableVirtualViewWindowFocusDetection();
|
|
678
684
|
}
|
|
679
685
|
|
|
686
|
+
bool JReactNativeFeatureFlagsCxxInterop::enableWebPerformanceAPIsByDefault(
|
|
687
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
688
|
+
return ReactNativeFeatureFlags::enableWebPerformanceAPIsByDefault();
|
|
689
|
+
}
|
|
690
|
+
|
|
680
691
|
bool JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact(
|
|
681
692
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
682
693
|
return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
|
@@ -965,6 +976,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
965
976
|
makeNativeMethod(
|
|
966
977
|
"enableVirtualViewWindowFocusDetection",
|
|
967
978
|
JReactNativeFeatureFlagsCxxInterop::enableVirtualViewWindowFocusDetection),
|
|
979
|
+
makeNativeMethod(
|
|
980
|
+
"enableWebPerformanceAPIsByDefault",
|
|
981
|
+
JReactNativeFeatureFlagsCxxInterop::enableWebPerformanceAPIsByDefault),
|
|
968
982
|
makeNativeMethod(
|
|
969
983
|
"fixMappingOfEventPrioritiesBetweenFabricAndReact",
|
|
970
984
|
JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<d34119ad2e9a068463e8a31ecced59d9>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -162,6 +162,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
162
162
|
static bool enableVirtualViewWindowFocusDetection(
|
|
163
163
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
164
164
|
|
|
165
|
+
static bool enableWebPerformanceAPIsByDefault(
|
|
166
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
167
|
+
|
|
165
168
|
static bool fixMappingOfEventPrioritiesBetweenFabricAndReact(
|
|
166
169
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
167
170
|
|
|
@@ -27,4 +27,8 @@ target_link_libraries(
|
|
|
27
27
|
target_compile_reactnative_options(hermes_executor PRIVATE)
|
|
28
28
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
29
29
|
target_compile_options(hermes_executor PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
|
|
30
|
+
|
|
31
|
+
if (HERMES_V1_ENABLED)
|
|
32
|
+
target_compile_options(hermes_executor PRIVATE -DHERMES_V1_ENABLED=1)
|
|
33
|
+
endif()
|
|
30
34
|
endif()
|
|
@@ -29,4 +29,8 @@ target_link_libraries(hermesinstancejni
|
|
|
29
29
|
target_compile_reactnative_options(hermesinstancejni PRIVATE)
|
|
30
30
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
31
31
|
target_compile_options(hermesinstancejni PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
|
|
32
|
+
|
|
33
|
+
if (HERMES_V1_ENABLED)
|
|
34
|
+
target_compile_options(hermesinstancejni PRIVATE -DHERMES_V1_ENABLED=1)
|
|
35
|
+
endif()
|
|
32
36
|
endif ()
|
|
@@ -19,6 +19,10 @@ add_library(rninstance
|
|
|
19
19
|
target_compile_reactnative_options(rninstance PRIVATE)
|
|
20
20
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
21
21
|
target_compile_options(rninstance PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
|
|
22
|
+
|
|
23
|
+
if (HERMES_V1_ENABLED)
|
|
24
|
+
target_compile_options(rninstance PRIVATE -DHERMES_V1_ENABLED=1)
|
|
25
|
+
endif()
|
|
22
26
|
endif ()
|
|
23
27
|
|
|
24
28
|
target_merge_so(rninstance)
|
|
@@ -32,6 +32,10 @@ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
|
32
32
|
PRIVATE
|
|
33
33
|
-DHERMES_ENABLE_DEBUGGER=1
|
|
34
34
|
)
|
|
35
|
+
|
|
36
|
+
if (HERMES_V1_ENABLED)
|
|
37
|
+
target_compile_options(hermes_executor_common PRIVATE -DHERMES_V1_ENABLED=1)
|
|
38
|
+
endif()
|
|
35
39
|
else()
|
|
36
40
|
target_compile_options(
|
|
37
41
|
hermes_executor_common
|