react-native-windows 0.70.2 → 0.70.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Components/View/View.windows.js +6 -1
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -7
- package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +2 -0
- package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.h +3 -3
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +2 -1
- package/PropertySheets/External/Microsoft.ReactNative.Cpp.ProjectReferences.props +3 -0
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/PropertySheets/JSEngine.props +1 -2
- package/Shared/JSI/NapiJsiV8RuntimeHolder.h +2 -0
- package/Shared/Networking/OriginPolicyHttpFilter.cpp +5 -2
- package/Shared/Networking/RedirectHttpFilter.cpp +9 -0
- package/Shared/Shared.vcxitems.filters +12 -0
- package/Shared/V8JSIRuntimeHolder.h +2 -0
- package/package.json +1 -1
|
@@ -77,7 +77,7 @@ const View: React.AbstractComponent<
|
|
|
77
77
|
|
|
78
78
|
// [Windows
|
|
79
79
|
const childrenWithImportantForAccessibility = children => {
|
|
80
|
-
|
|
80
|
+
const updatedChildren = React.Children.map(children, child => {
|
|
81
81
|
if (React.isValidElement(child)) {
|
|
82
82
|
if (child.props.children) {
|
|
83
83
|
return React.cloneElement(child, {
|
|
@@ -92,6 +92,11 @@ const View: React.AbstractComponent<
|
|
|
92
92
|
}
|
|
93
93
|
return child;
|
|
94
94
|
});
|
|
95
|
+
if (updatedChildren.length == 1) {
|
|
96
|
+
return updatedChildren[0];
|
|
97
|
+
} else {
|
|
98
|
+
return updatedChildren;
|
|
99
|
+
}
|
|
95
100
|
};
|
|
96
101
|
// Windows]
|
|
97
102
|
|
|
@@ -743,6 +743,7 @@
|
|
|
743
743
|
<PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" />
|
|
744
744
|
<PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
|
|
745
745
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" />
|
|
746
|
+
<PackageReference Include="$(V8PackageName)" Version="$(V8Version)" Condition="'$(UseV8)' == 'true'" />
|
|
746
747
|
</ItemGroup>
|
|
747
748
|
<Choose>
|
|
748
749
|
<When Condition="'$(EnableSourceLink)' == 'true'">
|
|
@@ -753,13 +754,6 @@
|
|
|
753
754
|
</ItemGroup>
|
|
754
755
|
</When>
|
|
755
756
|
</Choose>
|
|
756
|
-
<Choose>
|
|
757
|
-
<When Condition="'$(UseV8)' == 'true'">
|
|
758
|
-
<ItemGroup>
|
|
759
|
-
<PackageReference Include="ReactNative.V8Jsi.Windows.UWP" Version="$(V8Version)" />
|
|
760
|
-
</ItemGroup>
|
|
761
|
-
</When>
|
|
762
|
-
</Choose>
|
|
763
757
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
764
758
|
<Import Project="$(ReactNativeWindowsDir)PropertySheets\FastBuild.targets" />
|
|
765
759
|
<Import Project="$(ReactNativeWindowsDir)PropertySheets\FixupRoslynCscWarnings.targets" />
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
#ifndef MICROSOFT_REACTNATIVE_JSI_NODEAPIJSIRUNTIME
|
|
6
6
|
#define MICROSOFT_REACTNATIVE_JSI_NODEAPIJSIRUNTIME
|
|
7
7
|
|
|
8
|
+
// Standard Library
|
|
9
|
+
#include <memory>
|
|
10
|
+
|
|
8
11
|
// JSI
|
|
9
12
|
#include <js_native_ext_api.h>
|
|
10
13
|
#include <jsi/jsi.h>
|
|
11
14
|
|
|
12
|
-
// Standard Library
|
|
13
|
-
#include <memory>
|
|
14
|
-
|
|
15
15
|
namespace Microsoft::JSI {
|
|
16
16
|
|
|
17
17
|
///
|
|
@@ -128,8 +128,9 @@
|
|
|
128
128
|
<ItemGroup>
|
|
129
129
|
<None Include="$(MSBuildThisFileDirectory)README.md" />
|
|
130
130
|
</ItemGroup>
|
|
131
|
-
<ItemGroup>
|
|
131
|
+
<ItemGroup Condition="'$(BuildMSRNCxx)' != 'false' and '$(RNExternalReferences)' != 'true'">
|
|
132
132
|
<ClCompile Include="$(MSBuildThisFileDirectory)JSI\NodeApiJsiRuntime.cpp">
|
|
133
|
+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
133
134
|
<ExcludedFromBuild Condition="'$(UseV8)' != 'true'">true</ExcludedFromBuild>
|
|
134
135
|
</ClCompile>
|
|
135
136
|
</ItemGroup>
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
Licensed under the MIT License.
|
|
5
5
|
-->
|
|
6
6
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
7
|
+
<PropertyGroup>
|
|
8
|
+
<RNExternalReferences>true</RNExternalReferences>
|
|
9
|
+
</PropertyGroup>
|
|
7
10
|
<!-- To avoid having these references show in in Visual Studio which ignores conditions on items we have to put the source references in source. -->
|
|
8
11
|
<ImportGroup Label="Shared">
|
|
9
12
|
<Import Project="$(ReactNativeWindowsDir)\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems"
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.70.
|
|
13
|
+
<ReactNativeWindowsVersion>0.70.4</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>70</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>4</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
18
|
</PropertyGroup>
|
|
19
19
|
</Project>
|
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
<EnableDevServerHBCBundles Condition="'$(EnableDevServerHBCBundles)' == ''">false</EnableDevServerHBCBundles>
|
|
19
19
|
|
|
20
20
|
<UseV8 Condition="'$(UseV8)' == ''">false</UseV8>
|
|
21
|
-
<V8Version Condition="'$(V8Version)' == ''">0.
|
|
21
|
+
<V8Version Condition="'$(V8Version)' == ''">0.70.1</V8Version>
|
|
22
22
|
<V8PackageName>ReactNative.V8Jsi.Windows</V8PackageName>
|
|
23
23
|
<V8PackageName Condition="'$(V8AppPlatform)' != 'win32'">$(V8PackageName).UWP</V8PackageName>
|
|
24
|
-
<V8Package>$(NuGetPackageRoot)\$(V8PackageName).$(V8Version)</V8Package>
|
|
25
24
|
</PropertyGroup>
|
|
26
25
|
|
|
27
26
|
</Project>
|
|
@@ -640,8 +640,6 @@ void OriginPolicyHttpFilter::ValidateResponse(HttpResponseMessage const &respons
|
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
ResponseOperation OriginPolicyHttpFilter::SendPreflightAsync(HttpRequestMessage const &request) const {
|
|
643
|
-
// TODO: Inject user agent?
|
|
644
|
-
|
|
645
643
|
auto coRequest = request;
|
|
646
644
|
|
|
647
645
|
HttpRequestMessage preflightRequest;
|
|
@@ -761,6 +759,11 @@ ResponseOperation OriginPolicyHttpFilter::SendRequestAsync(HttpRequestMessage co
|
|
|
761
759
|
ValidatePreflightResponse(coRequest, preflightResponse);
|
|
762
760
|
}
|
|
763
761
|
|
|
762
|
+
if (originPolicy == OriginPolicy::SimpleCrossOriginResourceSharing ||
|
|
763
|
+
originPolicy == OriginPolicy::CrossOriginResourceSharing) {
|
|
764
|
+
coRequest.Headers().Insert(L"Origin", s_origin.AbsoluteCanonicalUri());
|
|
765
|
+
}
|
|
766
|
+
|
|
764
767
|
auto response = co_await m_innerFilter.SendRequestAsync(coRequest);
|
|
765
768
|
|
|
766
769
|
ValidateResponse(response, originPolicy);
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
#include "RedirectHttpFilter.h"
|
|
7
7
|
|
|
8
|
+
// React Native Windows
|
|
9
|
+
#include <CppRuntimeOptions.h>
|
|
8
10
|
#include "WinRTTypes.h"
|
|
9
11
|
|
|
10
12
|
// Windows API
|
|
@@ -211,6 +213,13 @@ ResponseOperation RedirectHttpFilter::SendRequestAsync(HttpRequestMessage const
|
|
|
211
213
|
method = coRequest.Method();
|
|
212
214
|
|
|
213
215
|
do {
|
|
216
|
+
// Set User-Agent
|
|
217
|
+
// See https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
|
|
218
|
+
auto userAgent = GetRuntimeOptionString("Http.UserAgent");
|
|
219
|
+
if (userAgent.size() > 0) {
|
|
220
|
+
coRequest.Headers().Append(L"User-Agent", winrt::to_hstring(userAgent));
|
|
221
|
+
}
|
|
222
|
+
|
|
214
223
|
// Send subsequent requests through the filter that doesn't have the credentials included in the first request
|
|
215
224
|
response =
|
|
216
225
|
co_await (redirectCount > 0 ? m_innerFilterWithNoCredentials : m_innerFilter).SendRequestAsync(coRequest);
|
|
@@ -155,6 +155,9 @@
|
|
|
155
155
|
<ClCompile Include="$(MSBuildThisFileDirectory)Networking\RedirectHttpFilter.cpp">
|
|
156
156
|
<Filter>Source Files\Networking</Filter>
|
|
157
157
|
</ClCompile>
|
|
158
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)Modules\BlobModule.cpp">
|
|
159
|
+
<Filter>Source Files\Modules</Filter>
|
|
160
|
+
</ClCompile>
|
|
158
161
|
</ItemGroup>
|
|
159
162
|
<ItemGroup>
|
|
160
163
|
<Filter Include="Source Files">
|
|
@@ -469,6 +472,15 @@
|
|
|
469
472
|
<ClInclude Include="$(MSBuildThisFileDirectory)Networking\IRedirectEventSource.h">
|
|
470
473
|
<Filter>Header Files\Networking</Filter>
|
|
471
474
|
</ClInclude>
|
|
475
|
+
<ClInclude Include="$(MSBuildThisFileDirectory)Modules\BlobModule.h">
|
|
476
|
+
<Filter>Header Files\Modules</Filter>
|
|
477
|
+
</ClInclude>
|
|
478
|
+
<ClInclude Include="$(MSBuildThisFileDirectory)Modules\IWebSocketModuleProxy.h">
|
|
479
|
+
<Filter>Header Files\Modules</Filter>
|
|
480
|
+
</ClInclude>
|
|
481
|
+
<ClInclude Include="$(MSBuildThisFileDirectory)Modules\IWebSocketModuleContentHandler.h">
|
|
482
|
+
<Filter>Header Files\Modules</Filter>
|
|
483
|
+
</ClInclude>
|
|
472
484
|
</ItemGroup>
|
|
473
485
|
<ItemGroup>
|
|
474
486
|
<None Include="$(MSBuildThisFileDirectory)tracing\rnw.wprp">
|