react-native-windows 0.85.0 → 0.85.2

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.
@@ -1796,7 +1796,7 @@ struct CompActivityVisual : winrt::implements<
1796
1796
  auto innerBrush = TTypeRedirects::CompositionContextHelper::InnerBrush(brush);
1797
1797
  if (brush) {
1798
1798
  _themeProperties.InsertVector4(
1799
- L"Foreground", ColorAsVector4(innerBrush.as<TTypeRedirects::CompositionColorBrush>().Color()));
1799
+ L"Foreground", ColorAsVector4(innerBrush.template as<TTypeRedirects::CompositionColorBrush>().Color()));
1800
1800
  } else {
1801
1801
  _themeProperties.InsertVector4(L"Foreground", ColorAsVector4({0, 0, 0, 0}));
1802
1802
  }
@@ -95,10 +95,12 @@ struct ModalHostView : public winrt::implements<ModalHostView, winrt::Windows::F
95
95
  const winrt::Microsoft::ReactNative::Composition::PortalComponentView &portalComponentView) noexcept {
96
96
  m_reactContext = portalComponentView.ReactContext();
97
97
 
98
- portalComponentView.Mounted(
99
- [](const auto & /*sender*/, const auto &view) { view.UserData().as<ModalHostView>()->OnMounted(view); });
100
- portalComponentView.Unmounted(
101
- [](const auto & /*sender*/, const auto &view) { view.UserData().as<ModalHostView>()->OnUnmounted(view); });
98
+ portalComponentView.Mounted([](const auto & /*sender*/, const auto &view) {
99
+ view.UserData().template as<ModalHostView>()->OnMounted(view);
100
+ });
101
+ portalComponentView.Unmounted([](const auto & /*sender*/, const auto &view) {
102
+ view.UserData().template as<ModalHostView>()->OnUnmounted(view);
103
+ });
102
104
  }
103
105
 
104
106
  void UpdateProps(
@@ -83,7 +83,7 @@ static PCreateTextServices g_pfnCreateTextServices;
83
83
  HRESULT HrEnsureRichEd20Loaded() noexcept {
84
84
  HRESULT hr = S_OK;
85
85
  std::call_once(g_richEditLoadedFlag, [&hr]() {
86
- g_hInstRichEdit = LoadLibrary(L"Msftedit.dll");
86
+ g_hInstRichEdit = LoadLibraryExW(L"Msftedit.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);
87
87
  if (!g_hInstRichEdit) {
88
88
  hr = E_FAIL;
89
89
  return;
@@ -97,7 +97,6 @@
97
97
  <ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
98
98
  <WarningLevel>Level4</WarningLevel>
99
99
  <AdditionalOptions>%(AdditionalOptions) /bigobj /ZH:SHA_256</AdditionalOptions>
100
- <AdditionalOptions Condition="$(PlatformToolsetVersion)&lt;145">%(AdditionalOptions) /await</AdditionalOptions>
101
100
  <AdditionalIncludeDirectories>
102
101
  $(ExternalDir)fmt\include;
103
102
  $(ReactNativeWindowsDir)Microsoft.ReactNative;
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.85.0</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.85.2</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>85</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>2</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>0e2b495c27e04e4dacfcb02765d80cf61daef23b</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>fa2687b8e273be2ed4dfa9f5a92a12ab247c77a6</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -17,7 +17,7 @@
17
17
  <EnableDevServerHBCBundles Condition="'$(EnableDevServerHBCBundles)' == ''">false</EnableDevServerHBCBundles>
18
18
 
19
19
  <UseV8 Condition="'$(UseV8)' == ''">false</UseV8>
20
- <V8Version Condition="'$(V8Version)' == ''">0.71.8</V8Version>
20
+ <V8Version Condition="'$(V8Version)' == ''">0.79.5</V8Version>
21
21
  <V8PackageName>ReactNative.V8Jsi.Windows</V8PackageName>
22
22
  <V8PackageName Condition="'$(V8AppPlatform)' != 'win32'">$(V8PackageName).UWP</V8PackageName>
23
23
  <V8Package>$(NuGetPackageRoot)\$(V8PackageName).$(V8Version)</V8Package>
@@ -137,7 +137,6 @@
137
137
  <RuntimeTypeInfo>true</RuntimeTypeInfo>
138
138
  <ShowIncludes Condition="'$(ShowIncludes)'=='true'">true</ShowIncludes>
139
139
  <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
140
- <AdditionalOptions Condition="$(PlatformToolsetVersion)&lt;145">%(AdditionalOptions) /await</AdditionalOptions>
141
140
  <ControlFlowGuard>Guard</ControlFlowGuard>
142
141
  <SpectreMitigation>Spectre</SpectreMitigation>
143
142
 
@@ -4,7 +4,8 @@
4
4
 
5
5
  <!--
6
6
  Internal versions are typically only located at: https://microsoft.visualstudio.com/DefaultCollection/ProjectReunion/_artifacts/feed/Project.Reunion.nuget.internal/NuGet/Microsoft.WindowsAppSDK/versions
7
- For local testing of internal versions, modify WinUI3ExperimentalVersion, and comment out the additional nuget source in NuGet.Config
7
+ For local testing of internal versions, set WinUI3ExperimentalVersion and run
8
+ vnext\Scripts\EnableInternalWinAppSDKFeed.ps1 to add the internal source and its package mapping.
8
9
  When this version is updated, be sure to update the default for the enableInternalFeed parameter of /.ado/templates/enable-experimental-winui3.yml
9
10
  -->
10
11
  <WinUI3ExperimentalVersion Condition="'$(WinUI3ExperimentalVersion)'==''">2.0.0-experimental3</WinUI3ExperimentalVersion>
@@ -9,11 +9,18 @@ Set-Location -Path $RepoRoot
9
9
  try
10
10
  {
11
11
  [xml] $nugetConfig = Get-Content "NuGet.Config"
12
- $newFeed = $nugetConfig.configuration.packageSources.add.clone()
13
- $newFeed.key = "Project.Reunion.nuget.internal";
14
- $newFeed.value = "https://microsoft.pkgs.visualstudio.com/ProjectReunion/_packaging/Project.Reunion.nuget.internal/nuget/v3/index.json";
15
- $nugetConfig.configuration.packageSources.AppendChild($newFeed)
16
- $nugetConfig.Save("NuGet.Config")
12
+ $feedKey = "Project.Reunion.nuget.internal"
13
+ $newFeed = $nugetConfig.CreateElement("add")
14
+ $newFeed.SetAttribute("key", $feedKey)
15
+ $newFeed.SetAttribute("value", "https://microsoft.pkgs.visualstudio.com/ProjectReunion/_packaging/Project.Reunion.nuget.internal/nuget/v3/index.json")
16
+ [void] $nugetConfig.configuration.packageSources.AppendChild($newFeed)
17
+ $mapping = $nugetConfig.CreateElement("packageSource")
18
+ $mapping.SetAttribute("key", $feedKey)
19
+ $pattern = $nugetConfig.CreateElement("package")
20
+ $pattern.SetAttribute("pattern", "*")
21
+ [void] $mapping.AppendChild($pattern)
22
+ [void] $nugetConfig.configuration.packageSourceMapping.AppendChild($mapping)
23
+ $nugetConfig.Save("$RepoRoot\NuGet.Config")
17
24
  }
18
25
  finally
19
26
  {
@@ -19,8 +19,8 @@ function Restore-Solution([string] $solution, [string[]] $extraArgs) {
19
19
 
20
20
  try {
21
21
  # Some node_modules packages ship a NuGet.Config that re-adds the public nuget.org feed. That
22
- # breaks the repo's single-ADO-feed compliance and trips corporate network blocks on api.nuget.org.
23
- # Strip any nuget.org source so restore only uses the repo's ADO feed.
22
+ # bypasses the approved source policy and trips corporate network blocks on api.nuget.org.
23
+ # Strip any nuget.org source so restore uses the approved sources and mappings in the root NuGet.Config.
24
24
  Get-ChildItem -File -Recurse -Path $RepoRoot -Filter NuGet.Config -ErrorAction SilentlyContinue |
25
25
  Where-Object { $_.FullName -match '\\node_modules\\' } | ForEach-Object {
26
26
  $configPath = $_.FullName
@@ -7,6 +7,7 @@
7
7
  #include <eventWaitHandle/eventWaitHandle.h>
8
8
  #include <winrt/Windows.Networking.Sockets.h>
9
9
  #include <winrt/Windows.Storage.Streams.h>
10
+ #include <coroutine>
10
11
  #include "IWebSocketResource.h"
11
12
 
12
13
  namespace Microsoft::React::Networking {
@@ -21,12 +22,7 @@ class WinRTWebSocketResource : public IWebSocketResource, public std::enable_sha
21
22
  void operator=(const TaskSequencer &) = delete;
22
23
 
23
24
  private:
24
- // `experimental` is deprecated starting Visual Studio 2026
25
- #if _MSC_VER >= 1951
26
25
  using CoroHandle = std::coroutine_handle<>;
27
- #else
28
- using CoroHandle = std::experimental::coroutine_handle<>;
29
- #endif
30
26
  struct Suspender {
31
27
  CoroHandle m_handle;
32
28
 
@@ -8,6 +8,7 @@
8
8
  #include <folly/Bits.h>
9
9
  #include <folly/json.h>
10
10
  #include <jsi/jsi.h>
11
+ #include <cstring>
11
12
  #include <filesystem>
12
13
  #include "Unicode.h"
13
14
 
@@ -80,15 +81,13 @@ namespace Microsoft::ReactNative {
80
81
  bool isHBCBundle(const std::string &bundle) {
81
82
  static uint32_t constexpr HBCBundleMagicNumber = 0xffe7c3c3;
82
83
 
83
- // Note:: Directly access the pointer to avoid copy/length-check. It matters as this string contains the bundle which
84
- // can be potentially huge.
85
- // https://herbsutter.com/2008/04/07/cringe-not-vectors-are-guaranteed-to-be-contiguous/#comment-483
86
- auto header = reinterpret_cast<const facebook::react::BundleHeader *>(&bundle[0]);
87
- if (HBCBundleMagicNumber == header->magic32.value) {
88
- return true;
89
- } else {
84
+ // Only the leading magic number is needed; copy just those bytes rather than the whole (potentially huge) bundle.
85
+ uint32_t magic = 0;
86
+ if (bundle.size() < sizeof(magic)) {
90
87
  return false;
91
88
  }
89
+ std::memcpy(&magic, bundle.data(), sizeof(magic));
90
+ return magic == HBCBundleMagicNumber;
92
91
  }
93
92
 
94
93
  void LoadRemoteUrlScript(
@@ -139,7 +138,12 @@ void LoadRemoteUrlScript(
139
138
  // This code is based on the HBC Bundle integration on Android
140
139
  // Ref:
141
140
  // https://github.com/facebook/react-native/blob/24d91268b64c7abbd4b26547ffcc663dc90ec5e7/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp#L231
142
- if (isHBCBundle(jsBundleString)) {
141
+ // Bytecode bundles are only requested from the dev server when ENABLE_DEVSERVER_HBCBUNDLES is defined.
142
+ bool isBytecodeBundle = false;
143
+ #if defined(ENABLE_DEVSERVER_HBCBUNDLES)
144
+ isBytecodeBundle = isHBCBundle(jsBundleString);
145
+ #endif
146
+ if (isBytecodeBundle) {
143
147
  auto script = std::make_unique<facebook::react::JSBigStdString>(jsBundleString, false);
144
148
  const char *buffer = script->c_str();
145
149
  uint32_t bufferLength = (uint32_t)script->size();
@@ -153,6 +153,16 @@
153
153
  <AdditionalIncludeDirectories>$(ReactNativeWindowsDir)Folly;$(ReactNativeWindowsDir)stubs;$(ExternalDir)folly;$(ExternalDir)fast-float\include;$(ExternalDir)fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
154
154
  </ClCompile>
155
155
  </ItemGroup>
156
+ <!-- Work around MSVC v145 ARM64 optimizer C1001 in AtForkListSingleton::init.
157
+ Disable PCH use so its Release optimization settings cannot override /Od.
158
+ Keep the forced pch.h include as an ordinary header. Remove when the compiler is fixed. -->
159
+ <ItemGroup>
160
+ <ClCompile Update="$(ExternalDir)folly\folly\system\AtFork.cpp" Condition="'$(Platform)' == 'ARM64' And '$(PlatformToolsetVersion)' != '' And $(PlatformToolsetVersion)&gt;=145">
161
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
162
+ <Optimization>Disabled</Optimization>
163
+ <WholeProgramOptimization>false</WholeProgramOptimization>
164
+ </ClCompile>
165
+ </ItemGroup>
156
166
  <!-- SysMman.cpp is Desktop-only and must not use folly's UWP pch; re-assert no-PCH after
157
167
  the blanket Update above, which would otherwise force pch.h onto it. -->
158
168
  <ItemGroup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.85.0",
3
+ "version": "0.85.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@react-native-community/cli": "20.0.0",
27
27
  "@react-native-community/cli-platform-android": "20.0.0",
28
28
  "@react-native-community/cli-platform-ios": "20.0.0",
29
- "@react-native-windows/cli": "0.85.0",
29
+ "@react-native-windows/cli": "0.85.1",
30
30
  "@react-native/assets": "1.0.0",
31
31
  "@react-native/assets-registry": "0.85.3",
32
32
  "@react-native/codegen": "0.85.3",
@@ -73,8 +73,8 @@
73
73
  "devDependencies": {
74
74
  "@babel/core": "^7.25.2",
75
75
  "@babel/preset-env": "^7.25.3",
76
- "@react-native-windows/codegen": "0.85.0",
77
- "@react-native-windows/find-dotnet-tools": "0.85.0",
76
+ "@react-native-windows/codegen": "0.85.1",
77
+ "@react-native-windows/find-dotnet-tools": "0.85.1",
78
78
  "@react-native/metro-config": "0.85.3",
79
79
  "@rnw-scripts/babel-react-native-config": "0.0.0",
80
80
  "@rnw-scripts/eslint-config": "1.2.38",
@@ -91,7 +91,7 @@
91
91
  "prettier": "^3.6.2",
92
92
  "react": "19.2.3",
93
93
  "react-native": "0.85.3",
94
- "react-native-platform-override": "0.85.0",
94
+ "react-native-platform-override": "0.85.2",
95
95
  "react-refresh": "^0.14.0",
96
96
  "typescript": "5.0.4"
97
97
  },