react-native-windows 0.67.0 → 0.67.1

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 CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
3
  "entries": [
4
+ {
5
+ "date": "Mon, 07 Feb 2022 16:12:39 GMT",
6
+ "tag": "react-native-windows_v0.67.1",
7
+ "version": "0.67.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "anandrag@microsoft.com",
12
+ "package": "react-native-windows",
13
+ "commit": "81a6b931d7df9db4d5667c4961e22707d5238194",
14
+ "comment": "Hermes inspector is not starting when Hermes engine is used (#9426)"
15
+ },
16
+ {
17
+ "author": "julio.rocha@microsoft.com",
18
+ "package": "react-native-windows",
19
+ "commit": "8c8248af3d324b55adce0d4e41bfc2957a3f4446",
20
+ "comment": "Replace __APPLE__ with __clang__ where applicable (#9461)"
21
+ },
22
+ {
23
+ "author": "30809111+acoates-ms@users.noreply.github.com",
24
+ "package": "react-native-windows",
25
+ "commit": "d57cded6b8bef14f8a0b2d24ab978eaf8f290354",
26
+ "comment": "UI Manager module is not being destroyed on the UI thread"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "date": "Mon, 24 Jan 2022 16:13:22 GMT",
33
+ "tag": "react-native-windows_v0.67.0",
34
+ "version": "0.67.0",
35
+ "comments": {
36
+ "patch": [
37
+ {
38
+ "author": "jthysell@microsoft.com",
39
+ "package": "react-native-windows",
40
+ "commit": "not available",
41
+ "comment": "[0.67] Remove ADO NuGet feed from config for new projects"
42
+ },
43
+ {
44
+ "author": "ngerlem@microsoft.com",
45
+ "package": "react-native-windows",
46
+ "commit": "not available",
47
+ "comment": "Promote 0.67 to latest"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "react-native-windows",
52
+ "comment": "Bump @react-native-windows/cli to v0.67.0",
53
+ "commit": "f3ec055a5554558b61b538fcb405719a00249bef"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "react-native-windows",
58
+ "comment": "Bump @react-native-windows/virtualized-list to v0.67.0",
59
+ "commit": "f3ec055a5554558b61b538fcb405719a00249bef"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "react-native-windows",
64
+ "comment": "Bump @react-native-windows/codegen to v0.67.0",
65
+ "commit": "f3ec055a5554558b61b538fcb405719a00249bef"
66
+ }
67
+ ]
68
+ }
69
+ },
4
70
  {
5
71
  "date": "Mon, 24 Jan 2022 16:12:32 GMT",
6
72
  "tag": "react-native-windows_v0.67.0",
package/CHANGELOG.md CHANGED
@@ -1,21 +1,43 @@
1
1
  # Change Log - react-native-windows
2
2
 
3
- This log was last generated on Mon, 24 Jan 2022 16:12:32 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 07 Feb 2022 16:12:39 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.67.0
7
+ ## 0.67.1
8
8
 
9
- Mon, 24 Jan 2022 16:12:32 GMT
9
+ Mon, 07 Feb 2022 16:12:39 GMT
10
10
 
11
11
  ### Patches
12
12
 
13
- - [0.67] Remove ADO NuGet feed from config for new projects (jthysell@microsoft.com)
14
- - Promote 0.67 to latest (ngerlem@microsoft.com)
15
- - Bump @react-native-windows/cli to v0.67.0
16
- - Bump @react-native-windows/virtualized-list to v0.67.0
17
- - Bump @react-native-windows/codegen to v0.67.0
13
+ - Hermes inspector is not starting when Hermes engine is used (#9426) (anandrag@microsoft.com)
14
+ - Replace __APPLE__ with __clang__ where applicable (#9461) (julio.rocha@microsoft.com)
15
+ - UI Manager module is not being destroyed on the UI thread (30809111+acoates-ms@users.noreply.github.com)
18
16
 
17
+ ## 0.67.0
18
+
19
+ Mon, 24 Jan 2022 16:13:22 GMT
20
+
21
+ ### Patches
22
+
23
+ - [0.67] Remove ADO NuGet feed from config for new projects (jthysell@microsoft.com)
24
+ - Promote 0.67 to latest (ngerlem@microsoft.com)
25
+ - Bump @react-native-windows/cli to v0.67.0
26
+ - Bump @react-native-windows/virtualized-list to v0.67.0
27
+ - Bump @react-native-windows/codegen to v0.67.0
28
+
29
+ ## 0.67.0
30
+
31
+ Mon, 24 Jan 2022 16:12:32 GMT
32
+
33
+ ### Patches
34
+
35
+ - [0.67] Remove ADO NuGet feed from config for new projects (jthysell@microsoft.com)
36
+ - Promote 0.67 to latest (ngerlem@microsoft.com)
37
+ - Bump @react-native-windows/cli to v0.67.0
38
+ - Bump @react-native-windows/virtualized-list to v0.67.0
39
+ - Bump @react-native-windows/codegen to v0.67.0
40
+
19
41
  ## 0.67.0-preview.7
20
42
 
21
43
  Mon, 17 Jan 2022 16:12:54 GMT
@@ -395,7 +395,7 @@ facebook::jsi::JSError const &jsError) { \
395
395
  }
396
396
 
397
397
  /*static*/ ReactNative::JsiRuntime JsiRuntime::GetOrCreate(
398
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
398
+ std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
399
399
  std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept {
400
400
  {
401
401
  std::scoped_lock lock{s_mutex};
@@ -409,7 +409,7 @@ facebook::jsi::JSError const &jsError) { \
409
409
  }
410
410
 
411
411
  /*static*/ ReactNative::JsiRuntime JsiRuntime::Create(
412
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
412
+ std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
413
413
  std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept {
414
414
  // There are some functions that we cannot do using JSI such as
415
415
  // defining a property or using Symbol as a key.
@@ -445,7 +445,7 @@ ReactNative::JsiRuntime JsiRuntime::MakeChakraRuntime() {
445
445
  }
446
446
 
447
447
  JsiRuntime::JsiRuntime(
448
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> &&runtimeHolder,
448
+ std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> &&runtimeHolder,
449
449
  std::shared_ptr<facebook::jsi::Runtime> &&runtime) noexcept
450
450
  : m_runtimeHolder{std::move(runtimeHolder)},
451
451
  m_runtime{std::move(runtime)},
@@ -58,16 +58,16 @@ struct RuntimeAccessor;
58
58
 
59
59
  struct JsiRuntime : JsiRuntimeT<JsiRuntime> {
60
60
  JsiRuntime(
61
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> &&runtimeHolder,
61
+ std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> &&runtimeHolder,
62
62
  std::shared_ptr<facebook::jsi::Runtime> &&runtime) noexcept;
63
63
  ~JsiRuntime() noexcept;
64
64
 
65
65
  static ReactNative::JsiRuntime FromRuntime(facebook::jsi::Runtime &runtime) noexcept;
66
66
  static ReactNative::JsiRuntime GetOrCreate(
67
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
67
+ std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
68
68
  std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept;
69
69
  static ReactNative::JsiRuntime Create(
70
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
70
+ std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
71
71
  std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept;
72
72
 
73
73
  public: // JsiRuntime
@@ -168,7 +168,7 @@ struct JsiRuntime : JsiRuntimeT<JsiRuntime> {
168
168
  void SetError(facebook::jsi::JSINativeException const &nativeException) noexcept;
169
169
 
170
170
  private:
171
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> m_runtimeHolder;
171
+ std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> m_runtimeHolder;
172
172
  std::shared_ptr<facebook::jsi::Runtime> m_runtime;
173
173
  RuntimeAccessor *m_runtimeAccessor{};
174
174
  std::mutex m_mutex;
@@ -530,7 +530,7 @@ UIManager::UIManager() : m_module(std::make_shared<UIManagerModule>()) {}
530
530
  UIManager::~UIManager() {
531
531
  // To make sure that we destroy UI components in UI thread.
532
532
  if (!m_context.UIDispatcher().HasThreadAccess()) {
533
- m_context.UIDispatcher().Post([module = std::move(m_module)]() {});
533
+ m_context.UIDispatcher().Post([module = std::move(m_module)]() mutable { module = nullptr; });
534
534
  }
535
535
  }
536
536
 
@@ -5,9 +5,9 @@
5
5
 
6
6
  #include "React.h"
7
7
 
8
- namespace facebook::jsi {
8
+ namespace Microsoft::JSI {
9
9
  struct RuntimeHolderLazyInit;
10
- } // namespace facebook::jsi
10
+ } // namespace Microsoft::JSI
11
11
 
12
12
  namespace Mso::React {
13
13
 
@@ -899,7 +899,7 @@ void ReactInstanceWin::DispatchEvent(int64_t viewTag, std::string &&eventName, f
899
899
  }
900
900
 
901
901
  winrt::Microsoft::ReactNative::JsiRuntime ReactInstanceWin::JsiRuntime() noexcept {
902
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> jsiRuntimeHolder;
902
+ std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> jsiRuntimeHolder;
903
903
  {
904
904
  std::scoped_lock lock{m_mutex};
905
905
  if (m_jsiRuntime) {
@@ -184,7 +184,7 @@ class ReactInstanceWin final : public Mso::ActiveObject<IReactInstanceInternal>
184
184
  Mso::CntPtr<Mso::React::IDispatchQueue2> m_uiQueue;
185
185
  std::deque<JSCallEntry> m_jsCallQueue;
186
186
 
187
- std::shared_ptr<facebook::jsi::RuntimeHolderLazyInit> m_jsiRuntimeHolder;
187
+ std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> m_jsiRuntimeHolder;
188
188
  winrt::Microsoft::ReactNative::JsiRuntime m_jsiRuntime{nullptr};
189
189
  };
190
190
 
@@ -301,7 +301,7 @@ constexpr void ValidateCoroutineArg() noexcept {
301
301
  static_assert(
302
302
  !std::is_reference_v<TArg> && !std::is_pointer_v<TArg>,
303
303
  "Coroutine parameter must be passed by value for safe access"
304
- #ifndef __APPLE__
304
+ #ifndef __clang__
305
305
  ": " __FUNCSIG__
306
306
  #endif
307
307
  );
@@ -10,10 +10,10 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.67.0</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.67.1</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>67</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>1</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
18
  </PropertyGroup>
19
19
  </Project>
@@ -9,6 +9,10 @@
9
9
 
10
10
  namespace Microsoft::JSI {
11
11
 
12
+ facebook::react::JSIEngineOverride ChakraRuntimeHolder::getRuntimeType() noexcept {
13
+ return facebook::react::JSIEngineOverride::Chakra;
14
+ }
15
+
12
16
  std::shared_ptr<facebook::jsi::Runtime> ChakraRuntimeHolder::getRuntime() noexcept {
13
17
  std::call_once(once_flag_, [this]() { initRuntime(); });
14
18
 
@@ -12,9 +12,10 @@
12
12
 
13
13
  namespace Microsoft::JSI {
14
14
 
15
- class ChakraRuntimeHolder final : public facebook::jsi::RuntimeHolderLazyInit {
15
+ class ChakraRuntimeHolder final : public Microsoft::JSI::RuntimeHolderLazyInit {
16
16
  public:
17
17
  std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept override;
18
+ facebook::react::JSIEngineOverride getRuntimeType() noexcept override;
18
19
 
19
20
  ChakraRuntimeHolder(
20
21
  std::shared_ptr<facebook::react::DevSettings> devSettings,
@@ -14,11 +14,9 @@
14
14
  #define STRING_(s) #s
15
15
  #define STRING(s) STRING_(s)
16
16
 
17
- namespace facebook {
18
- namespace jsi {
17
+ namespace Microsoft::JSI {
19
18
  struct RuntimeHolderLazyInit;
20
- }
21
- } // namespace facebook
19
+ } // namespace Microsoft::JSI
22
20
 
23
21
  namespace facebook {
24
22
  namespace react {
@@ -81,7 +79,7 @@ struct DevSettings {
81
79
  /// instance. This object should in general be used only from the JS engine
82
80
  /// thread, unless the specific runtime implementation explicitly guarantees
83
81
  /// reentrancy.
84
- std::shared_ptr<jsi::RuntimeHolderLazyInit> jsiRuntimeHolder;
82
+ std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> jsiRuntimeHolder;
85
83
 
86
84
  // Until the ABI story is addressed we'll use this instead of the above for
87
85
  // the purposes of selecting a JSI Runtime to use.
@@ -72,6 +72,10 @@ class HermesExecutorRuntimeAdapter final : public facebook::hermes::inspector::R
72
72
 
73
73
  } // namespace
74
74
 
75
+ facebook::react::JSIEngineOverride HermesRuntimeHolder::getRuntimeType() noexcept {
76
+ return facebook::react::JSIEngineOverride::Hermes;
77
+ }
78
+
75
79
  std::shared_ptr<jsi::Runtime> HermesRuntimeHolder::getRuntime() noexcept {
76
80
  std::call_once(m_once_flag, [this]() { initRuntime(); });
77
81
 
@@ -12,9 +12,10 @@
12
12
  namespace facebook {
13
13
  namespace react {
14
14
 
15
- class HermesRuntimeHolder : public facebook::jsi::RuntimeHolderLazyInit {
15
+ class HermesRuntimeHolder : public Microsoft::JSI::RuntimeHolderLazyInit {
16
16
  public:
17
17
  std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept override;
18
+ facebook::react::JSIEngineOverride getRuntimeType() noexcept override;
18
19
 
19
20
  HermesRuntimeHolder(
20
21
  std::shared_ptr<facebook::react::DevSettings> devSettings,
@@ -96,7 +96,11 @@ void NapiJsiV8RuntimeHolder::InitRuntime() noexcept {
96
96
  m_ownThreadId = std::this_thread::get_id();
97
97
  }
98
98
 
99
- #pragma region facebook::jsi::RuntimeHolderLazyInit
99
+ #pragma region Microsoft::JSI::RuntimeHolderLazyInit
100
+
101
+ facebook::react::JSIEngineOverride NapiJsiV8RuntimeHolder::getRuntimeType() noexcept {
102
+ return facebook::react::JSIEngineOverride::V8NodeApi;
103
+ }
100
104
 
101
105
  shared_ptr<Runtime> NapiJsiV8RuntimeHolder::getRuntime() noexcept /*override*/
102
106
  {
@@ -112,6 +116,6 @@ shared_ptr<Runtime> NapiJsiV8RuntimeHolder::getRuntime() noexcept /*override*/
112
116
  return m_runtime;
113
117
  }
114
118
 
115
- #pragma endregion facebook::jsi::RuntimeHolderLazyInit
119
+ #pragma endregion Microsoft::JSI::RuntimeHolderLazyInit
116
120
 
117
121
  } // namespace Microsoft::JSI
@@ -10,9 +10,10 @@
10
10
 
11
11
  namespace Microsoft::JSI {
12
12
 
13
- class NapiJsiV8RuntimeHolder : public facebook::jsi::RuntimeHolderLazyInit {
13
+ class NapiJsiV8RuntimeHolder : public Microsoft::JSI::RuntimeHolderLazyInit {
14
14
  public:
15
15
  std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept override;
16
+ facebook::react::JSIEngineOverride getRuntimeType() noexcept override;
16
17
 
17
18
  NapiJsiV8RuntimeHolder(
18
19
  std::shared_ptr<facebook::react::DevSettings> devSettings,
@@ -3,8 +3,9 @@
3
3
  #include <jsi/jsi.h>
4
4
  #include <memory>
5
5
 
6
- namespace facebook {
7
- namespace jsi {
6
+ #include <DevSettings.h>
7
+
8
+ namespace Microsoft::JSI {
8
9
 
9
10
  // An instance of this interface is expected to
10
11
  // a. lazily create a JSI Runtime on the first call to getRuntime
@@ -15,7 +16,7 @@ namespace jsi {
15
16
 
16
17
  struct RuntimeHolderLazyInit {
17
18
  virtual std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept = 0;
19
+ virtual facebook::react::JSIEngineOverride getRuntimeType() noexcept = 0;
18
20
  };
19
21
 
20
- } // namespace jsi
21
- } // namespace facebook
22
+ } // namespace Microsoft::JSI
@@ -193,7 +193,7 @@ class OJSIExecutorFactory : public JSExecutorFactory {
193
193
  }
194
194
 
195
195
  OJSIExecutorFactory(
196
- std::shared_ptr<jsi::RuntimeHolderLazyInit> runtimeHolder,
196
+ std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> runtimeHolder,
197
197
  NativeLoggingHook loggingHook,
198
198
  std::shared_ptr<TurboModuleRegistry> turboModuleRegistry,
199
199
  bool isProfilingEnabled,
@@ -205,7 +205,7 @@ class OJSIExecutorFactory : public JSExecutorFactory {
205
205
  isProfilingEnabled_{isProfilingEnabled} {}
206
206
 
207
207
  private:
208
- std::shared_ptr<jsi::RuntimeHolderLazyInit> runtimeHolder_;
208
+ std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> runtimeHolder_;
209
209
  std::shared_ptr<TurboModuleRegistry> turboModuleRegistry_;
210
210
  std::shared_ptr<CallInvoker> jsCallInvoker_;
211
211
  NativeLoggingHook loggingHook_;
@@ -278,6 +278,20 @@ void InstanceImpl::SetInError() noexcept {
278
278
  m_isInError = true;
279
279
  }
280
280
 
281
+ namespace {
282
+ bool shouldStartHermesInspector(DevSettings &devSettings) {
283
+ bool isHermes =
284
+ ((devSettings.jsiEngineOverride == JSIEngineOverride::Hermes) ||
285
+ (devSettings.jsiEngineOverride == JSIEngineOverride::Default && devSettings.jsiRuntimeHolder &&
286
+ devSettings.jsiRuntimeHolder->getRuntimeType() == facebook::react::JSIEngineOverride::Hermes));
287
+
288
+ if (isHermes && devSettings.useDirectDebugger && !devSettings.useWebDebugger)
289
+ return true;
290
+ else
291
+ return false;
292
+ }
293
+ } // namespace
294
+
281
295
  InstanceImpl::InstanceImpl(
282
296
  std::shared_ptr<Instance> &&instance,
283
297
  std::string &&jsBundleBasePath,
@@ -305,8 +319,7 @@ InstanceImpl::InstanceImpl(
305
319
  facebook::react::tracing::initializeETW();
306
320
  #endif
307
321
 
308
- if (m_devSettings->jsiEngineOverride == JSIEngineOverride::Hermes && m_devSettings->useDirectDebugger &&
309
- !m_devSettings->useWebDebugger) {
322
+ if (shouldStartHermesInspector(*m_devSettings)) {
310
323
  m_devManager->StartInspector(m_devSettings->sourceBundleHost, m_devSettings->sourceBundlePort);
311
324
  }
312
325
 
@@ -31,6 +31,10 @@ class TaskRunnerAdapter : public v8runtime::JSITaskRunner {
31
31
  std::shared_ptr<facebook::react::MessageQueueThread> jsQueue_;
32
32
  };
33
33
 
34
+ facebook::react::JSIEngineOverride V8JSIRuntimeHolder::getRuntimeType() noexcept {
35
+ return facebook::react::JSIEngineOverride::V8;
36
+ }
37
+
34
38
  std::shared_ptr<facebook::jsi::Runtime> V8JSIRuntimeHolder::getRuntime() noexcept {
35
39
  std::call_once(once_flag_, [this]() { initRuntime(); });
36
40
 
@@ -13,9 +13,10 @@
13
13
  namespace facebook {
14
14
  namespace react {
15
15
 
16
- class V8JSIRuntimeHolder : public facebook::jsi::RuntimeHolderLazyInit {
16
+ class V8JSIRuntimeHolder : public Microsoft::JSI::RuntimeHolderLazyInit {
17
17
  public:
18
18
  std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept override;
19
+ facebook::react::JSIEngineOverride getRuntimeType() noexcept override;
19
20
 
20
21
  V8JSIRuntimeHolder(
21
22
  std::shared_ptr<facebook::react::DevSettings> devSettings,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.67.0",
3
+ "version": "0.67.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",