react-native-windows 0.74.17 → 0.74.19
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.
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
OLD_CPPWINRT is a workaround to make target version to 19H1
|
|
122
122
|
-->
|
|
123
123
|
<PreprocessorDefinitions>
|
|
124
|
+
DISABLE_XAML_GENERATED_MAIN;
|
|
124
125
|
REACTWINDOWS_BUILD;
|
|
125
126
|
RN_PLATFORM=windows;
|
|
126
127
|
NOMINMAX;
|
|
@@ -131,6 +132,7 @@
|
|
|
131
132
|
WIN32=0;
|
|
132
133
|
WINRT=1;
|
|
133
134
|
_HAS_AUTO_PTR_ETC;
|
|
135
|
+
_USE_MATH_DEFINES;
|
|
134
136
|
<!-- See https://cplusplus.github.io/LWG/issue3840 -->
|
|
135
137
|
_SILENCE_CXX20_U8PATH_DEPRECATION_WARNING;
|
|
136
138
|
%(PreprocessorDefinitions)
|
|
@@ -83,7 +83,14 @@
|
|
|
83
83
|
#include "Modules/LogBoxModule.h"
|
|
84
84
|
#include "Modules/NativeUIManager.h"
|
|
85
85
|
#include "Modules/PaperUIManagerModule.h"
|
|
86
|
+
#else
|
|
87
|
+
#include "Modules/DesktopTimingModule.h"
|
|
86
88
|
#endif
|
|
89
|
+
#include "Modules/ExceptionsManager.h"
|
|
90
|
+
#include "Modules/PlatformConstantsWinModule.h"
|
|
91
|
+
#include "Modules/ReactRootViewTagGenerator.h"
|
|
92
|
+
#include "Modules/SourceCode.h"
|
|
93
|
+
#include "Modules/StatusBarManager.h"
|
|
87
94
|
|
|
88
95
|
#if !defined(CORE_ABI) || defined(USE_FABRIC)
|
|
89
96
|
#include <Modules/ImageViewManagerModule.h>
|
|
@@ -397,42 +404,44 @@ void ReactInstanceWin::LoadModules(
|
|
|
397
404
|
}
|
|
398
405
|
#endif
|
|
399
406
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
407
|
+
if (devSettings->useTurboModulesOnly) {
|
|
408
|
+
::Microsoft::ReactNative::ExceptionsManager::SetRedBoxHander(
|
|
409
|
+
winrt::Microsoft::ReactNative::ReactPropertyBag(m_reactContext->Properties()), m_redboxHandler);
|
|
410
|
+
registerTurboModule(
|
|
411
|
+
L"ExceptionsManager",
|
|
412
|
+
winrt::Microsoft::ReactNative::MakeTurboModuleProvider<::Microsoft::ReactNative::ExceptionsManager>());
|
|
405
413
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
414
|
+
registerTurboModule(
|
|
415
|
+
L"StatusBarManager",
|
|
416
|
+
winrt::Microsoft::ReactNative::MakeModuleProvider<::Microsoft::ReactNative::StatusBarManager>());
|
|
409
417
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
418
|
+
registerTurboModule(
|
|
419
|
+
L"PlatformConstants",
|
|
420
|
+
winrt::Microsoft::ReactNative::MakeTurboModuleProvider<::Microsoft::ReactNative::PlatformConstants>());
|
|
413
421
|
|
|
414
|
-
|
|
422
|
+
uint32_t hermesBytecodeVersion = 0;
|
|
415
423
|
#if defined(USE_HERMES) && defined(ENABLE_DEVSERVER_HBCBUNDLES)
|
|
416
|
-
|
|
424
|
+
hermesBytecodeVersion = ::hermes::hbc::BYTECODE_VERSION;
|
|
417
425
|
#endif
|
|
418
426
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
427
|
+
std::string bundleUrl = (devSettings->useWebDebugger || devSettings->liveReloadCallback)
|
|
428
|
+
? facebook::react::DevServerHelper::get_BundleUrl(
|
|
429
|
+
devSettings->sourceBundleHost,
|
|
430
|
+
devSettings->sourceBundlePort,
|
|
431
|
+
devSettings->debugBundlePath,
|
|
432
|
+
devSettings->platformName,
|
|
433
|
+
devSettings->bundleAppId,
|
|
434
|
+
devSettings->devBundle,
|
|
435
|
+
devSettings->useFastRefresh,
|
|
436
|
+
devSettings->inlineSourceMap,
|
|
437
|
+
hermesBytecodeVersion)
|
|
438
|
+
: devSettings->bundleRootPath;
|
|
439
|
+
::Microsoft::ReactNative::SourceCode::SetScriptUrl(
|
|
440
|
+
winrt::Microsoft::ReactNative::ReactPropertyBag(m_reactContext->Properties()), bundleUrl);
|
|
433
441
|
|
|
434
|
-
|
|
435
|
-
|
|
442
|
+
registerTurboModule(
|
|
443
|
+
L"SourceCode", winrt::Microsoft::ReactNative::MakeTurboModuleProvider<::Microsoft::ReactNative::SourceCode>());
|
|
444
|
+
}
|
|
436
445
|
|
|
437
446
|
registerTurboModule(
|
|
438
447
|
L"DevSettings", winrt::Microsoft::ReactNative::MakeTurboModuleProvider<::Microsoft::ReactNative::DevSettings>());
|
|
@@ -446,6 +455,17 @@ void ReactInstanceWin::LoadModules(
|
|
|
446
455
|
winrt::Microsoft::ReactNative::MakeTurboModuleProvider<::Microsoft::ReactNative::LinkingManager>());
|
|
447
456
|
|
|
448
457
|
registerTurboModule(L"Timing", winrt::Microsoft::ReactNative::MakeModuleProvider<::Microsoft::ReactNative::Timing>());
|
|
458
|
+
#else
|
|
459
|
+
|
|
460
|
+
#if defined(USE_FABRIC)
|
|
461
|
+
if (Microsoft::ReactNative::IsFabricEnabled(m_reactContext->Properties())) {
|
|
462
|
+
registerTurboModule(
|
|
463
|
+
L"Timing", winrt::Microsoft::ReactNative::MakeModuleProvider<::Microsoft::ReactNative::Timing>());
|
|
464
|
+
} else
|
|
465
|
+
#endif
|
|
466
|
+
{
|
|
467
|
+
registerTurboModule(L"Timing", winrt::Microsoft::ReactNative::MakeModuleProvider<::facebook::react::Timing>());
|
|
468
|
+
}
|
|
449
469
|
#endif
|
|
450
470
|
|
|
451
471
|
registerTurboModule(
|
|
@@ -582,6 +602,7 @@ void ReactInstanceWin::InitializeBridgeless() noexcept {
|
|
|
582
602
|
strongThis->Queue().Post([this, weakThis]() noexcept {
|
|
583
603
|
if (auto strongThis = weakThis.GetStrongPtr()) {
|
|
584
604
|
auto devSettings = strongThis->CreateDevSettings();
|
|
605
|
+
devSettings->useTurboModulesOnly = true;
|
|
585
606
|
|
|
586
607
|
try {
|
|
587
608
|
if (devSettings->useFastRefresh || devSettings->liveReloadCallback) {
|
|
@@ -739,11 +760,21 @@ void ReactInstanceWin::InitializeWithBridge() noexcept {
|
|
|
739
760
|
// Objects that must be created on the UI thread
|
|
740
761
|
if (auto strongThis = weakThis.GetStrongPtr()) {
|
|
741
762
|
InitUIDependentCalls();
|
|
742
|
-
|
|
743
763
|
strongThis->Queue().Post([this, weakThis]() noexcept {
|
|
744
764
|
if (auto strongThis = weakThis.GetStrongPtr()) {
|
|
745
765
|
auto devSettings = strongThis->CreateDevSettings();
|
|
746
766
|
|
|
767
|
+
auto getBoolProperty = [properties = ReactPropertyBag{m_options.Properties}](
|
|
768
|
+
const wchar_t *ns, const wchar_t *name, bool defaultValue) noexcept -> bool {
|
|
769
|
+
ReactPropertyId<bool> propId{ns == nullptr ? ReactPropertyNamespace() : ReactPropertyNamespace(ns), name};
|
|
770
|
+
std::optional<bool> propValue = properties.Get(propId);
|
|
771
|
+
return propValue.value_or(defaultValue);
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
devSettings->omitNetworkingCxxModules = getBoolProperty(nullptr, L"OmitNetworkingCxxModules", false);
|
|
775
|
+
devSettings->useWebSocketTurboModule = getBoolProperty(nullptr, L"UseWebSocketTurboModule", false);
|
|
776
|
+
devSettings->useTurboModulesOnly = getBoolProperty(L"DevSettings", L"UseTurboModulesOnly", false);
|
|
777
|
+
|
|
747
778
|
std::vector<facebook::react::NativeModuleDescription> cxxModules;
|
|
748
779
|
auto nmp = std::make_shared<winrt::Microsoft::ReactNative::NativeModulesProvider>();
|
|
749
780
|
|
|
@@ -835,12 +866,7 @@ void ReactInstanceWin::InitializeWithBridge() noexcept {
|
|
|
835
866
|
// We need to keep the instance wrapper alive as its destruction shuts down the native queue.
|
|
836
867
|
m_options.TurboModuleProvider->SetReactContext(
|
|
837
868
|
winrt::make<implementation::ReactContext>(Mso::Copy(m_reactContext)));
|
|
838
|
-
|
|
839
|
-
auto omitNetCxxPropValue = m_options.Properties.Get(omitNetCxxPropName);
|
|
840
|
-
devSettings->omitNetworkingCxxModules = winrt::unbox_value_or(omitNetCxxPropValue, false);
|
|
841
|
-
auto useWebSocketTurboModulePropName = ReactPropertyBagHelper::GetName(nullptr, L"UseWebSocketTurboModule");
|
|
842
|
-
auto useWebSocketTurboModulePropValue = m_options.Properties.Get(useWebSocketTurboModulePropName);
|
|
843
|
-
devSettings->useWebSocketTurboModule = winrt::unbox_value_or(useWebSocketTurboModulePropValue, false);
|
|
869
|
+
|
|
844
870
|
auto bundleRootPath = devSettings->bundleRootPath;
|
|
845
871
|
auto jsiRuntimeHolder = devSettings->jsiRuntimeHolder;
|
|
846
872
|
auto instanceWrapper = facebook::react::CreateReactInstance(
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.74.
|
|
13
|
+
<ReactNativeWindowsVersion>0.74.19</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>19</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>003e7035d3c8e0fa14036ff257ca7916359f6b2c</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
package/Shared/DevSettings.h
CHANGED
|
@@ -114,6 +114,9 @@ struct DevSettings {
|
|
|
114
114
|
|
|
115
115
|
// Enable concurrent mode by installing runtimeScheduler
|
|
116
116
|
bool useRuntimeScheduler{false};
|
|
117
|
+
|
|
118
|
+
// If true, then use only Turbo Modules instead of CxxModules.
|
|
119
|
+
bool useTurboModulesOnly{false};
|
|
117
120
|
};
|
|
118
121
|
|
|
119
122
|
} // namespace react
|
package/Shared/OInstance.cpp
CHANGED
|
@@ -596,6 +596,10 @@ InstanceImpl::~InstanceImpl() {
|
|
|
596
596
|
std::vector<std::unique_ptr<NativeModule>> InstanceImpl::GetDefaultNativeModules(
|
|
597
597
|
std::shared_ptr<MessageQueueThread> nativeQueue) {
|
|
598
598
|
std::vector<std::unique_ptr<NativeModule>> modules;
|
|
599
|
+
if (m_devSettings->useTurboModulesOnly) {
|
|
600
|
+
return modules;
|
|
601
|
+
}
|
|
602
|
+
|
|
599
603
|
auto transitionalProps{ReactPropertyBagHelper::CreatePropertyBag()};
|
|
600
604
|
|
|
601
605
|
// These modules are instantiated separately in MSRN (Universal Windows).
|
|
@@ -613,9 +617,9 @@ std::vector<std::unique_ptr<NativeModule>> InstanceImpl::GetDefaultNativeModules
|
|
|
613
617
|
nativeQueue));
|
|
614
618
|
}
|
|
615
619
|
|
|
616
|
-
// Applications using the Windows ABI feature should
|
|
620
|
+
// Applications using the Windows ABI feature should load the networking TurboModule variants instead.
|
|
617
621
|
if (!m_devSettings->omitNetworkingCxxModules) {
|
|
618
|
-
// Use in case the host app provides its a non-Blob-
|
|
622
|
+
// Use in case the host app provides its a non-Blob-compatible HTTP module.
|
|
619
623
|
if (!Microsoft::React::GetRuntimeOptionBool("Blob.DisableModule")) {
|
|
620
624
|
modules.push_back(std::make_unique<CxxNativeModule>(
|
|
621
625
|
m_innerInstance,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@react-native-community/cli": "13.6.9",
|
|
27
27
|
"@react-native-community/cli-platform-android": "13.6.9",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "13.6.9",
|
|
29
|
-
"@react-native-windows/cli": "0.74.
|
|
29
|
+
"@react-native-windows/cli": "0.74.3",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
31
|
"@react-native/assets-registry": "0.74.87",
|
|
32
32
|
"@react-native/codegen": "0.74.87",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"yargs": "^17.6.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@react-native-windows/codegen": "0.74.
|
|
67
|
+
"@react-native-windows/codegen": "0.74.2",
|
|
68
68
|
"@react-native/metro-config": "0.74.87",
|
|
69
69
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
70
70
|
"@rnw-scripts/eslint-config": "1.2.9",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"react-native": "^0.74.0"
|
|
93
93
|
},
|
|
94
94
|
"beachball": {
|
|
95
|
-
"defaultNpmTag": "
|
|
95
|
+
"defaultNpmTag": "v0.74-stable",
|
|
96
96
|
"disallowedChangeTypes": [
|
|
97
97
|
"major",
|
|
98
98
|
"minor",
|