react-native-windows 0.69.6 → 0.70.0
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/.flowconfig +5 -1
- package/Chakra/ChakraHelpers.cpp +1 -1
- package/Chakra/ChakraPlatform.cpp +1 -1
- package/Chakra/ChakraValue.cpp +6 -3
- package/Chakra/ChakraValue.h +1 -1
- package/Directory.Build.props +7 -7
- package/Folly/Folly.vcxproj +20 -13
- package/Folly/cgmanifest.json +14 -0
- package/Libraries/Alert/Alert.js +18 -4
- package/Libraries/Alert/Alert.windows.js +4 -0
- package/Libraries/Alert/NativeAlertManager.js +1 -0
- package/Libraries/Animated/Animated.js +2 -2
- package/Libraries/Animated/AnimatedEvent.js +7 -4
- package/Libraries/Animated/AnimatedImplementation.js +17 -3
- package/Libraries/Animated/AnimatedMock.js +7 -2
- package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
- package/Libraries/Animated/NativeAnimatedModule.js +3 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
- package/Libraries/Animated/animations/SpringAnimation.js +3 -3
- package/Libraries/Animated/animations/TimingAnimation.js +3 -3
- package/Libraries/Animated/createAnimatedComponent.js +8 -1
- package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
- package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
- package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
- package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
- package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
- package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
- package/Libraries/Animated/useAnimatedProps.js +1 -0
- package/Libraries/AppState/AppState.js +0 -32
- package/Libraries/AppTheme/AppTheme.js +14 -8
- package/Libraries/AppTheme/AppThemeTypes.d.ts +0 -3
- package/Libraries/BatchedBridge/MessageQueue.js +21 -15
- package/Libraries/BatchedBridge/NativeModules.js +3 -4
- package/Libraries/Blob/FileReader.js +0 -6
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +0 -20
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
- package/Libraries/Components/Keyboard/Keyboard.js +0 -11
- package/Libraries/Components/Pressable/Pressable.js +2 -0
- package/Libraries/Components/Pressable/Pressable.windows.js +2 -0
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
- package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +4 -30
- package/Libraries/Components/ScrollView/ScrollView.js +13 -11
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
- package/Libraries/Components/StatusBar/StatusBar.js +10 -7
- package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
- package/Libraries/Components/TextInput/TextInput.js +12 -2
- package/Libraries/Components/TextInput/TextInput.windows.js +12 -2
- package/Libraries/Components/Touchable/PooledClass.js +16 -4
- package/Libraries/Components/Touchable/Touchable.js +50 -1
- package/Libraries/Components/Touchable/Touchable.windows.js +972 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +3 -8
- package/Libraries/Components/View/ViewPropTypes.windows.js +3 -8
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +2 -2
- package/Libraries/Core/polyfillPromise.js +0 -32
- package/Libraries/Core/setUpBatchedBridge.js +5 -1
- package/Libraries/Core/setUpPerformance.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
- package/Libraries/Image/AssetSourceResolver.js +2 -2
- package/Libraries/Image/Image.android.js +5 -3
- package/Libraries/Image/Image.ios.js +6 -3
- package/Libraries/Image/Image.windows.js +6 -3
- package/Libraries/Image/ImageSource.js +7 -5
- package/Libraries/Inspector/ElementBox.js +2 -2
- package/Libraries/Inspector/NetworkOverlay.js +13 -8
- package/Libraries/Interaction/PanResponder.js +16 -14
- package/Libraries/Linking/Linking.js +0 -11
- package/Libraries/Lists/FlatList.js +3 -2
- package/Libraries/Lists/SectionList.js +2 -0
- package/Libraries/Lists/ViewabilityHelper.js +7 -3
- package/Libraries/Lists/VirtualizeUtils.js +33 -20
- package/Libraries/Lists/VirtualizedList.js +93 -47
- package/Libraries/Lists/VirtualizedListContext.js +1 -0
- package/Libraries/Lists/VirtualizedSectionList.js +14 -9
- package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
- package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/LogBox.js +3 -1
- package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -12
- package/Libraries/Network/XMLHttpRequest.js +9 -11
- package/Libraries/Performance/PureComponentDebug.js +1 -0
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
- package/Libraries/Pressability/Pressability.js +26 -16
- package/Libraries/Pressability/Pressability.windows.js +30 -17
- package/Libraries/Promise.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +16 -13
- package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
- package/Libraries/ReactNative/PaperUIManager.js +9 -9
- package/Libraries/ReactNative/PaperUIManager.windows.js +7 -8
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
- package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
- package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
- package/Libraries/ReactNative/renderApplication.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
- package/Libraries/Storage/AsyncStorage.js +7 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
- package/Libraries/StyleSheet/flattenStyle.js +1 -1
- package/Libraries/StyleSheet/processTransform.js +2 -0
- package/Libraries/StyleSheet/processTransform.windows.js +2 -0
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
- package/Libraries/Text/Text.js +15 -7
- package/Libraries/Text/Text.windows.js +14 -7
- package/Libraries/Types/CoreEventTypes.js +137 -11
- package/Libraries/Types/CoreEventTypes.windows.js +147 -22
- package/Libraries/Utilities/Dimensions.js +0 -13
- package/Libraries/Utilities/HMRClient.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +0 -7
- package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
- package/Libraries/Utilities/codegenNativeCommands.js +11 -2
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/stringifySafe.js +3 -1
- package/Libraries/Utilities/truncate.js +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
- package/Libraries/Vibration/Vibration.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +1 -0
- package/Libraries/vendor/emitter/EventEmitter.js +105 -12
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
- package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +24 -12
- package/Microsoft.ReactNative/CoreApp.cpp +303 -0
- package/Microsoft.ReactNative/CoreAppPage.cpp +21 -0
- package/Microsoft.ReactNative/CoreAppPage.h +15 -0
- package/Microsoft.ReactNative/CoreAppPage.idl +12 -0
- package/Microsoft.ReactNative/CoreAppPage.xaml +14 -0
- package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ImageComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ImageComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ParagraphComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ParagraphComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/SliderComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/SliderComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/SwitchComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/SwitchComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/TextComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/TextComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ViewComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ViewComponentView.h +1 -1
- package/Microsoft.ReactNative/GlyphViewManager.cpp +1 -0
- package/Microsoft.ReactNative/IReactDispatcher.cpp +18 -0
- package/Microsoft.ReactNative/IReactDispatcher.h +18 -3
- package/Microsoft.ReactNative/IReactDispatcher.idl +15 -0
- package/Microsoft.ReactNative/IReactPropertyBag.cpp +9 -0
- package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
- package/Microsoft.ReactNative/IReactPropertyBag.idl +3 -0
- package/Microsoft.ReactNative/JSDispatcherWriter.cpp +60 -22
- package/Microsoft.ReactNative/JSDispatcherWriter.h +5 -3
- package/Microsoft.ReactNative/JsiApi.cpp +41 -1
- package/Microsoft.ReactNative/JsiApi.h +3 -0
- package/Microsoft.ReactNative/JsiApi.idl +19 -1
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +18 -2
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +7 -7
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +1 -1
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +15 -12
- package/Microsoft.ReactNative/Modules/AlertModule.h +1 -1
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +45 -9
- package/Microsoft.ReactNative/Modules/AppStateModule.h +9 -3
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +1 -1
- package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
- package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +1 -1
- package/Microsoft.ReactNative/Modules/I18nManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -1
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +66 -39
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +41 -11
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +1 -1
- package/Microsoft.ReactNative/QuirkSettings.cpp +22 -0
- package/Microsoft.ReactNative/QuirkSettings.h +10 -0
- package/Microsoft.ReactNative/QuirkSettings.idl +7 -0
- package/Microsoft.ReactNative/ReactApplication.cpp +44 -0
- package/Microsoft.ReactNative/ReactApplication.h +40 -5
- package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +5 -2
- package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +1 -0
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +24 -4
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
- package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +12 -2
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +146 -84
- package/Microsoft.ReactNative/TurboModulesProvider.h +5 -0
- package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +1 -0
- package/Microsoft.ReactNative/Utils/Helpers.cpp +1 -1
- package/Microsoft.ReactNative/Utils/Helpers.h +1 -1
- package/Microsoft.ReactNative/Utils/PropertyUtils.h +1 -1
- package/Microsoft.ReactNative/Utils/TransformableText.h +1 -1
- package/Microsoft.ReactNative/Utils/ValueUtils.cpp +0 -1
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +9 -7
- package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +3 -3
- package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +13 -1
- package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +1 -1
- package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +63 -13
- package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +1 -1
- package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +5 -6
- package/Microsoft.ReactNative/Views/Image/ReactImage.h +4 -4
- package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +1 -1
- package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +21 -2
- package/Microsoft.ReactNative/Views/TextViewManager.cpp +6 -3
- package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +1 -1
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +7 -1
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +4 -0
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +8 -3
- package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +2 -0
- package/Microsoft.ReactNative/microsoft.reactnative.def +4 -1
- package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
- package/Microsoft.ReactNative.Cxx/CoreApp.h +60 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +65 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +13 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
- package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
- package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +14 -2
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +4 -0
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +10 -0
- package/Microsoft.ReactNative.Managed/packages.lock.json +1 -24
- package/Mso/dispatchQueue/dispatchQueue.h +12 -4
- package/Mso/src/dispatchQueue/looperScheduler.cpp +36 -9
- package/Mso/src/dispatchQueue/queueService.cpp +2 -2
- package/Mso/src/dispatchQueue/queueService.h +2 -2
- package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +6 -1
- package/Mso/src/memoryApi/memoryApi.cpp +3 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/JSEngine.props +1 -1
- package/PropertySheets/Release.props +6 -0
- package/ReactCommon/ReactCommon.vcxproj +11 -21
- package/ReactCommon/ReactCommon.vcxproj.filters +64 -46
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h +145 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +344 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseTextProps.cpp +313 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.cpp +455 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ConcreteComponentDescriptor.h +216 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/PropsMacros.h +91 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/RectangleEdges.h +100 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/CompactValue.h +3 -1
- package/Scripts/Microsoft.ReactNative.nuspec +6 -0
- package/Scripts/Microsoft.ReactNative.targets +7 -0
- package/Shared/DevSettings.h +4 -0
- package/Shared/InstanceManager.cpp +29 -0
- package/Shared/InstanceManager.h +14 -0
- package/Shared/JSI/ChakraRuntime.cpp +11 -2
- package/Shared/JSI/ChakraRuntime.h +2 -0
- package/Shared/Modules/BlobModule.cpp +4 -4
- package/Shared/Modules/BlobModule.h +1 -1
- package/Shared/Modules/FileReaderModule.cpp +3 -2
- package/Shared/Modules/IBlobPersistor.h +1 -1
- package/Shared/Networking/IHttpResource.h +1 -0
- package/Shared/Networking/OriginPolicyHttpFilter.cpp +16 -10
- package/Shared/Networking/WinRTHttpResource.cpp +34 -2
- package/Shared/OInstance.cpp +29 -6
- package/Shared/OInstance.h +4 -13
- package/Shared/Threading/BatchingQueueThread.cpp +23 -12
- package/Shared/Utils.cpp +2 -5
- package/codegen/NativeAlertManagerSpec.g.h +2 -0
- package/codegen/NativeAnimatedModuleSpec.g.h +6 -0
- package/codegen/NativeAnimatedTurboModuleSpec.g.h +6 -0
- package/codegen/react/components/rnwcore/Props.cpp +2 -2
- package/codegen/react/components/rnwcore/Props.h +1 -1
- package/fmt/cgmanifest.json +14 -0
- package/fmt/fmt.vcxproj +25 -11
- package/jest/assetFileTransformer.js +3 -2
- package/jest/setup.js +4 -0
- package/package.json +25 -26
- package/rntypes/index.d.ts +0 -1
- package/template/cs-app-WinAppSDK/proj/{NuGet.Config → NuGet_Config} +0 -0
- package/template/metro.devMode.config.js +49 -2
- package/template/shared-app/proj/{NuGet.Config → NuGet_Config} +0 -0
- package/template/shared-lib/proj/{NuGet.Config → NuGet_Config} +0 -0
- package/Libraries/vendor/emitter/EventSubscription.js +0 -19
- package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
- package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
- package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +0 -87
- package/Scripts/copyRNLibraries.js +0 -99
- package/jest/preprocessor.js +0 -40
- package/jest/preprocessor_DO_NOT_USE.js +0 -122
package/Shared/OInstance.cpp
CHANGED
|
@@ -106,11 +106,17 @@ class OJSIExecutorFactory : public JSExecutorFactory {
|
|
|
106
106
|
auto turboModuleManager = std::make_shared<TurboModuleManager>(turboModuleRegistry_, jsCallInvoker_);
|
|
107
107
|
|
|
108
108
|
// TODO: The binding here should also add the proxys that convert cxxmodules into turbomodules
|
|
109
|
+
// [vmoroz] Note, that we must not use the RN TurboCxxModule.h code because it uses global LongLivedObjectCollection
|
|
110
|
+
// instance that prevents us from using multiple RN instance in the same process.
|
|
109
111
|
auto binding = [turboModuleManager](const std::string &name) -> std::shared_ptr<TurboModule> {
|
|
110
112
|
return turboModuleManager->getModule(name);
|
|
111
113
|
};
|
|
112
114
|
|
|
113
|
-
TurboModuleBinding::install(
|
|
115
|
+
TurboModuleBinding::install(
|
|
116
|
+
*runtimeHolder_->getRuntime(),
|
|
117
|
+
std::function(binding),
|
|
118
|
+
TurboModuleBindingMode::HostObject,
|
|
119
|
+
longLivedObjectCollection_);
|
|
114
120
|
|
|
115
121
|
// init TurboModule
|
|
116
122
|
for (const auto &moduleName : turboModuleManager->getEagerInitModuleNames()) {
|
|
@@ -132,17 +138,20 @@ class OJSIExecutorFactory : public JSExecutorFactory {
|
|
|
132
138
|
std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> runtimeHolder,
|
|
133
139
|
NativeLoggingHook loggingHook,
|
|
134
140
|
std::shared_ptr<TurboModuleRegistry> turboModuleRegistry,
|
|
141
|
+
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection,
|
|
135
142
|
bool isProfilingEnabled,
|
|
136
143
|
std::shared_ptr<CallInvoker> jsCallInvoker) noexcept
|
|
137
144
|
: runtimeHolder_{std::move(runtimeHolder)},
|
|
138
145
|
loggingHook_{std::move(loggingHook)},
|
|
139
146
|
turboModuleRegistry_{std::move(turboModuleRegistry)},
|
|
147
|
+
longLivedObjectCollection_{std::move(longLivedObjectCollection)},
|
|
140
148
|
jsCallInvoker_{std::move(jsCallInvoker)},
|
|
141
149
|
isProfilingEnabled_{isProfilingEnabled} {}
|
|
142
150
|
|
|
143
151
|
private:
|
|
144
152
|
std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> runtimeHolder_;
|
|
145
153
|
std::shared_ptr<TurboModuleRegistry> turboModuleRegistry_;
|
|
154
|
+
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection_;
|
|
146
155
|
std::shared_ptr<CallInvoker> jsCallInvoker_;
|
|
147
156
|
NativeLoggingHook loggingHook_;
|
|
148
157
|
bool isProfilingEnabled_;
|
|
@@ -159,6 +168,7 @@ void logMarker(const facebook::react::ReactMarker::ReactMarkerId /*id*/, const c
|
|
|
159
168
|
std::tuple<std::string, facebook::xplat::module::CxxModule::Provider, std::shared_ptr<MessageQueueThread>>>
|
|
160
169
|
&&cxxModules,
|
|
161
170
|
std::shared_ptr<TurboModuleRegistry> turboModuleRegistry,
|
|
171
|
+
std::shared_ptr<facebook::react::LongLivedObjectCollection> longLivedObjectCollection,
|
|
162
172
|
std::unique_ptr<InstanceCallback> &&callback,
|
|
163
173
|
std::shared_ptr<MessageQueueThread> jsQueue,
|
|
164
174
|
std::shared_ptr<MessageQueueThread> nativeQueue,
|
|
@@ -169,6 +179,7 @@ void logMarker(const facebook::react::ReactMarker::ReactMarkerId /*id*/, const c
|
|
|
169
179
|
std::move(jsBundleBasePath),
|
|
170
180
|
std::move(cxxModules),
|
|
171
181
|
std::move(turboModuleRegistry),
|
|
182
|
+
std::move(longLivedObjectCollection),
|
|
172
183
|
std::move(callback),
|
|
173
184
|
std::move(jsQueue),
|
|
174
185
|
std::move(nativeQueue),
|
|
@@ -198,6 +209,7 @@ void logMarker(const facebook::react::ReactMarker::ReactMarkerId /*id*/, const c
|
|
|
198
209
|
std::move(jsBundleBasePath),
|
|
199
210
|
std::move(cxxModules),
|
|
200
211
|
std::move(turboModuleRegistry),
|
|
212
|
+
nullptr,
|
|
201
213
|
std::move(callback),
|
|
202
214
|
std::move(jsQueue),
|
|
203
215
|
std::move(nativeQueue),
|
|
@@ -235,12 +247,14 @@ InstanceImpl::InstanceImpl(
|
|
|
235
247
|
std::tuple<std::string, facebook::xplat::module::CxxModule::Provider, std::shared_ptr<MessageQueueThread>>>
|
|
236
248
|
&&cxxModules,
|
|
237
249
|
std::shared_ptr<TurboModuleRegistry> turboModuleRegistry,
|
|
250
|
+
std::shared_ptr<facebook::react::LongLivedObjectCollection> longLivedObjectCollection,
|
|
238
251
|
std::unique_ptr<InstanceCallback> &&callback,
|
|
239
252
|
std::shared_ptr<MessageQueueThread> jsQueue,
|
|
240
253
|
std::shared_ptr<MessageQueueThread> nativeQueue,
|
|
241
254
|
std::shared_ptr<DevSettings> devSettings,
|
|
242
255
|
std::shared_ptr<IDevSupportManager> devManager)
|
|
243
256
|
: m_turboModuleRegistry(std::move(turboModuleRegistry)),
|
|
257
|
+
m_longLivedObjectCollection(std::move(longLivedObjectCollection)),
|
|
244
258
|
m_jsThread(std::move(jsQueue)),
|
|
245
259
|
m_nativeQueue(nativeQueue),
|
|
246
260
|
m_jsBundleBasePath(std::move(jsBundleBasePath)),
|
|
@@ -301,6 +315,7 @@ InstanceImpl::InstanceImpl(
|
|
|
301
315
|
m_devSettings->jsiRuntimeHolder,
|
|
302
316
|
m_devSettings->loggingCallback,
|
|
303
317
|
m_turboModuleRegistry,
|
|
318
|
+
m_longLivedObjectCollection,
|
|
304
319
|
!m_devSettings->useFastRefresh,
|
|
305
320
|
m_innerInstance->getJSCallInvoker());
|
|
306
321
|
} else {
|
|
@@ -355,7 +370,6 @@ InstanceImpl::InstanceImpl(
|
|
|
355
370
|
#endif
|
|
356
371
|
}
|
|
357
372
|
case JSIEngineOverride::Chakra:
|
|
358
|
-
case JSIEngineOverride::ChakraCore:
|
|
359
373
|
default: // TODO: Add other engines once supported
|
|
360
374
|
m_devSettings->jsiRuntimeHolder =
|
|
361
375
|
std::make_shared<Microsoft::JSI::ChakraRuntimeHolder>(m_devSettings, m_jsThread, nullptr, nullptr);
|
|
@@ -365,6 +379,7 @@ InstanceImpl::InstanceImpl(
|
|
|
365
379
|
m_devSettings->jsiRuntimeHolder,
|
|
366
380
|
m_devSettings->loggingCallback,
|
|
367
381
|
m_turboModuleRegistry,
|
|
382
|
+
m_longLivedObjectCollection,
|
|
368
383
|
!m_devSettings->useFastRefresh,
|
|
369
384
|
m_innerInstance->getJSCallInvoker());
|
|
370
385
|
}
|
|
@@ -508,7 +523,7 @@ void InstanceImpl::loadBundleInternal(std::string &&jsBundleRelativePath, bool s
|
|
|
508
523
|
}
|
|
509
524
|
} else {
|
|
510
525
|
#if (defined(_MSC_VER) && !defined(WINRT))
|
|
511
|
-
std::string bundlePath = (fs::
|
|
526
|
+
std::string bundlePath = (fs::u8path(m_devSettings->bundleRootPath) / jsBundleRelativePath).u8string();
|
|
512
527
|
auto bundleString = FileMappingBigString::fromPath(bundlePath);
|
|
513
528
|
#else
|
|
514
529
|
std::string bundlePath;
|
|
@@ -517,7 +532,7 @@ void InstanceImpl::loadBundleInternal(std::string &&jsBundleRelativePath, bool s
|
|
|
517
532
|
winrt::to_hstring(m_devSettings->bundleRootPath), winrt::to_hstring(jsBundleRelativePath));
|
|
518
533
|
bundlePath = winrt::to_string(uri.ToString());
|
|
519
534
|
} else {
|
|
520
|
-
bundlePath = (fs::
|
|
535
|
+
bundlePath = (fs::u8path(m_devSettings->bundleRootPath) / (jsBundleRelativePath + ".bundle")).u8string();
|
|
521
536
|
}
|
|
522
537
|
|
|
523
538
|
auto bundleString = std::make_unique<::Microsoft::ReactNative::StorageFileBigString>(bundlePath);
|
|
@@ -545,6 +560,7 @@ std::vector<std::unique_ptr<NativeModule>> InstanceImpl::GetDefaultNativeModules
|
|
|
545
560
|
std::vector<std::unique_ptr<NativeModule>> modules;
|
|
546
561
|
auto transitionalProps{ReactPropertyBagHelper::CreatePropertyBag()};
|
|
547
562
|
|
|
563
|
+
#if (defined(_MSC_VER) && !defined(WINRT))
|
|
548
564
|
modules.push_back(std::make_unique<CxxNativeModule>(
|
|
549
565
|
m_innerInstance,
|
|
550
566
|
Microsoft::React::GetHttpModuleName(),
|
|
@@ -552,6 +568,7 @@ std::vector<std::unique_ptr<NativeModule>> InstanceImpl::GetDefaultNativeModules
|
|
|
552
568
|
return Microsoft::React::CreateHttpModule(transitionalProps);
|
|
553
569
|
},
|
|
554
570
|
nativeQueue));
|
|
571
|
+
#endif
|
|
555
572
|
|
|
556
573
|
modules.push_back(std::make_unique<CxxNativeModule>(
|
|
557
574
|
m_innerInstance,
|
|
@@ -619,8 +636,13 @@ std::vector<std::unique_ptr<NativeModule>> InstanceImpl::GetDefaultNativeModules
|
|
|
619
636
|
[]() { return std::make_unique<StatusBarManagerModule>(); },
|
|
620
637
|
nativeQueue));
|
|
621
638
|
|
|
622
|
-
//
|
|
623
|
-
|
|
639
|
+
// These modules are instantiated separately in MSRN (Universal Windows).
|
|
640
|
+
// When there are module name colisions, the last one registered is used.
|
|
641
|
+
// If this code is enabled, we will have unused module instances.
|
|
642
|
+
// Also, MSRN has a different property bag mechanism incompatible with this method's transitionalProps variable.
|
|
643
|
+
#if (defined(_MSC_VER) && !defined(WINRT))
|
|
644
|
+
if (Microsoft::React::GetRuntimeOptionBool("Blob.EnableModule") &&
|
|
645
|
+
!Microsoft::React::GetRuntimeOptionBool("Http.UseMonolithicModule")) {
|
|
624
646
|
modules.push_back(std::make_unique<CxxNativeModule>(
|
|
625
647
|
m_innerInstance,
|
|
626
648
|
Microsoft::React::GetBlobModuleName(),
|
|
@@ -633,6 +655,7 @@ std::vector<std::unique_ptr<NativeModule>> InstanceImpl::GetDefaultNativeModules
|
|
|
633
655
|
[transitionalProps]() { return Microsoft::React::CreateFileReaderModule(transitionalProps); },
|
|
634
656
|
nativeQueue));
|
|
635
657
|
}
|
|
658
|
+
#endif
|
|
636
659
|
|
|
637
660
|
return modules;
|
|
638
661
|
}
|
package/Shared/OInstance.h
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#include "InstanceManager.h"
|
|
11
11
|
|
|
12
12
|
// React Native
|
|
13
|
+
#include <ReactCommon/LongLivedObject.h>
|
|
13
14
|
#include <cxxreact/Instance.h>
|
|
14
15
|
|
|
15
16
|
// Standard Libriary
|
|
@@ -32,6 +33,7 @@ class InstanceImpl final : public InstanceWrapper, private ::std::enable_shared_
|
|
|
32
33
|
std::tuple<std::string, facebook::xplat::module::CxxModule::Provider, std::shared_ptr<MessageQueueThread>>>
|
|
33
34
|
&&cxxModules,
|
|
34
35
|
std::shared_ptr<TurboModuleRegistry> turboModuleRegistry,
|
|
36
|
+
std::shared_ptr<facebook::react::LongLivedObjectCollection> longLivedObjectCollection,
|
|
35
37
|
std::unique_ptr<InstanceCallback> &&callback,
|
|
36
38
|
std::shared_ptr<MessageQueueThread> jsQueue,
|
|
37
39
|
std::shared_ptr<MessageQueueThread> nativeQueue,
|
|
@@ -72,19 +74,7 @@ class InstanceImpl final : public InstanceWrapper, private ::std::enable_shared_
|
|
|
72
74
|
std::tuple<std::string, facebook::xplat::module::CxxModule::Provider, std::shared_ptr<MessageQueueThread>>>
|
|
73
75
|
&&cxxModules,
|
|
74
76
|
std::shared_ptr<TurboModuleRegistry> turboModuleRegistry,
|
|
75
|
-
std::
|
|
76
|
-
std::shared_ptr<MessageQueueThread> jsQueue,
|
|
77
|
-
std::shared_ptr<MessageQueueThread> nativeQueue,
|
|
78
|
-
std::shared_ptr<DevSettings> devSettings,
|
|
79
|
-
std::shared_ptr<IDevSupportManager> devManager);
|
|
80
|
-
|
|
81
|
-
InstanceImpl(
|
|
82
|
-
std::shared_ptr<Instance> &&instance,
|
|
83
|
-
std::string &&jsBundleBasePath,
|
|
84
|
-
std::string &&jsBundleRelativePath,
|
|
85
|
-
std::vector<
|
|
86
|
-
std::tuple<std::string, facebook::xplat::module::CxxModule::Provider, std::shared_ptr<MessageQueueThread>>>
|
|
87
|
-
&&cxxModules,
|
|
77
|
+
std::shared_ptr<facebook::react::LongLivedObjectCollection> longLivedObjectCollection,
|
|
88
78
|
std::unique_ptr<InstanceCallback> &&callback,
|
|
89
79
|
std::shared_ptr<MessageQueueThread> jsQueue,
|
|
90
80
|
std::shared_ptr<MessageQueueThread> nativeQueue,
|
|
@@ -102,6 +92,7 @@ class InstanceImpl final : public InstanceWrapper, private ::std::enable_shared_
|
|
|
102
92
|
std::string m_jsBundleBasePath;
|
|
103
93
|
std::shared_ptr<facebook::react::ModuleRegistry> m_moduleRegistry;
|
|
104
94
|
std::shared_ptr<TurboModuleRegistry> m_turboModuleRegistry;
|
|
95
|
+
std::shared_ptr<facebook::react::LongLivedObjectCollection> m_longLivedObjectCollection;
|
|
105
96
|
std::shared_ptr<MessageQueueThread> m_jsThread;
|
|
106
97
|
std::shared_ptr<MessageQueueThread> m_nativeQueue;
|
|
107
98
|
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
#include "pch.h"
|
|
5
5
|
#include "Threading/BatchingQueueThread.h"
|
|
6
6
|
#include <cxxreact/Instance.h>
|
|
7
|
+
#include <cxxreact/SystraceSection.h>
|
|
7
8
|
#include <eventWaitHandle/eventWaitHandle.h>
|
|
8
9
|
#include <cassert>
|
|
9
10
|
|
|
11
|
+
using namespace facebook::react;
|
|
12
|
+
|
|
10
13
|
namespace Microsoft::ReactNative {
|
|
11
14
|
|
|
12
15
|
BatchingQueueCallInvoker::BatchingQueueCallInvoker(
|
|
@@ -36,7 +39,9 @@ void BatchingQueueCallInvoker::EnsureQueue() noexcept {
|
|
|
36
39
|
void BatchingQueueCallInvoker::PostBatch() noexcept {
|
|
37
40
|
if (m_taskQueue) {
|
|
38
41
|
m_queueThread->runOnQueue([taskQueue{std::move(m_taskQueue)}]() noexcept {
|
|
42
|
+
SystraceSection s1("BatchingQueueCallInvoker::PostBatch");
|
|
39
43
|
for (auto &task : *taskQueue) {
|
|
44
|
+
SystraceSection s2("BatchingQueueCallInvoker::PostBatch::Task");
|
|
40
45
|
task();
|
|
41
46
|
task = nullptr;
|
|
42
47
|
}
|
|
@@ -69,19 +74,25 @@ BatchingQueueThread::BatchingQueueThread(
|
|
|
69
74
|
void BatchingQueueThread::decoratedNativeCallInvokerReady(
|
|
70
75
|
std::weak_ptr<facebook::react::Instance> wkInstance) noexcept {
|
|
71
76
|
std::scoped_lock lck(m_mutex);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
if (auto instance = wkInstance.lock()) {
|
|
78
|
+
// When items were queued in the undecoratedNativeCallInvoker it will not have called
|
|
79
|
+
// recordTurboModuleAsyncMethodCall. Calling invokeAsync on the decoratedNativeCallInvoker
|
|
80
|
+
// ensures that the queue is properly flushed, on the next batch complete
|
|
81
|
+
auto decoratedCallInvoker = instance->getDecoratedNativeCallInvoker(m_callInvoker);
|
|
82
|
+
decoratedCallInvoker->invokeAsync([decoratedCallInvoker, wkInstance, this] {
|
|
83
|
+
if (auto instance = wkInstance.lock()) {
|
|
84
|
+
std::scoped_lock lckQuitting(m_mutexQuitting);
|
|
85
|
+
|
|
86
|
+
// If we are shutting down, then then the mutex is being held in quitSynchronous
|
|
87
|
+
// Which is waiting for this task to complete, so we cannot take the mutex if quitSynchronous
|
|
88
|
+
// is running. -- and since we are shutting down anyway, we can just skip this work.
|
|
89
|
+
if (!m_quitting) {
|
|
90
|
+
std::scoped_lock lck(m_mutex);
|
|
91
|
+
m_callInvoker = decoratedCallInvoker;
|
|
92
|
+
}
|
|
82
93
|
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
85
96
|
}
|
|
86
97
|
|
|
87
98
|
BatchingQueueThread::~BatchingQueueThread() noexcept {}
|
package/Shared/Utils.cpp
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
#include "Utils.h"
|
|
5
5
|
#include <regex>
|
|
6
6
|
|
|
7
|
+
#include <AppModelHelpers.h>
|
|
7
8
|
#include <DesktopWindowBridge.h>
|
|
8
9
|
#include <ShlObj.h>
|
|
9
10
|
#include <Shlwapi.h>
|
|
10
|
-
#include <appmodel.h>
|
|
11
11
|
#include <winrt/Windows.Storage.h>
|
|
12
12
|
|
|
13
13
|
#include <sstream>
|
|
@@ -56,10 +56,7 @@ std::future<std::string> getUnPackagedApplicationDataPath(const wchar_t *childFo
|
|
|
56
56
|
} // namespace
|
|
57
57
|
|
|
58
58
|
std::future<std::string> getApplicationDataPath(const wchar_t *childFolder) {
|
|
59
|
-
|
|
60
|
-
bool isPackagedApp = GetCurrentPackageFullName(&length, nullptr) != APPMODEL_ERROR_NO_PACKAGE;
|
|
61
|
-
std::string appDataPath;
|
|
62
|
-
if (false) {
|
|
59
|
+
if (Microsoft::ReactNative::HasPackageIdentity()) {
|
|
63
60
|
co_return co_await getPackagedApplicationDataPath(childFolder);
|
|
64
61
|
} else {
|
|
65
62
|
co_return co_await getUnPackagedApplicationDataPath(childFolder);
|
|
@@ -31,6 +31,8 @@ struct AlertManagerSpec_Args {
|
|
|
31
31
|
std::optional<std::string> destructiveButtonKey;
|
|
32
32
|
REACT_FIELD(keyboardType)
|
|
33
33
|
std::optional<std::string> keyboardType;
|
|
34
|
+
REACT_FIELD(userInterfaceStyle)
|
|
35
|
+
std::optional<std::string> userInterfaceStyle;
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
struct AlertManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
|
|
@@ -52,6 +52,7 @@ struct AnimatedModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
|
|
|
52
52
|
Method<void(double, std::string, double) noexcept>{20, L"removeAnimatedEventFromView"},
|
|
53
53
|
Method<void(std::string) noexcept>{21, L"addListener"},
|
|
54
54
|
Method<void(double) noexcept>{22, L"removeListeners"},
|
|
55
|
+
Method<void(::React::JSValueArray) noexcept>{23, L"queueAndExecuteBatchedOperations"},
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
template <class TModule>
|
|
@@ -173,6 +174,11 @@ struct AnimatedModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
|
|
|
173
174
|
"removeListeners",
|
|
174
175
|
" REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }}\n"
|
|
175
176
|
" REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }}\n");
|
|
177
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
178
|
+
23,
|
|
179
|
+
"queueAndExecuteBatchedOperations",
|
|
180
|
+
" REACT_METHOD(queueAndExecuteBatchedOperations) void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }}\n"
|
|
181
|
+
" REACT_METHOD(queueAndExecuteBatchedOperations) static void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }}\n");
|
|
176
182
|
}
|
|
177
183
|
};
|
|
178
184
|
|
|
@@ -52,6 +52,7 @@ struct AnimatedTurboModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec
|
|
|
52
52
|
Method<void(double, std::string, double) noexcept>{20, L"removeAnimatedEventFromView"},
|
|
53
53
|
Method<void(std::string) noexcept>{21, L"addListener"},
|
|
54
54
|
Method<void(double) noexcept>{22, L"removeListeners"},
|
|
55
|
+
Method<void(::React::JSValueArray) noexcept>{23, L"queueAndExecuteBatchedOperations"},
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
template <class TModule>
|
|
@@ -173,6 +174,11 @@ struct AnimatedTurboModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec
|
|
|
173
174
|
"removeListeners",
|
|
174
175
|
" REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }}\n"
|
|
175
176
|
" REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }}\n");
|
|
177
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
178
|
+
23,
|
|
179
|
+
"queueAndExecuteBatchedOperations",
|
|
180
|
+
" REACT_METHOD(queueAndExecuteBatchedOperations) void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }}\n"
|
|
181
|
+
" REACT_METHOD(queueAndExecuteBatchedOperations) static void queueAndExecuteBatchedOperations(::React::JSValueArray && operationsAndArgs) noexcept { /* implementation */ }}\n");
|
|
176
182
|
}
|
|
177
183
|
};
|
|
178
184
|
|
|
@@ -126,9 +126,9 @@ PullToRefreshViewProps::PullToRefreshViewProps(
|
|
|
126
126
|
SafeAreaViewProps::SafeAreaViewProps(
|
|
127
127
|
const PropsParserContext &context,
|
|
128
128
|
const SafeAreaViewProps &sourceProps,
|
|
129
|
-
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
|
129
|
+
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
|
|
132
132
|
{}
|
|
133
133
|
AndroidHorizontalScrollContentViewProps::AndroidHorizontalScrollContentViewProps(
|
|
134
134
|
const PropsParserContext &context,
|
package/fmt/fmt.vcxproj
CHANGED
|
@@ -96,16 +96,28 @@
|
|
|
96
96
|
</Link>
|
|
97
97
|
</ItemDefinitionGroup>
|
|
98
98
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
<
|
|
99
|
+
<PropertyGroup>
|
|
100
|
+
<FmtZipDir>$(FmtDir)..\.fmtzip</FmtZipDir>
|
|
101
|
+
<FmtZipFile>$(FmtZipDir)\fmt-$(FmtVersion).zip</FmtZipFile>
|
|
102
|
+
<CGManifestFile>$(MSBuildThisFileDirectory)cgmanifest.json</CGManifestFile>
|
|
103
|
+
</PropertyGroup>
|
|
104
|
+
<Target Name="DownloadFmt" BeforeTargets="PrepareForBuild" Inputs="$(FmtZipFile)" Outputs="$(FmtZipFile)">
|
|
105
|
+
<Message Importance="High" Text="Downloading fmt..." />
|
|
106
|
+
<DownloadFile
|
|
107
|
+
SourceUrl="https://github.com/fmtlib/fmt/archive/refs/tags/$(FmtVersion).zip"
|
|
108
|
+
DestinationFileName="$(FmtZipFile)"
|
|
109
|
+
DestinationFolder="$(FmtZipDir)"
|
|
110
|
+
Retries="10" />
|
|
102
111
|
</Target>
|
|
103
112
|
<Target Name="UnzipFmt" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFmt">
|
|
104
|
-
<Message Importance="High" Text="Unzipping fmt to $([MSBuild]::NormalizePath($(FmtDir)..))."
|
|
105
|
-
<Unzip
|
|
113
|
+
<Message Condition="!Exists('$(FmtDir)src\format.cc')" Importance="High" Text="Unzipping fmt to $([MSBuild]::NormalizePath($(FmtDir)..))."/>
|
|
114
|
+
<Unzip
|
|
115
|
+
Condition="!Exists('$(FmtDir)src\format.cc')"
|
|
116
|
+
SourceFiles="$(FmtZipFile)"
|
|
117
|
+
DestinationFolder="$([MSBuild]::NormalizePath($(FmtDir)..))"
|
|
118
|
+
OverwriteReadOnlyFiles="true" />
|
|
106
119
|
</Target>
|
|
107
|
-
<Target Name="WriteCGManifest" BeforeTargets="PrepareForBuild" DependsOnTargets="
|
|
108
|
-
<Message Importance="High" Text="Generating $([MSBuild]::NormalizePath($(FmtDir)..))\cgmanifest.json." Condition="!Exists('$([MSBuild]::NormalizePath($(FmtDir)..))\cgmanifest.json')" />
|
|
120
|
+
<Target Name="WriteCGManifest" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFmt" Inputs="$(FmtZipFile)" Outputs="$(CGManifestFile)">
|
|
109
121
|
<PropertyGroup>
|
|
110
122
|
<CGManifestText>{
|
|
111
123
|
"Registrations": [
|
|
@@ -122,17 +134,19 @@
|
|
|
122
134
|
]
|
|
123
135
|
}</CGManifestText>
|
|
124
136
|
</PropertyGroup>
|
|
137
|
+
<Message Importance="High" Text="Generating $(CGManifestFile)." />
|
|
125
138
|
<WriteLinesToFile
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
139
|
+
File="$(CGManifestFile)"
|
|
140
|
+
Overwrite="true"
|
|
141
|
+
Lines="$(CGManifestText)" />
|
|
129
142
|
</Target>
|
|
130
143
|
<ItemGroup>
|
|
131
144
|
<TemporaryFmtPatchFiles Include="$(MSBuildThisFileDirectory)\TEMP_UntilFmtUpdate\**\*.*" />
|
|
132
145
|
</ItemGroup>
|
|
133
146
|
<Target Name="Deploy" />
|
|
134
147
|
<!-- Allow temporary patches if needed, while we wait for PRs to land in fmt -->
|
|
135
|
-
<Target Name="ApplyFmtTemporaryPatch" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipFmt">
|
|
148
|
+
<Target Name="ApplyFmtTemporaryPatch" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipFmt" Inputs="@(TemporaryFmtPatchFiles)" Outputs="@(TemporaryFmtPatchFiles->'$(FmtDir)fmt\%(RecursiveDir)%(Filename)%(Extension)')">
|
|
149
|
+
<Message Importance="High" Text="Applying temporary patches to fmt." />
|
|
136
150
|
<Copy DestinationFiles="@(TemporaryFmtPatchFiles->'$(FmtDir)fmt\%(RecursiveDir)%(Filename)%(Extension)')" SourceFiles="@(TemporaryFmtPatchFiles)" />
|
|
137
151
|
</Target>
|
|
138
152
|
</Project>
|
|
@@ -20,12 +20,13 @@ module.exports = {
|
|
|
20
20
|
// the correct images are loaded for components. Essentially
|
|
21
21
|
// require('img1.png') becomes `Object { "testUri": 'path/to/img1.png' }` in
|
|
22
22
|
// the Jest snapshot.
|
|
23
|
-
process: (_, filename) =>
|
|
24
|
-
`module.exports = {
|
|
23
|
+
process: (_, filename) => ({
|
|
24
|
+
code: `module.exports = {
|
|
25
25
|
testUri:
|
|
26
26
|
${JSON.stringify(
|
|
27
27
|
path.relative(__dirname, filename).replace(/\\/g, '/'),
|
|
28
28
|
)}
|
|
29
29
|
};`,
|
|
30
|
+
}),
|
|
30
31
|
getCacheKey: createCacheKeyFunction([__filename]),
|
|
31
32
|
};
|
package/jest/setup.js
CHANGED
|
@@ -355,6 +355,10 @@ jest
|
|
|
355
355
|
'../Libraries/Utilities/verifyComponentAttributeEquivalence',
|
|
356
356
|
() => function () {},
|
|
357
357
|
)
|
|
358
|
+
.mock('../Libraries/Vibration/Vibration', () => ({
|
|
359
|
+
vibrate: jest.fn(),
|
|
360
|
+
cancel: jest.fn(),
|
|
361
|
+
}))
|
|
358
362
|
.mock('../Libraries/Components/View/ViewNativeComponent', () => {
|
|
359
363
|
const React = require('react');
|
|
360
364
|
const Component = class extends React.Component {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@babel/runtime": "^7.0.0",
|
|
25
25
|
"@jest/create-cache-key-function": "^27.0.1",
|
|
26
|
-
"@react-native-community/cli": "^
|
|
27
|
-
"@react-native-community/cli-platform-android": "^
|
|
28
|
-
"@react-native-community/cli-platform-ios": "^
|
|
29
|
-
"@react-native-windows/cli": "0.
|
|
30
|
-
"@react-native-windows/virtualized-list": "0.
|
|
26
|
+
"@react-native-community/cli": "^9.0.0",
|
|
27
|
+
"@react-native-community/cli-platform-android": "^9.0.0",
|
|
28
|
+
"@react-native-community/cli-platform-ios": "^9.0.0",
|
|
29
|
+
"@react-native-windows/cli": "0.70.0",
|
|
30
|
+
"@react-native-windows/virtualized-list": "0.70.0",
|
|
31
31
|
"@react-native/assets": "1.0.0",
|
|
32
32
|
"@react-native/normalize-color": "2.0.0",
|
|
33
33
|
"@react-native/polyfills": "2.0.0",
|
|
@@ -35,25 +35,23 @@
|
|
|
35
35
|
"anser": "^1.4.9",
|
|
36
36
|
"base64-js": "^1.1.2",
|
|
37
37
|
"event-target-shim": "^5.0.1",
|
|
38
|
-
"hermes-engine": "~0.11.0",
|
|
39
38
|
"invariant": "^2.2.4",
|
|
40
39
|
"jsc-android": "^250230.2.1",
|
|
41
40
|
"memoize-one": "^5.0.0",
|
|
42
|
-
"metro-react-native-babel-transformer": "0.
|
|
43
|
-
"metro-runtime": "0.
|
|
44
|
-
"metro-source-map": "0.
|
|
41
|
+
"metro-react-native-babel-transformer": "0.72.1",
|
|
42
|
+
"metro-runtime": "0.72.1",
|
|
43
|
+
"metro-source-map": "0.72.1",
|
|
45
44
|
"mkdirp": "^0.5.1",
|
|
46
45
|
"nullthrows": "^1.1.1",
|
|
47
46
|
"pretty-format": "^26.5.2",
|
|
48
47
|
"promise": "^8.0.3",
|
|
49
48
|
"react-devtools-core": "4.24.0",
|
|
50
|
-
"react-native-codegen": "^0.
|
|
51
|
-
"react-native-gradle-plugin": "^0.
|
|
49
|
+
"react-native-codegen": "^0.70.4",
|
|
50
|
+
"react-native-gradle-plugin": "^0.70.2",
|
|
52
51
|
"react-refresh": "^0.4.0",
|
|
53
|
-
"react-shallow-renderer": "16.
|
|
52
|
+
"react-shallow-renderer": "^16.15.0",
|
|
54
53
|
"regenerator-runtime": "^0.13.2",
|
|
55
|
-
"scheduler": "^0.
|
|
56
|
-
"shelljs": "^0.8.5",
|
|
54
|
+
"scheduler": "^0.22.0",
|
|
57
55
|
"source-map-support": "^0.5.19",
|
|
58
56
|
"stacktrace-parser": "^0.1.3",
|
|
59
57
|
"use-sync-external-store": "^1.0.0",
|
|
@@ -61,9 +59,10 @@
|
|
|
61
59
|
"ws": "^6.1.4"
|
|
62
60
|
},
|
|
63
61
|
"devDependencies": {
|
|
64
|
-
"@react-native-windows/codegen": "0.
|
|
65
|
-
"@rnw-scripts/eslint-config": "1.1.
|
|
66
|
-
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.0.
|
|
62
|
+
"@react-native-windows/codegen": "0.70.0",
|
|
63
|
+
"@rnw-scripts/eslint-config": "1.1.13",
|
|
64
|
+
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.0.7",
|
|
65
|
+
"@rnw-scripts/just-task": "2.2.5",
|
|
67
66
|
"@rnw-scripts/metro-dev-config": "0.0.0",
|
|
68
67
|
"@rnx-kit/jest-preset": "^0.1.0",
|
|
69
68
|
"@types/node": "^14.14.22",
|
|
@@ -71,30 +70,30 @@
|
|
|
71
70
|
"@types/react-native": "^0.66.17",
|
|
72
71
|
"eslint": "^7.32.0",
|
|
73
72
|
"eslint-plugin-prettier": "^4.0.0",
|
|
74
|
-
"flow-bin": "^0.
|
|
73
|
+
"flow-bin": "^0.182.0",
|
|
75
74
|
"jscodeshift": "^0.13.1",
|
|
76
75
|
"just-scripts": "^1.3.3",
|
|
77
76
|
"metro-config": "^0.70.1",
|
|
78
77
|
"prettier": "^2.4.1",
|
|
79
|
-
"react": "18.
|
|
80
|
-
"react-native": "
|
|
81
|
-
"react-native-platform-override": "^1.6.
|
|
78
|
+
"react": "18.1.0",
|
|
79
|
+
"react-native": "0.70.0",
|
|
80
|
+
"react-native-platform-override": "^1.6.13",
|
|
82
81
|
"react-refresh": "^0.4.0",
|
|
83
82
|
"react-shallow-renderer": "16.14.1",
|
|
84
83
|
"typescript": "^4.4.4"
|
|
85
84
|
},
|
|
86
85
|
"peerDependencies": {
|
|
87
|
-
"react": "18.
|
|
88
|
-
"react-native": "^0.
|
|
86
|
+
"react": "18.1.0",
|
|
87
|
+
"react-native": "^0.70.0"
|
|
89
88
|
},
|
|
90
89
|
"beachball": {
|
|
91
90
|
"defaultNpmTag": "latest",
|
|
92
|
-
"gitTags": true,
|
|
93
91
|
"disallowedChangeTypes": [
|
|
94
92
|
"major",
|
|
95
93
|
"minor",
|
|
96
94
|
"prerelease"
|
|
97
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"gitTags": true
|
|
98
97
|
},
|
|
99
98
|
"files": [
|
|
100
99
|
"/codegen",
|
package/rntypes/index.d.ts
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
// David Sheldrick <https://github.com/ds300>
|
|
35
35
|
// Natsathorn Yuthakovit <https://github.com/natsathorn>
|
|
36
36
|
// ConnectDotz <https://github.com/connectdotz>
|
|
37
|
-
// Marcel Lasaj <https://github.com/TheWirv>
|
|
38
37
|
// Alexey Molchan <https://github.com/alexeymolchan>
|
|
39
38
|
// Alex Brazier <https://github.com/alexbrazier>
|
|
40
39
|
// Arafat Zahan <https://github.com/kuasha420>
|
|
File without changes
|
|
@@ -1,2 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Metro configuration for React Native
|
|
3
|
+
* https://github.com/facebook/react-native
|
|
4
|
+
*
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const exclusionList = require('metro-config/src/defaults/exclusionList');
|
|
10
|
+
|
|
11
|
+
const rnwPath = fs.realpathSync(
|
|
12
|
+
path.resolve(require.resolve('react-native-windows/package.json'), '..'),
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
// [devMode
|
|
16
|
+
const rnwRootNodeModules = path.resolve(rnwPath, '..', 'node_modules');
|
|
17
|
+
const rnwPackages = path.resolve(rnwPath, '..', 'packages');
|
|
18
|
+
// devMode]
|
|
19
|
+
|
|
20
|
+
module.exports = {
|
|
21
|
+
// [devMode
|
|
22
|
+
watchFolders: [rnwPath, rnwRootNodeModules, rnwPackages],
|
|
23
|
+
// devMode]
|
|
24
|
+
resolver: {
|
|
25
|
+
blockList: exclusionList([
|
|
26
|
+
// This stops "react-native run-windows" from causing the metro server to crash if its already running
|
|
27
|
+
new RegExp(
|
|
28
|
+
`${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
|
|
29
|
+
),
|
|
30
|
+
// This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
|
|
31
|
+
new RegExp(`${rnwPath}/build/.*`),
|
|
32
|
+
new RegExp(`${rnwPath}/target/.*`),
|
|
33
|
+
/.*\.ProjectImports\.zip/,
|
|
34
|
+
]),
|
|
35
|
+
// [devMode
|
|
36
|
+
extraNodeModules: {
|
|
37
|
+
'react-native-windows': rnwPath,
|
|
38
|
+
},
|
|
39
|
+
// devMode]
|
|
40
|
+
},
|
|
41
|
+
transformer: {
|
|
42
|
+
getTransformOptions: async () => ({
|
|
43
|
+
transform: {
|
|
44
|
+
experimentalImportSupport: false,
|
|
45
|
+
inlineRequires: true,
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
};
|
|
File without changes
|
|
File without changes
|