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.
Files changed (305) hide show
  1. package/.flowconfig +5 -1
  2. package/Chakra/ChakraHelpers.cpp +1 -1
  3. package/Chakra/ChakraPlatform.cpp +1 -1
  4. package/Chakra/ChakraValue.cpp +6 -3
  5. package/Chakra/ChakraValue.h +1 -1
  6. package/Directory.Build.props +7 -7
  7. package/Folly/Folly.vcxproj +20 -13
  8. package/Folly/cgmanifest.json +14 -0
  9. package/Libraries/Alert/Alert.js +18 -4
  10. package/Libraries/Alert/Alert.windows.js +4 -0
  11. package/Libraries/Alert/NativeAlertManager.js +1 -0
  12. package/Libraries/Animated/Animated.js +2 -2
  13. package/Libraries/Animated/AnimatedEvent.js +7 -4
  14. package/Libraries/Animated/AnimatedImplementation.js +17 -3
  15. package/Libraries/Animated/AnimatedMock.js +7 -2
  16. package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
  17. package/Libraries/Animated/NativeAnimatedModule.js +3 -0
  18. package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
  19. package/Libraries/Animated/animations/SpringAnimation.js +3 -3
  20. package/Libraries/Animated/animations/TimingAnimation.js +3 -3
  21. package/Libraries/Animated/createAnimatedComponent.js +8 -1
  22. package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
  23. package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
  24. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
  25. package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
  26. package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
  27. package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
  28. package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
  29. package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
  30. package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
  31. package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
  32. package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
  33. package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
  34. package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
  35. package/Libraries/Animated/useAnimatedProps.js +1 -0
  36. package/Libraries/AppState/AppState.js +0 -32
  37. package/Libraries/AppTheme/AppTheme.js +14 -8
  38. package/Libraries/AppTheme/AppThemeTypes.d.ts +0 -3
  39. package/Libraries/BatchedBridge/MessageQueue.js +21 -15
  40. package/Libraries/BatchedBridge/NativeModules.js +3 -4
  41. package/Libraries/Blob/FileReader.js +0 -6
  42. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
  43. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +0 -20
  44. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
  45. package/Libraries/Components/Keyboard/Keyboard.js +0 -11
  46. package/Libraries/Components/Pressable/Pressable.js +2 -0
  47. package/Libraries/Components/Pressable/Pressable.windows.js +2 -0
  48. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
  49. package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
  50. package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +4 -30
  51. package/Libraries/Components/ScrollView/ScrollView.js +13 -11
  52. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
  53. package/Libraries/Components/StatusBar/StatusBar.js +10 -7
  54. package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
  55. package/Libraries/Components/TextInput/TextInput.js +12 -2
  56. package/Libraries/Components/TextInput/TextInput.windows.js +12 -2
  57. package/Libraries/Components/Touchable/PooledClass.js +16 -4
  58. package/Libraries/Components/Touchable/Touchable.js +50 -1
  59. package/Libraries/Components/Touchable/Touchable.windows.js +972 -0
  60. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
  61. package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
  62. package/Libraries/Components/View/ViewPropTypes.js +3 -8
  63. package/Libraries/Components/View/ViewPropTypes.windows.js +3 -8
  64. package/Libraries/Core/ExceptionsManager.js +2 -0
  65. package/Libraries/Core/ReactNativeVersion.js +1 -1
  66. package/Libraries/Core/Timers/JSTimers.js +2 -2
  67. package/Libraries/Core/polyfillPromise.js +0 -32
  68. package/Libraries/Core/setUpBatchedBridge.js +5 -1
  69. package/Libraries/Core/setUpPerformance.js +1 -1
  70. package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
  71. package/Libraries/Image/AssetSourceResolver.js +2 -2
  72. package/Libraries/Image/Image.android.js +5 -3
  73. package/Libraries/Image/Image.ios.js +6 -3
  74. package/Libraries/Image/Image.windows.js +6 -3
  75. package/Libraries/Image/ImageSource.js +7 -5
  76. package/Libraries/Inspector/ElementBox.js +2 -2
  77. package/Libraries/Inspector/NetworkOverlay.js +13 -8
  78. package/Libraries/Interaction/PanResponder.js +16 -14
  79. package/Libraries/Linking/Linking.js +0 -11
  80. package/Libraries/Lists/FlatList.js +3 -2
  81. package/Libraries/Lists/SectionList.js +2 -0
  82. package/Libraries/Lists/ViewabilityHelper.js +7 -3
  83. package/Libraries/Lists/VirtualizeUtils.js +33 -20
  84. package/Libraries/Lists/VirtualizedList.js +93 -47
  85. package/Libraries/Lists/VirtualizedListContext.js +1 -0
  86. package/Libraries/Lists/VirtualizedSectionList.js +14 -9
  87. package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
  88. package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
  89. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  90. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  91. package/Libraries/LogBox/LogBox.js +3 -1
  92. package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
  93. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
  94. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
  95. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
  96. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
  97. package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
  98. package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -12
  99. package/Libraries/Network/XMLHttpRequest.js +9 -11
  100. package/Libraries/Performance/PureComponentDebug.js +1 -0
  101. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
  102. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
  103. package/Libraries/Pressability/Pressability.js +26 -16
  104. package/Libraries/Pressability/Pressability.windows.js +30 -17
  105. package/Libraries/Promise.js +0 -1
  106. package/Libraries/ReactNative/AppRegistry.js +16 -13
  107. package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
  108. package/Libraries/ReactNative/PaperUIManager.js +9 -9
  109. package/Libraries/ReactNative/PaperUIManager.windows.js +7 -8
  110. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
  111. package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
  112. package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
  113. package/Libraries/ReactNative/renderApplication.js +1 -1
  114. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
  115. package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
  116. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
  117. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
  118. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
  119. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
  120. package/Libraries/Storage/AsyncStorage.js +7 -1
  121. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
  122. package/Libraries/StyleSheet/flattenStyle.js +1 -1
  123. package/Libraries/StyleSheet/processTransform.js +2 -0
  124. package/Libraries/StyleSheet/processTransform.windows.js +2 -0
  125. package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
  126. package/Libraries/Text/Text.js +15 -7
  127. package/Libraries/Text/Text.windows.js +14 -7
  128. package/Libraries/Types/CoreEventTypes.js +137 -11
  129. package/Libraries/Types/CoreEventTypes.windows.js +147 -22
  130. package/Libraries/Utilities/Dimensions.js +0 -13
  131. package/Libraries/Utilities/HMRClient.js +3 -3
  132. package/Libraries/Utilities/Platform.ios.js +0 -7
  133. package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
  134. package/Libraries/Utilities/codegenNativeCommands.js +11 -2
  135. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
  136. package/Libraries/Utilities/stringifySafe.js +3 -1
  137. package/Libraries/Utilities/truncate.js +1 -1
  138. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
  139. package/Libraries/Vibration/Vibration.js +1 -1
  140. package/Libraries/WebSocket/WebSocket.js +1 -0
  141. package/Libraries/vendor/emitter/EventEmitter.js +105 -12
  142. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
  143. package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +24 -12
  144. package/Microsoft.ReactNative/CoreApp.cpp +303 -0
  145. package/Microsoft.ReactNative/CoreAppPage.cpp +21 -0
  146. package/Microsoft.ReactNative/CoreAppPage.h +15 -0
  147. package/Microsoft.ReactNative/CoreAppPage.idl +12 -0
  148. package/Microsoft.ReactNative/CoreAppPage.xaml +14 -0
  149. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.cpp +1 -2
  150. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.h +1 -1
  151. package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
  152. package/Microsoft.ReactNative/Fabric/ImageComponentView.cpp +1 -1
  153. package/Microsoft.ReactNative/Fabric/ImageComponentView.h +1 -1
  154. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.cpp +1 -1
  155. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.h +1 -1
  156. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.cpp +1 -1
  157. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.h +1 -1
  158. package/Microsoft.ReactNative/Fabric/SliderComponentView.cpp +1 -1
  159. package/Microsoft.ReactNative/Fabric/SliderComponentView.h +1 -1
  160. package/Microsoft.ReactNative/Fabric/SwitchComponentView.cpp +1 -1
  161. package/Microsoft.ReactNative/Fabric/SwitchComponentView.h +1 -1
  162. package/Microsoft.ReactNative/Fabric/TextComponentView.cpp +1 -1
  163. package/Microsoft.ReactNative/Fabric/TextComponentView.h +1 -1
  164. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.cpp +1 -1
  165. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.h +1 -1
  166. package/Microsoft.ReactNative/Fabric/ViewComponentView.cpp +1 -1
  167. package/Microsoft.ReactNative/Fabric/ViewComponentView.h +1 -1
  168. package/Microsoft.ReactNative/GlyphViewManager.cpp +1 -0
  169. package/Microsoft.ReactNative/IReactDispatcher.cpp +18 -0
  170. package/Microsoft.ReactNative/IReactDispatcher.h +18 -3
  171. package/Microsoft.ReactNative/IReactDispatcher.idl +15 -0
  172. package/Microsoft.ReactNative/IReactPropertyBag.cpp +9 -0
  173. package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
  174. package/Microsoft.ReactNative/IReactPropertyBag.idl +3 -0
  175. package/Microsoft.ReactNative/JSDispatcherWriter.cpp +60 -22
  176. package/Microsoft.ReactNative/JSDispatcherWriter.h +5 -3
  177. package/Microsoft.ReactNative/JsiApi.cpp +41 -1
  178. package/Microsoft.ReactNative/JsiApi.h +3 -0
  179. package/Microsoft.ReactNative/JsiApi.idl +19 -1
  180. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +18 -2
  181. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +7 -7
  182. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +1 -1
  183. package/Microsoft.ReactNative/Modules/AlertModule.cpp +15 -12
  184. package/Microsoft.ReactNative/Modules/AlertModule.h +1 -1
  185. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +45 -9
  186. package/Microsoft.ReactNative/Modules/AppStateModule.h +9 -3
  187. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +1 -1
  188. package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
  189. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  190. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +1 -1
  191. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +1 -1
  192. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
  193. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +1 -1
  194. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  195. package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -1
  196. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +66 -39
  197. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +41 -11
  198. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +1 -1
  199. package/Microsoft.ReactNative/QuirkSettings.cpp +22 -0
  200. package/Microsoft.ReactNative/QuirkSettings.h +10 -0
  201. package/Microsoft.ReactNative/QuirkSettings.idl +7 -0
  202. package/Microsoft.ReactNative/ReactApplication.cpp +44 -0
  203. package/Microsoft.ReactNative/ReactApplication.h +40 -5
  204. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +5 -2
  205. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +1 -0
  206. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +24 -4
  207. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
  208. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +12 -2
  209. package/Microsoft.ReactNative/TurboModulesProvider.cpp +146 -84
  210. package/Microsoft.ReactNative/TurboModulesProvider.h +5 -0
  211. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +1 -0
  212. package/Microsoft.ReactNative/Utils/Helpers.cpp +1 -1
  213. package/Microsoft.ReactNative/Utils/Helpers.h +1 -1
  214. package/Microsoft.ReactNative/Utils/PropertyUtils.h +1 -1
  215. package/Microsoft.ReactNative/Utils/TransformableText.h +1 -1
  216. package/Microsoft.ReactNative/Utils/ValueUtils.cpp +0 -1
  217. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +9 -7
  218. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +3 -3
  219. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +13 -1
  220. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +1 -1
  221. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +63 -13
  222. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +1 -1
  223. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +5 -6
  224. package/Microsoft.ReactNative/Views/Image/ReactImage.h +4 -4
  225. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +1 -1
  226. package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +21 -2
  227. package/Microsoft.ReactNative/Views/TextViewManager.cpp +6 -3
  228. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +1 -1
  229. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +7 -1
  230. package/Microsoft.ReactNative/Views/ViewPanel.cpp +4 -0
  231. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +8 -3
  232. package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +2 -0
  233. package/Microsoft.ReactNative/microsoft.reactnative.def +4 -1
  234. package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
  235. package/Microsoft.ReactNative.Cxx/CoreApp.h +60 -0
  236. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +65 -0
  237. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +13 -0
  238. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
  239. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
  240. package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
  241. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +14 -2
  242. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +4 -0
  243. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +10 -0
  244. package/Microsoft.ReactNative.Managed/packages.lock.json +1 -24
  245. package/Mso/dispatchQueue/dispatchQueue.h +12 -4
  246. package/Mso/src/dispatchQueue/looperScheduler.cpp +36 -9
  247. package/Mso/src/dispatchQueue/queueService.cpp +2 -2
  248. package/Mso/src/dispatchQueue/queueService.h +2 -2
  249. package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +6 -1
  250. package/Mso/src/memoryApi/memoryApi.cpp +3 -0
  251. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  252. package/PropertySheets/JSEngine.props +1 -1
  253. package/PropertySheets/Release.props +6 -0
  254. package/ReactCommon/ReactCommon.vcxproj +11 -21
  255. package/ReactCommon/ReactCommon.vcxproj.filters +64 -46
  256. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h +145 -0
  257. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +344 -0
  258. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseTextProps.cpp +313 -0
  259. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.cpp +455 -0
  260. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ConcreteComponentDescriptor.h +216 -0
  261. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/PropsMacros.h +91 -0
  262. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/RectangleEdges.h +100 -0
  263. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/CompactValue.h +3 -1
  264. package/Scripts/Microsoft.ReactNative.nuspec +6 -0
  265. package/Scripts/Microsoft.ReactNative.targets +7 -0
  266. package/Shared/DevSettings.h +4 -0
  267. package/Shared/InstanceManager.cpp +29 -0
  268. package/Shared/InstanceManager.h +14 -0
  269. package/Shared/JSI/ChakraRuntime.cpp +11 -2
  270. package/Shared/JSI/ChakraRuntime.h +2 -0
  271. package/Shared/Modules/BlobModule.cpp +4 -4
  272. package/Shared/Modules/BlobModule.h +1 -1
  273. package/Shared/Modules/FileReaderModule.cpp +3 -2
  274. package/Shared/Modules/IBlobPersistor.h +1 -1
  275. package/Shared/Networking/IHttpResource.h +1 -0
  276. package/Shared/Networking/OriginPolicyHttpFilter.cpp +16 -10
  277. package/Shared/Networking/WinRTHttpResource.cpp +34 -2
  278. package/Shared/OInstance.cpp +29 -6
  279. package/Shared/OInstance.h +4 -13
  280. package/Shared/Threading/BatchingQueueThread.cpp +23 -12
  281. package/Shared/Utils.cpp +2 -5
  282. package/codegen/NativeAlertManagerSpec.g.h +2 -0
  283. package/codegen/NativeAnimatedModuleSpec.g.h +6 -0
  284. package/codegen/NativeAnimatedTurboModuleSpec.g.h +6 -0
  285. package/codegen/react/components/rnwcore/Props.cpp +2 -2
  286. package/codegen/react/components/rnwcore/Props.h +1 -1
  287. package/fmt/cgmanifest.json +14 -0
  288. package/fmt/fmt.vcxproj +25 -11
  289. package/jest/assetFileTransformer.js +3 -2
  290. package/jest/setup.js +4 -0
  291. package/package.json +25 -26
  292. package/rntypes/index.d.ts +0 -1
  293. package/template/cs-app-WinAppSDK/proj/{NuGet.Config → NuGet_Config} +0 -0
  294. package/template/metro.devMode.config.js +49 -2
  295. package/template/shared-app/proj/{NuGet.Config → NuGet_Config} +0 -0
  296. package/template/shared-lib/proj/{NuGet.Config → NuGet_Config} +0 -0
  297. package/Libraries/vendor/emitter/EventSubscription.js +0 -19
  298. package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
  299. package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
  300. package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
  301. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
  302. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +0 -87
  303. package/Scripts/copyRNLibraries.js +0 -99
  304. package/jest/preprocessor.js +0 -40
  305. package/jest/preprocessor_DO_NOT_USE.js +0 -122
@@ -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(*runtimeHolder_->getRuntime(), std::function(binding));
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::path(m_devSettings->bundleRootPath) / jsBundleRelativePath).string();
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::path(m_devSettings->bundleRootPath) / (jsBundleRelativePath + ".bundle")).string();
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
- // #10036 - Blob module not supported in UWP. Need to define property bag lifetime and onwership.
623
- if (Microsoft::React::GetRuntimeOptionBool("Blob.EnableModule")) {
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
  }
@@ -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::unique_ptr<InstanceCallback> &&callback,
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
- m_callInvoker->invokeAsync([wkInstance, this] {
73
- if (auto instance = wkInstance.lock()) {
74
- std::scoped_lock lckQuitting(m_mutexQuitting);
75
-
76
- // If we are shutting down, then then the mutex is being held in quitSynchronous
77
- // Which is waiting for this task to complete, so we cannot take the mutex if quitSynchronous
78
- // is running. -- and since we are shutting down anyway, we can just skip this work.
79
- if (!m_quitting) {
80
- std::scoped_lock lck(m_mutex);
81
- m_callInvoker = instance->getDecoratedNativeCallInvoker(m_callInvoker);
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
- uint32_t length{0};
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
- emulateUnlessSupported(convertRawProp(context, rawProps, "emulateUnlessSupported", sourceProps.emulateUnlessSupported, {false}))
131
+
132
132
  {}
133
133
  AndroidHorizontalScrollContentViewProps::AndroidHorizontalScrollContentViewProps(
134
134
  const PropsParserContext &context,
@@ -465,7 +465,7 @@ class SafeAreaViewProps final : public ViewProps {
465
465
 
466
466
  #pragma mark - Props
467
467
 
468
- bool emulateUnlessSupported{false};
468
+
469
469
  };
470
470
 
471
471
  class AndroidHorizontalScrollContentViewProps final : public ViewProps {
@@ -0,0 +1,14 @@
1
+ {
2
+ "Registrations": [
3
+ {
4
+ "Component": {
5
+ "Type": "git",
6
+ "Git": {
7
+ "RepositoryUrl": "https://github.com/fmtlib/fmt",
8
+ "CommitHash": "9e8b86fd2d9806672cc73133d21780dd182bfd24"
9
+ }
10
+ },
11
+ "DevelopmentDependency": false
12
+ }
13
+ ]
14
+ }
package/fmt/fmt.vcxproj CHANGED
@@ -96,16 +96,28 @@
96
96
  </Link>
97
97
  </ItemDefinitionGroup>
98
98
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
99
- <Target Name="DownloadFmt" BeforeTargets="PrepareForBuild">
100
- <Message Importance="High" Text="Downloading fmt..." Condition="!Exists('$(FmtDir)..\.fmtzip\fmt-$(FmtVersion).zip')" />
101
- <DownloadFile Condition="!Exists('$(FmtDir)..\.fmtzip\fmt-$(FmtVersion).zip')" SourceUrl="https://github.com/fmtlib/fmt/archive/refs/tags/$(FmtVersion).zip" DestinationFileName="fmt-$(FmtVersion).zip" DestinationFolder="$(FmtDir)..\.fmtzip" Retries="10" />
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)..))." Condition="!Exists('$(FmtDir)src\format.cc')" />
105
- <Unzip Condition="!Exists('$(FmtDir)')" SourceFiles="$(FmtDir)..\.fmtzip\fmt-$(FmtVersion).zip" DestinationFolder="$([MSBuild]::NormalizePath($(FmtDir)..))" OverwriteReadOnlyFiles="true" />
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="UnzipFmt">
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
- File="$([MSBuild]::NormalizePath($(FmtDir)..))\cgmanifest.json"
127
- Overwrite="true"
128
- Lines="$(CGManifestText)" />
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.69.6",
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": "^8.0.0",
27
- "@react-native-community/cli-platform-android": "^8.0.0",
28
- "@react-native-community/cli-platform-ios": "^8.0.0",
29
- "@react-native-windows/cli": "0.69.2",
30
- "@react-native-windows/virtualized-list": "0.69.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.70.3",
43
- "metro-runtime": "0.70.3",
44
- "metro-source-map": "0.70.3",
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.69.1",
51
- "react-native-gradle-plugin": "^0.0.7",
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.14.1",
52
+ "react-shallow-renderer": "^16.15.0",
54
53
  "regenerator-runtime": "^0.13.2",
55
- "scheduler": "^0.21.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.69.0",
65
- "@rnw-scripts/eslint-config": "1.1.12",
66
- "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.0.6",
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.176.3",
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.0.0",
80
- "react-native": "^0.69.0",
81
- "react-native-platform-override": "^1.6.11",
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.0.0",
88
- "react-native": "^0.69.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",
@@ -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>
@@ -1,2 +1,49 @@
1
- const {makeMetroConfig} = require('@rnw-scripts/metro-dev-config');
2
- module.exports = makeMetroConfig();
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
+ };