react-native-windows 0.64.21 → 0.64.25
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/CHANGELOG.json +67 -1
- package/CHANGELOG.md +37 -4
- package/Folly/TEMP_UntilFollyUpdate/dynamic-inl.h +1221 -0
- package/PropertySheets/Autolink.props +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/YGValue.h +94 -0
- package/Shared/Modules/PlatformConstantsModule.cpp +9 -3
- package/Shared/OInstance.cpp +20 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<RunAutolinkCheck Condition="'$(RunAutolinkCheck)' == ''">true</RunAutolinkCheck>
|
|
10
10
|
<AutolinkCommand Condition="'$(AutolinkCommand)' == ''">npx react-native autolink-windows</AutolinkCommand>
|
|
11
11
|
<AutolinkCommandWorkingDir Condition="'$(AutolinkCommandWorkingDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(ProjectDir), 'package.json'))</AutolinkCommandWorkingDir>
|
|
12
|
-
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == '' And '$(SolutionPath)' != '' And '$(ProjectPath)' != ''">--check --sln "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(SolutionPath)))" --proj "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(ProjectPath)))"</AutolinkCommandArgs>
|
|
12
|
+
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == '' And '$(SolutionPath)' != '' And '$(SolutionPath)' != '*Undefined*' And '$(ProjectPath)' != ''">--check --sln "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(SolutionPath)))" --proj "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(ProjectPath)))"</AutolinkCommandArgs>
|
|
13
13
|
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == ''">--check</AutolinkCommandArgs>
|
|
14
14
|
</PropertyGroup>
|
|
15
15
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <math.h>
|
|
11
|
+
#include "YGEnums.h"
|
|
12
|
+
#include "YGMacros.h"
|
|
13
|
+
|
|
14
|
+
#if defined(_MSC_VER) && defined(__clang__)
|
|
15
|
+
#define COMPILING_WITH_CLANG_ON_WINDOWS
|
|
16
|
+
#endif
|
|
17
|
+
#if defined(COMPILING_WITH_CLANG_ON_WINDOWS)
|
|
18
|
+
#include <limits>
|
|
19
|
+
constexpr float YGUndefined = std::numeric_limits<float>::quiet_NaN();
|
|
20
|
+
#else
|
|
21
|
+
YG_EXTERN_C_BEGIN
|
|
22
|
+
|
|
23
|
+
#if defined(_MSC_VER)
|
|
24
|
+
#define YGUndefined __builtin_nanf("0")
|
|
25
|
+
#else
|
|
26
|
+
#define YGUndefined NAN
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
typedef struct YGValue {
|
|
32
|
+
float value;
|
|
33
|
+
YGUnit unit;
|
|
34
|
+
} YGValue;
|
|
35
|
+
|
|
36
|
+
YOGA_EXPORT extern const YGValue YGValueAuto;
|
|
37
|
+
YOGA_EXPORT extern const YGValue YGValueUndefined;
|
|
38
|
+
YOGA_EXPORT extern const YGValue YGValueZero;
|
|
39
|
+
|
|
40
|
+
#if !defined(COMPILING_WITH_CLANG_ON_WINDOWS)
|
|
41
|
+
YG_EXTERN_C_END
|
|
42
|
+
#endif
|
|
43
|
+
#undef COMPILING_WITH_CLANG_ON_WINDOWS
|
|
44
|
+
|
|
45
|
+
#ifdef __cplusplus
|
|
46
|
+
|
|
47
|
+
inline bool operator==(const YGValue& lhs, const YGValue& rhs) {
|
|
48
|
+
if (lhs.unit != rhs.unit) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
switch (lhs.unit) {
|
|
53
|
+
case YGUnitUndefined:
|
|
54
|
+
case YGUnitAuto:
|
|
55
|
+
return true;
|
|
56
|
+
case YGUnitPoint:
|
|
57
|
+
case YGUnitPercent:
|
|
58
|
+
return lhs.value == rhs.value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
inline bool operator!=(const YGValue& lhs, const YGValue& rhs) {
|
|
65
|
+
return !(lhs == rhs);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
inline YGValue operator-(const YGValue& value) {
|
|
69
|
+
return {-value.value, value.unit};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
namespace facebook {
|
|
73
|
+
namespace yoga {
|
|
74
|
+
namespace literals {
|
|
75
|
+
|
|
76
|
+
inline YGValue operator"" _pt(long double value) {
|
|
77
|
+
return YGValue{static_cast<float>(value), YGUnitPoint};
|
|
78
|
+
}
|
|
79
|
+
inline YGValue operator"" _pt(unsigned long long value) {
|
|
80
|
+
return operator"" _pt(static_cast<long double>(value));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
inline YGValue operator"" _percent(long double value) {
|
|
84
|
+
return YGValue{static_cast<float>(value), YGUnitPercent};
|
|
85
|
+
}
|
|
86
|
+
inline YGValue operator"" _percent(unsigned long long value) {
|
|
87
|
+
return operator"" _percent(static_cast<long double>(value));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
} // namespace literals
|
|
91
|
+
} // namespace yoga
|
|
92
|
+
} // namespace facebook
|
|
93
|
+
|
|
94
|
+
#endif
|
|
@@ -60,10 +60,16 @@ std::map<std::string, folly::dynamic> PlatformConstantsModule::getConstants() {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/*static*/ int32_t PlatformConstantsModule::OsVersion() noexcept {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
try {
|
|
64
|
+
for (uint16_t i = 1;; ++i) {
|
|
65
|
+
if (!ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", i)) {
|
|
66
|
+
return i - 1;
|
|
67
|
+
}
|
|
66
68
|
}
|
|
69
|
+
} catch (winrt::hresult_error const &e) {
|
|
70
|
+
// ApiInformation::IsApiContractPresent did not exist before Windows 10240
|
|
71
|
+
// So this indicates a version of windows earlier than this.
|
|
72
|
+
return 0;
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
75
|
|
package/Shared/OInstance.cpp
CHANGED
|
@@ -434,6 +434,25 @@ InstanceImpl::InstanceImpl(
|
|
|
434
434
|
!m_devSettings->useFastRefresh,
|
|
435
435
|
m_innerInstance->getJSCallInvoker());
|
|
436
436
|
} else {
|
|
437
|
+
#if defined(USE_V8)
|
|
438
|
+
std::unique_ptr<facebook::jsi::ScriptStore> scriptStore = nullptr;
|
|
439
|
+
std::unique_ptr<facebook::jsi::PreparedScriptStore> preparedScriptStore = nullptr;
|
|
440
|
+
|
|
441
|
+
char tempPath[MAX_PATH];
|
|
442
|
+
if (GetTempPathA(MAX_PATH, tempPath)) {
|
|
443
|
+
preparedScriptStore = std::make_unique<facebook::react::BasePreparedScriptStoreImpl>(tempPath);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
m_devSettings->jsiRuntimeHolder = std::make_shared<facebook::react::V8JSIRuntimeHolder>(
|
|
447
|
+
m_devSettings, m_jsThread, std::move(scriptStore), std::move(preparedScriptStore));
|
|
448
|
+
|
|
449
|
+
jsef = std::make_shared<OJSIExecutorFactory>(
|
|
450
|
+
m_devSettings->jsiRuntimeHolder,
|
|
451
|
+
m_devSettings->loggingCallback,
|
|
452
|
+
m_turboModuleRegistry,
|
|
453
|
+
!m_devSettings->useFastRefresh,
|
|
454
|
+
m_innerInstance->getJSCallInvoker());
|
|
455
|
+
#else
|
|
437
456
|
// We use the older non-JSI ChakraExecutor pipeline as a fallback as of
|
|
438
457
|
// now. This will go away once we completely move to JSI flow.
|
|
439
458
|
ChakraInstanceArgs instanceArgs;
|
|
@@ -470,6 +489,7 @@ InstanceImpl::InstanceImpl(
|
|
|
470
489
|
: CreateMemoryTracker(std::shared_ptr<MessageQueueThread>{m_nativeQueue});
|
|
471
490
|
|
|
472
491
|
jsef = std::make_shared<ChakraExecutorFactory>(std::move(instanceArgs));
|
|
492
|
+
#endif
|
|
473
493
|
}
|
|
474
494
|
}
|
|
475
495
|
|