react-native-windows 0.0.0-canary.477 → 0.0.0-canary.480
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.
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.0.0-canary.
|
|
13
|
+
<ReactNativeWindowsVersion>0.0.0-canary.480</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
@@ -69,13 +69,13 @@ std::future<std::pair<std::string, bool>> GetJavaScriptFromServerAsync(const std
|
|
|
69
69
|
|
|
70
70
|
HRESULT hr = asyncRequest.ErrorCode();
|
|
71
71
|
if (FAILED(hr)) {
|
|
72
|
-
std::
|
|
72
|
+
std::string error;
|
|
73
73
|
if (hr == WININET_E_CANNOT_CONNECT) {
|
|
74
|
-
|
|
74
|
+
error = fmt::format("A connection with the server {} could not be established.\n\nIs the packager running?", url);
|
|
75
75
|
} else {
|
|
76
|
-
|
|
76
|
+
error = fmt::format("Error 0x{:x} downloading {}.", static_cast<int>(asyncRequest.ErrorCode()), url);
|
|
77
77
|
}
|
|
78
|
-
co_return std::make_pair(
|
|
78
|
+
co_return std::make_pair(error, false);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
winrt::Windows::Web::Http::HttpResponseMessage response = asyncRequest.GetResults();
|
|
@@ -88,15 +88,15 @@ std::future<std::pair<std::string, bool>> GetJavaScriptFromServerAsync(const std
|
|
|
88
88
|
uint32_t len = reader.UnconsumedBufferLength();
|
|
89
89
|
std::string result;
|
|
90
90
|
if (len > 0 || response.IsSuccessStatusCode()) {
|
|
91
|
-
std::
|
|
91
|
+
std::string data;
|
|
92
92
|
data.resize(len);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
auto buf = reinterpret_cast<uint8_t *>(data.data());
|
|
94
|
+
static_assert(
|
|
95
|
+
sizeof(buf[0]) == sizeof(data[0]), "perf optimization relies on uint8_t and char being the same size");
|
|
96
|
+
reader.ReadBytes(winrt::array_view(buf, buf + len));
|
|
97
|
+
result = std::move(data);
|
|
96
98
|
} else {
|
|
97
|
-
|
|
98
|
-
sstream << "HTTP Error " << static_cast<int>(response.StatusCode()) << " downloading " << url;
|
|
99
|
-
result = sstream.str();
|
|
99
|
+
result = fmt::format("HTTP Error {} downloading {}.", static_cast<int>(response.StatusCode()), url);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
co_return std::make_pair(std::move(result), response.IsSuccessStatusCode());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.480",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@react-native-community/cli": "^7.0.3",
|
|
27
27
|
"@react-native-community/cli-platform-android": "^7.0.1",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "^7.0.1",
|
|
29
|
-
"@react-native-windows/cli": "0.0.0-canary.
|
|
30
|
-
"@react-native-windows/virtualized-list": "0.0.0-canary.
|
|
29
|
+
"@react-native-windows/cli": "0.0.0-canary.122",
|
|
30
|
+
"@react-native-windows/virtualized-list": "0.0.0-canary.36",
|
|
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",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"ws": "^6.1.4"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@react-native-windows/codegen": "0.0.0-canary.
|
|
61
|
+
"@react-native-windows/codegen": "0.0.0-canary.29",
|
|
62
62
|
"@rnw-scripts/eslint-config": "1.1.11",
|
|
63
63
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.0.5",
|
|
64
64
|
"@rnw-scripts/metro-dev-config": "0.0.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"prettier": "^2.4.1",
|
|
76
76
|
"react": "17.0.2",
|
|
77
77
|
"react-native": "0.0.0-20220322-2008-8a5460ce8",
|
|
78
|
-
"react-native-platform-override": "^1.6.
|
|
78
|
+
"react-native-platform-override": "^1.6.8",
|
|
79
79
|
"react-refresh": "^0.4.0",
|
|
80
80
|
"react-shallow-renderer": "16.14.1",
|
|
81
81
|
"typescript": "^4.4.4"
|