react-native-windows 0.66.0-preview.6 → 0.66.3

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
@@ -2,7 +2,103 @@
2
2
  "name": "react-native-windows",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 04 Oct 2021 15:07:18 GMT",
5
+ "date": "Mon, 01 Nov 2021 19:10:15 GMT",
6
+ "tag": "react-native-windows_v0.66.3",
7
+ "version": "0.66.3",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "Fix Microsoft.ReactNative.dll version string",
12
+ "author": "asklar@microsoft.com",
13
+ "commit": "61da34482a055ee52ba23b826d154a7a9fbf0bee",
14
+ "package": "react-native-windows"
15
+ },
16
+ {
17
+ "comment": "Fix crash when using TextInput.blur()",
18
+ "author": "30809111+acoates-ms@users.noreply.github.com",
19
+ "commit": "da602613ebf5593feebb432bffd8a14f0679f2cc",
20
+ "package": "react-native-windows"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Mon, 25 Oct 2021 15:07:26 GMT",
27
+ "tag": "react-native-windows_v0.66.2",
28
+ "version": "0.66.2",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "comment": "Add more symbols to Hermes DLL Loader Shim",
33
+ "author": "ngerlem@microsoft.com",
34
+ "commit": "fb9caf3b0384f30a615c4ece8e79f335bbbb4e33",
35
+ "package": "react-native-windows"
36
+ },
37
+ {
38
+ "comment": "Fix win32 apps referencing the M.RN nuget package so they can use RNW",
39
+ "author": "asklar@microsoft.com",
40
+ "commit": "4963656efc29f87d6850186b220563086ded4bc2",
41
+ "package": "react-native-windows"
42
+ },
43
+ {
44
+ "comment": "Fix EBUSY race conditions between metro bundler and msbuild",
45
+ "author": "dannyvv@microsoft.com",
46
+ "commit": "7e93fce8ba42bbd170995c114c65c9aa120dc68b",
47
+ "package": "react-native-windows"
48
+ },
49
+ {
50
+ "comment": "Fix crash when direct debugging Chakra",
51
+ "author": "anandrag@microsoft.com",
52
+ "commit": "1314dbfb3268b9919adb1c125f91f2dddd82690b",
53
+ "package": "react-native-windows"
54
+ },
55
+ {
56
+ "comment": "Fix AppTheme Regressions",
57
+ "author": "ngerlem@microsoft.com",
58
+ "commit": "d86d0d22a59a84ae9984378cb6aa239bfbe2031f",
59
+ "package": "react-native-windows"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Mon, 18 Oct 2021 15:08:36 GMT",
66
+ "tag": "react-native-windows_v0.66.1",
67
+ "version": "0.66.1",
68
+ "comments": {
69
+ "patch": [
70
+ {
71
+ "comment": "Fix WACK for apps not packaging hermes.dll",
72
+ "author": "ngerlem@microsoft.com",
73
+ "commit": "dc11d60eef65114d80fc92e8c7f19c24f3dbacc9",
74
+ "package": "react-native-windows"
75
+ },
76
+ {
77
+ "comment": "Loosen RN peer dependency",
78
+ "author": "ngerlem@microsoft.com",
79
+ "commit": "6c37292c2a955bdffedc5dbd89eb4225c24582df",
80
+ "package": "react-native-windows"
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ {
86
+ "date": "Mon, 11 Oct 2021 15:07:19 GMT",
87
+ "tag": "react-native-windows_v0.66.0",
88
+ "version": "0.66.0",
89
+ "comments": {
90
+ "patch": [
91
+ {
92
+ "comment": "Promote 0.66 to latest",
93
+ "author": "ngerlem@microsoft.com",
94
+ "commit": "5d1e5ae98139204e02f0ac5d8c06ae7ee1157395",
95
+ "package": "react-native-windows"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "date": "Mon, 04 Oct 2021 15:07:37 GMT",
6
102
  "tag": "react-native-windows_v0.66.0-preview.6",
7
103
  "version": "0.66.0-preview.6",
8
104
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,20 +1,58 @@
1
1
  # Change Log - react-native-windows
2
2
 
3
- This log was last generated on Mon, 04 Oct 2021 15:07:18 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 01 Nov 2021 19:10:15 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.66.0-preview.6
7
+ ## 0.66.3
8
8
 
9
- Mon, 04 Oct 2021 15:07:18 GMT
9
+ Mon, 01 Nov 2021 19:10:15 GMT
10
10
 
11
- ### Changes
11
+ ### Patches
12
12
 
13
- - Upgrade ReactNative.V8Jsi.Windows to 0.65.5 (julio.rocha@microsoft.com)
14
- - Allow injection of custom UI thread (30809111+acoates-ms@users.noreply.github.com)
15
- - ReactNativeHost ReloadInstance and UnloadInstance actions do not always fire completed events (30809111+acoates-ms@users.noreply.github.com)
16
- - Make hermes consume icu.dll in Windows for local aware functions (anandrag@microsoft.com)
13
+ - Fix Microsoft.ReactNative.dll version string (asklar@microsoft.com)
14
+ - Fix crash when using TextInput.blur() (30809111+acoates-ms@users.noreply.github.com)
17
15
 
16
+ ## 0.66.2
17
+
18
+ Mon, 25 Oct 2021 15:07:26 GMT
19
+
20
+ ### Patches
21
+
22
+ - Add more symbols to Hermes DLL Loader Shim (ngerlem@microsoft.com)
23
+ - Fix win32 apps referencing the M.RN nuget package so they can use RNW (asklar@microsoft.com)
24
+ - Fix EBUSY race conditions between metro bundler and msbuild (dannyvv@microsoft.com)
25
+ - Fix crash when direct debugging Chakra (anandrag@microsoft.com)
26
+ - Fix AppTheme Regressions (ngerlem@microsoft.com)
27
+
28
+ ## 0.66.1
29
+
30
+ Mon, 18 Oct 2021 15:08:36 GMT
31
+
32
+ ### Patches
33
+
34
+ - Fix WACK for apps not packaging hermes.dll (ngerlem@microsoft.com)
35
+ - Loosen RN peer dependency (ngerlem@microsoft.com)
36
+
37
+ ## 0.66.0
38
+
39
+ Mon, 11 Oct 2021 15:07:19 GMT
40
+
41
+ ### Patches
42
+
43
+ - Promote 0.66 to latest (ngerlem@microsoft.com)
44
+
45
+ ## 0.66.0-preview.6
46
+
47
+ Mon, 04 Oct 2021 15:07:37 GMT
48
+
49
+ ### Changes
50
+
51
+ - Upgrade ReactNative.V8Jsi.Windows to 0.65.5 (julio.rocha@microsoft.com)
52
+ - Allow injection of custom UI thread (30809111+acoates-ms@users.noreply.github.com)
53
+ - ReactNativeHost ReloadInstance and UnloadInstance actions do not always fire completed events (30809111+acoates-ms@users.noreply.github.com)
54
+ - Make hermes consume icu.dll in Windows for local aware functions (anandrag@microsoft.com)
55
+
18
56
  ## 0.66.0-preview.5
19
57
 
20
58
  Mon, 27 Sep 2021 15:07:31 GMT
@@ -1,9 +1,10 @@
1
- import { NativeEventEmitter } from 'react-native';
2
- import { IHighContrastColors } from './AppThemeTypes';
1
+ import { EmitterSubscription, NativeEventEmitter } from 'react-native';
2
+ import { IHighContrastColors, IHighContrastChangedEvent } from './AppThemeTypes';
3
3
  declare class AppThemeModule extends NativeEventEmitter {
4
4
  private _isHighContrast;
5
5
  private _highContrastColors;
6
6
  constructor();
7
+ addListener(eventName: 'highContrastChanged', listener: (nativeEvent: IHighContrastChangedEvent) => void): EmitterSubscription;
7
8
  get isHighContrast(): boolean;
8
9
  get currentHighContrastColors(): IHighContrastColors;
9
10
  }
@@ -7,10 +7,25 @@
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.AppTheme = void 0;
9
9
  const react_native_1 = require("react-native");
10
- const NativeAppTheme = react_native_1.NativeModules.RTCAppTheme;
10
+ // We previously gracefully handled importing AppTheme in the Jest environment.
11
+ // Mock the NM until we have a coherent story for exporting our own Jest mocks,
12
+ // or remove this API.
13
+ const NativeAppTheme = react_native_1.NativeModules.RTCAppTheme || {
14
+ initialHighContrast: false,
15
+ initialHighContrastColors: {
16
+ ButtonFaceColor: '',
17
+ ButtonTextColor: '',
18
+ GrayTextColor: '',
19
+ HighlightColor: '',
20
+ HighlightTextColor: '',
21
+ HotlightColor: '',
22
+ WindowColor: '',
23
+ WindowTextColor: '',
24
+ },
25
+ };
11
26
  class AppThemeModule extends react_native_1.NativeEventEmitter {
12
27
  constructor() {
13
- super(NativeAppTheme);
28
+ super();
14
29
  this._highContrastColors = NativeAppTheme.initialHighContrastColors;
15
30
  this._isHighContrast = NativeAppTheme.initialHighContrast;
16
31
  this.addListener('highContrastChanged', (nativeEvent) => {
@@ -18,6 +33,9 @@ class AppThemeModule extends react_native_1.NativeEventEmitter {
18
33
  this._highContrastColors = nativeEvent.highContrastColors;
19
34
  });
20
35
  }
36
+ addListener(eventName, listener) {
37
+ return super.addListener(eventName, listener);
38
+ }
21
39
  get isHighContrast() {
22
40
  return this._isHighContrast;
23
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AppTheme.js","sourceRoot":"","sources":["../../src/Libraries/AppTheme/AppTheme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,CAAC;;;AAEb,+CAA+D;AAG/D,MAAM,cAAc,GAAG,4BAAa,CAAC,WAAW,CAAC;AAEjD,MAAM,cAAe,SAAQ,iCAAkB;IAI7C;QACE,KAAK,CAAC,cAAc,CAAC,CAAC;QAEtB,IAAI,CAAC,mBAAmB,GAAG,cAAc,CAAC,yBAAyB,CAAC;QACpE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC,mBAAmB,CAAC;QAC1D,IAAI,CAAC,WAAW,CACd,qBAAqB,EACrB,CAAC,WAAsC,EAAE,EAAE;YACzC,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,cAAc,CAAC;YAClD,IAAI,CAAC,mBAAmB,GAAG,WAAW,CAAC,kBAAkB,CAAC;QAC5D,CAAC,CACF,CAAC;IACJ,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAI,yBAAyB;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF;AAGY,QAAA,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n'use strict';\n\nimport {NativeEventEmitter, NativeModules} from 'react-native';\nimport {IHighContrastColors, IHighContrastChangedEvent} from './AppThemeTypes';\n\nconst NativeAppTheme = NativeModules.RTCAppTheme;\n\nclass AppThemeModule extends NativeEventEmitter {\n private _isHighContrast: boolean;\n private _highContrastColors: IHighContrastColors;\n\n constructor() {\n super(NativeAppTheme);\n\n this._highContrastColors = NativeAppTheme.initialHighContrastColors;\n this._isHighContrast = NativeAppTheme.initialHighContrast;\n this.addListener(\n 'highContrastChanged',\n (nativeEvent: IHighContrastChangedEvent) => {\n this._isHighContrast = nativeEvent.isHighContrast;\n this._highContrastColors = nativeEvent.highContrastColors;\n },\n );\n }\n\n get isHighContrast(): boolean {\n return this._isHighContrast;\n }\n\n get currentHighContrastColors(): IHighContrastColors {\n return this._highContrastColors;\n }\n}\n\nexport type AppTheme = AppThemeModule;\nexport const AppTheme = new AppThemeModule();\n"]}
1
+ {"version":3,"file":"AppTheme.js","sourceRoot":"","sources":["../../src/Libraries/AppTheme/AppTheme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,CAAC;;;AAEb,+CAIsB;AAGtB,+EAA+E;AAC/E,+EAA+E;AAC/E,sBAAsB;AACtB,MAAM,cAAc,GAAG,4BAAa,CAAC,WAAW,IAAI;IAClD,mBAAmB,EAAE,KAAK;IAC1B,yBAAyB,EAAE;QACzB,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,EAAE;QACnB,aAAa,EAAE,EAAE;QACjB,cAAc,EAAE,EAAE;QAClB,kBAAkB,EAAE,EAAE;QACtB,aAAa,EAAE,EAAE;QACjB,WAAW,EAAE,EAAE;QACf,eAAe,EAAE,EAAE;KACpB;CACF,CAAC;AAEF,MAAM,cAAe,SAAQ,iCAAkB;IAI7C;QACE,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,mBAAmB,GAAG,cAAc,CAAC,yBAAyB,CAAC;QACpE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC,mBAAmB,CAAC;QAC1D,IAAI,CAAC,WAAW,CACd,qBAAqB,EACrB,CAAC,WAAsC,EAAE,EAAE;YACzC,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,cAAc,CAAC;YAClD,IAAI,CAAC,mBAAmB,GAAG,WAAW,CAAC,kBAAkB,CAAC;QAC5D,CAAC,CACF,CAAC;IACJ,CAAC;IAED,WAAW,CACT,SAAgC,EAChC,QAA0D;QAE1D,OAAO,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAI,yBAAyB;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF;AAGY,QAAA,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n'use strict';\n\nimport {\n EmitterSubscription,\n NativeEventEmitter,\n NativeModules,\n} from 'react-native';\nimport {IHighContrastColors, IHighContrastChangedEvent} from './AppThemeTypes';\n\n// We previously gracefully handled importing AppTheme in the Jest environment.\n// Mock the NM until we have a coherent story for exporting our own Jest mocks,\n// or remove this API.\nconst NativeAppTheme = NativeModules.RTCAppTheme || {\n initialHighContrast: false,\n initialHighContrastColors: {\n ButtonFaceColor: '',\n ButtonTextColor: '',\n GrayTextColor: '',\n HighlightColor: '',\n HighlightTextColor: '',\n HotlightColor: '',\n WindowColor: '',\n WindowTextColor: '',\n },\n};\n\nclass AppThemeModule extends NativeEventEmitter {\n private _isHighContrast: boolean;\n private _highContrastColors: IHighContrastColors;\n\n constructor() {\n super();\n\n this._highContrastColors = NativeAppTheme.initialHighContrastColors;\n this._isHighContrast = NativeAppTheme.initialHighContrast;\n this.addListener(\n 'highContrastChanged',\n (nativeEvent: IHighContrastChangedEvent) => {\n this._isHighContrast = nativeEvent.isHighContrast;\n this._highContrastColors = nativeEvent.highContrastColors;\n },\n );\n }\n\n addListener(\n eventName: 'highContrastChanged',\n listener: (nativeEvent: IHighContrastChangedEvent) => void,\n ): EmitterSubscription {\n return super.addListener(eventName, listener);\n }\n\n get isHighContrast(): boolean {\n return this._isHighContrast;\n }\n\n get currentHighContrastColors(): IHighContrastColors {\n return this._highContrastColors;\n }\n}\n\nexport type AppTheme = AppThemeModule;\nexport const AppTheme = new AppThemeModule();\n"]}
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 66,
15
15
  patch: 0,
16
- prerelease: 'rc.1',
16
+ prerelease: null,
17
17
  };
@@ -143,6 +143,8 @@
143
143
  <SubSystem>Console</SubSystem>
144
144
  <GenerateWindowsMetadata>true</GenerateWindowsMetadata>
145
145
  <ModuleDefinitionFile>Microsoft.ReactNative.def</ModuleDefinitionFile>
146
+ <!-- #8824: The Hermes NuGet package adds itself to be linked, but we go through Hermes Shim instead. Ignore the unused DLL until using NuGet package with "HermesNoLink" -->
147
+ <AdditionalOptions>/IGNORE:4199</AdditionalOptions>
146
148
  </Link>
147
149
  <Midl>
148
150
  <AdditionalIncludeDirectories>$(ReactNativeWindowsDir)Microsoft.ReactNative\Views\cppwinrt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -781,7 +783,7 @@
781
783
  <Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.210312.4\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.210312.4\build\native\Microsoft.Windows.CppWinRT.targets')" />
782
784
  <Import Project="$(SolutionDir)packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets" Condition="Exists('$(SolutionDir)packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets')" />
783
785
  <Import Project="$(V8Package)\build\native\ReactNative.V8JSI.Windows.UWP.targets" Condition="Exists('$(V8Package)\build\native\ReactNative.V8JSI.Windows.UWP.targets') AND '$(UseV8)' == 'true'" />
784
- <Import Project="$(HermesPackage)\build\native\ReactNative.Hermes.Windows.targets" Condition="Exists('$(HermesPackage)\build\native\ReactNative.Hermes.Windows.targets') AND '$(IncludeHermes)' == 'true'" />
786
+ <Import Project="$(HermesPackage)\build\native\ReactNative.Hermes.Windows.targets" Condition="Exists('$(HermesPackage)\build\native\ReactNative.Hermes.Windows.targets')" />
785
787
  <Import Project="$(SolutionDir)\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets')" />
786
788
  <Import Project="$(SolutionDir)\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets')" />
787
789
  <Import Project="$(SolutionDir)\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" />
@@ -173,11 +173,9 @@ struct RootShadowNode final : public ShadowNodeBase {
173
173
  }
174
174
 
175
175
  void AddView(ShadowNode &child, int64_t index) override {
176
- auto panel(GetView().as<winrt::Panel>());
177
- if (panel != nullptr) {
178
- auto childView = static_cast<ShadowNodeBase &>(child).GetView().as<xaml::UIElement>();
179
- panel.Children().InsertAt(static_cast<uint32_t>(index), childView);
180
- }
176
+ auto panel(GetView().as<winrt::Microsoft::ReactNative::ReactRootView>());
177
+ winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->AddView(
178
+ static_cast<uint32_t>(index), static_cast<ShadowNodeBase &>(child).GetView().as<xaml::UIElement>());
181
179
  }
182
180
  };
183
181
 
@@ -67,9 +67,7 @@
67
67
  #include <Utils/UwpScriptStore.h>
68
68
  #endif
69
69
 
70
- #if defined(INCLUDE_HERMES)
71
70
  #include "HermesRuntimeHolder.h"
72
- #endif // INCLUDE_HERMES
73
71
 
74
72
  #if defined(USE_V8)
75
73
  #include <winrt/Windows.Storage.h>
@@ -429,12 +427,10 @@ void ReactInstanceWin::Initialize() noexcept {
429
427
 
430
428
  switch (m_options.JsiEngine()) {
431
429
  case JSIEngine::Hermes:
432
- #if defined(INCLUDE_HERMES)
433
430
  devSettings->jsiRuntimeHolder =
434
431
  std::make_shared<facebook::react::HermesRuntimeHolder>(devSettings, m_jsMessageThread.Load());
435
432
  devSettings->inlineSourceMap = false;
436
433
  break;
437
- #endif
438
434
  case JSIEngine::V8:
439
435
  #if defined(USE_V8)
440
436
  #ifndef CORE_ABI
@@ -337,9 +337,6 @@ void ReactRootView::ShowInstanceLoading() noexcept {
337
337
 
338
338
  void ReactRootView::EnsureFocusSafeHarbor() noexcept {
339
339
  if (!m_focusSafeHarbor) {
340
- // focus safe harbor is delayed to be inserted to the visual tree
341
- VerifyElseCrash(Children().Size() == 1);
342
-
343
340
  m_focusSafeHarbor = xaml::Controls::ContentControl{};
344
341
  m_focusSafeHarbor.Width(0.0);
345
342
  m_focusSafeHarbor.IsTabStop(false);
@@ -526,4 +523,32 @@ Windows::Foundation::Size ReactRootView::ArrangeOverride(Windows::Foundation::Si
526
523
  return finalSize;
527
524
  }
528
525
 
526
+ // Maps react-native's view of the root view to the actual UI
527
+ // react-native is unaware that there are non-RN elements within the ReactRootView
528
+ uint32_t ReactRootView::RNIndexToXamlIndex(uint32_t index) noexcept {
529
+ // If m_focusSafeHarbor exists, it should be at index 0
530
+ // m_xamlRootView is the next element, followed by any RN content.
531
+ #if DEBUG
532
+ uint32_t findIndex{0};
533
+ Assert(!m_focusSafeHarbor || Children().IndexOf(m_focusSafeHarbor, findIndex) && findIndex == 0);
534
+ Assert(Children().IndexOf(m_xamlRootView, findIndex) && findIndex == (m_focusSafeHarbor ? 1 : 0));
535
+ #endif
536
+
537
+ return index + (m_focusSafeHarbor ? 2 : 1);
538
+ }
539
+
540
+ void ReactRootView::AddView(uint32_t index, xaml::UIElement child) {
541
+ Children().InsertAt(RNIndexToXamlIndex(index), child);
542
+ }
543
+
544
+ void ReactRootView::RemoveAllChildren() {
545
+ const uint32_t numLeft = m_focusSafeHarbor ? 2 : 1;
546
+ while (Children().Size() > numLeft)
547
+ Children().RemoveAt(numLeft);
548
+ }
549
+
550
+ void ReactRootView::RemoveChildAt(uint32_t index) {
551
+ Children().RemoveAt(RNIndexToXamlIndex(index));
552
+ }
553
+
529
554
  } // namespace winrt::Microsoft::ReactNative::implementation
@@ -42,6 +42,11 @@ struct ReactRootView : ReactRootViewT<ReactRootView>, ::Microsoft::ReactNative::
42
42
 
43
43
  void ReloadView() noexcept;
44
44
 
45
+ // Used by RootViewManager
46
+ void AddView(uint32_t index, xaml::UIElement child);
47
+ void RemoveAllChildren();
48
+ void RemoveChildAt(uint32_t index);
49
+
45
50
  public: // IXamlRootView
46
51
  ::Microsoft::ReactNative::XamlView GetXamlView() const noexcept override;
47
52
 
@@ -98,6 +103,7 @@ struct ReactRootView : ReactRootViewT<ReactRootView>, ::Microsoft::ReactNative::
98
103
  // JS created children
99
104
  winrt::Grid m_xamlRootView{nullptr};
100
105
 
106
+ uint32_t RNIndexToXamlIndex(uint32_t index) noexcept;
101
107
  void UpdatePerspective();
102
108
  void UpdateRootViewInternal() noexcept;
103
109
  void ClearLoadingUI() noexcept;
@@ -4,7 +4,7 @@
4
4
  #define STRINGIZE(s) #s
5
5
 
6
6
  #ifdef RNW_PKG_VERSION_STR
7
- #define VER_FILEVERSION_STR STRINGIZE(RNW_PKG_VERSION_STR)
7
+ #define VER_FILEVERSION_STR XSTRINGIZE(RNW_PKG_VERSION_STR)
8
8
  #else
9
9
  #define VER_FILEVERSION_STR "Private Build"
10
10
  #endif
@@ -110,7 +110,6 @@ void DevMenuManager::CreateAndShowUI() noexcept {
110
110
  devMenu.FastRefreshText().Text(
111
111
  Mso::React::ReactOptions::UseFastRefresh(m_context->Properties()) ? L"Disable Fast Refresh"
112
112
  : L"Enable Fast Refresh");
113
-
114
113
  if (Mso::React::ReactOptions::JsiEngine(m_context->Properties()) == Mso::React::JSIEngine::Hermes) {
115
114
  devMenu.SamplingProfilerText().Text(
116
115
  !Microsoft::ReactNative::HermesSamplingProfiler::IsStarted() ? L"Start Hermes sampling profiler"
@@ -6,6 +6,7 @@
6
6
  #include "RootViewManager.h"
7
7
 
8
8
  #include <IXamlRootView.h>
9
+ #include <ReactRootView.h>
9
10
  #include <UI.Xaml.Controls.h>
10
11
 
11
12
  namespace winrt {
@@ -29,21 +30,19 @@ XamlView RootViewManager::CreateViewCore(int64_t /*tag*/, const winrt::Microsoft
29
30
  }
30
31
 
31
32
  void RootViewManager::AddView(const XamlView &parent, const XamlView &child, int64_t index) {
32
- auto panel(parent.as<winrt::Panel>());
33
- if (panel != nullptr)
34
- panel.Children().InsertAt(static_cast<uint32_t>(index), child.as<xaml::UIElement>());
33
+ // Goes through RootShadowNode::AddView instead of here
34
+ assert(false);
35
35
  }
36
36
 
37
37
  void RootViewManager::RemoveAllChildren(const XamlView &parent) {
38
- auto panel(parent.as<winrt::Panel>());
39
- if (panel != nullptr)
40
- panel.Children().Clear();
38
+ auto panel(parent.as<winrt::Microsoft::ReactNative::ReactRootView>());
39
+ winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->RemoveAllChildren();
41
40
  }
42
41
 
43
42
  void RootViewManager::RemoveChildAt(const XamlView &parent, int64_t index) {
44
- auto panel(parent.as<winrt::Panel>());
45
- if (panel != nullptr)
46
- panel.Children().RemoveAt(static_cast<uint32_t>(index));
43
+ auto panel(parent.as<winrt::Microsoft::ReactNative::ReactRootView>());
44
+ winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->RemoveChildAt(
45
+ static_cast<uint32_t>(index));
47
46
  }
48
47
 
49
48
  void RootViewManager::SetLayoutProps(
@@ -8,12 +8,9 @@
8
8
  <!-- Enabling this will (1) Include hermes glues in the Microsoft.ReactNative binaries AND (2) Make hermes the default engine -->
9
9
  <UseHermes Condition="'$(UseHermes)' == ''">false</UseHermes>
10
10
  <!-- This will be true if (1) the client want to use hermes by setting UseHermes to true OR (2) We are building for UWP where dynamic switching is enabled -->
11
- <IncludeHermes Condition="'$(IncludeHermes)' == '' And ('$(UseHermes)' == 'true' Or '$(ApplicationType)' == 'Windows Store')">true</IncludeHermes>
12
11
  <HermesVersion Condition="'$(HermesVersion)' == ''">0.9.0-ms.4</HermesVersion>
13
12
  <HermesPackage Condition="'$(HermesPackage)' == '' And Exists('$(PkgReactNative_Hermes_Windows)')">$(PkgReactNative_Hermes_Windows)</HermesPackage>
14
13
  <HermesPackage Condition="'$(HermesPackage)' == ''">$(SolutionDir)packages\ReactNative.Hermes.Windows.$(HermesVersion)</HermesPackage>
15
- <!-- TODO: Can we automatically distinguish between uwp and win32 here? -->
16
- <HermesArch Condition="'$(HermesArch)' == ''">uwp</HermesArch>
17
14
  <EnableHermesInspectorInReleaseFlavor Condition="'$(EnableHermesInspectorInReleaseFlavor)' == ''">false</EnableHermesInspectorInReleaseFlavor>
18
15
  <!-- Use Hermes bytecode bundles provided by metro hermes compiler when available -->
19
16
  <EnableDevServerHBCBundles Condition="'$(EnableDevServerHBCBundles)' == ''">false</EnableDevServerHBCBundles>
@@ -51,7 +51,6 @@
51
51
  <ItemDefinitionGroup>
52
52
  <ClCompile>
53
53
  <PreprocessorDefinitions Condition="'$(UseHermes)'=='true'">USE_HERMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
54
- <PreprocessorDefinitions Condition="'$(IncludeHermes)'=='true'">INCLUDE_HERMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
55
54
  <PreprocessorDefinitions Condition="'$(EnableDevServerHBCBundles)'=='true'">ENABLE_DEVSERVER_HBCBUNDLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
56
55
  <PreprocessorDefinitions Condition="'$(UseV8)'=='true'">USE_V8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
57
56
  <PreprocessorDefinitions Condition="'$(UseFabric)'=='true'">USE_FABRIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -8,7 +8,7 @@
8
8
  <_rnwFolder>$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(Native-Platform)\native\</_rnwFolder>
9
9
  </PropertyGroup>
10
10
 
11
- <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP'">
11
+ <ItemGroup>
12
12
  <Reference Include="$(MSBuildThisFileDirectory)..\..\lib\uap10.0\Microsoft.ReactNative.winmd" Private="false">
13
13
  <Implementation>Microsoft.ReactNative.dll</Implementation>
14
14
  </Reference>
@@ -28,10 +28,12 @@
28
28
  <file src="$nugetroot$\x64\Release\React.Windows.Desktop\Microsoft.ReactNative.winmd" target="lib\ship\x64"/>
29
29
  <file src="$nugetroot$\ARM64\Release\React.Windows.Desktop\Microsoft.ReactNative.winmd" target="lib\ship\ARM64"/>
30
30
 
31
- <file src="$nugetroot$\x86\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\x86" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
32
- <file src="$nugetroot$\x64\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\x64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
33
- <file src="$nugetroot$\x86\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\x86" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
34
- <file src="$nugetroot$\x64\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\x64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
31
+ <file src="$nugetroot$\x86\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\x86" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
32
+ <file src="$nugetroot$\x64\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\x64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
33
+ <file src="$nugetroot$\ARM64\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\ARM64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
34
+ <file src="$nugetroot$\x86\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\x86" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
35
+ <file src="$nugetroot$\x64\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\x64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
36
+ <file src="$nugetroot$\ARM64\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\ARM64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
35
37
 
36
38
  <file src="$nugetroot$\inc\callinvoker\ReactCommon\CallInvoker.h" target="inc\ReactCommon"/>
37
39
  <file src="$nugetroot$\inc\runtimeexecutor\ReactCommon\RuntimeExecutor.h" target="inc\ReactCommon"/>
@@ -14,12 +14,14 @@
14
14
  #include <hermes/hermes_dbg.h>
15
15
  #endif
16
16
  #include "HermesRuntimeHolder.h"
17
+ #include "HermesShim.h"
17
18
 
18
19
  #if defined(HERMES_ENABLE_DEBUGGER)
19
20
  #include <hermes/inspector/chrome/Registration.h>
20
21
  #endif
21
22
 
22
23
  using namespace facebook;
24
+ using namespace Microsoft::ReactNative;
23
25
 
24
26
  namespace facebook {
25
27
  namespace react {
@@ -29,7 +31,7 @@ namespace {
29
31
  std::unique_ptr<facebook::hermes::HermesRuntime> makeHermesRuntimeSystraced(
30
32
  const ::hermes::vm::RuntimeConfig &runtimeConfig) {
31
33
  SystraceSection s("HermesExecutorFactory::makeHermesRuntimeSystraced");
32
- return hermes::makeHermesRuntime(runtimeConfig);
34
+ return HermesShim::makeHermesRuntime(runtimeConfig);
33
35
  }
34
36
 
35
37
  #ifdef HERMES_ENABLE_DEBUGGER
@@ -15,6 +15,7 @@
15
15
  #endif
16
16
 
17
17
  #include "HermesSamplingProfiler.h"
18
+ #include "HermesShim.h"
18
19
 
19
20
  namespace Microsoft::ReactNative {
20
21
 
@@ -50,26 +51,24 @@ std::string HermesSamplingProfiler::GetLastTraceFilePath() noexcept {
50
51
  }
51
52
 
52
53
  winrt::fire_and_forget HermesSamplingProfiler::Start() noexcept {
53
- #ifdef INCLUDE_HERMES
54
54
  if (!s_isStarted) {
55
55
  s_isStarted = true;
56
56
  co_await winrt::resume_background();
57
- facebook::hermes::HermesRuntime::enableSamplingProfiler();
57
+ HermesShim::enableSamplingProfiler();
58
58
  }
59
- #endif
59
+
60
60
  co_return;
61
61
  }
62
62
 
63
63
  std::future<std::string> HermesSamplingProfiler::Stop() noexcept {
64
- #ifdef INCLUDE_HERMES
65
64
  if (s_isStarted) {
66
65
  s_isStarted = false;
67
66
  co_await winrt::resume_background();
68
- facebook::hermes::HermesRuntime::disableSamplingProfiler();
67
+ HermesShim::disableSamplingProfiler();
69
68
  s_lastTraceFilePath = co_await getTraceFilePath();
70
- facebook::hermes::HermesRuntime::dumpSampledTraceToFile(s_lastTraceFilePath);
69
+ HermesShim::dumpSampledTraceToFile(s_lastTraceFilePath);
71
70
  }
72
- #endif
71
+
73
72
  co_return s_lastTraceFilePath;
74
73
  }
75
74
 
@@ -0,0 +1,85 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ #include "HermesShim.h"
5
+ #include "Crash.h"
6
+
7
+ namespace Microsoft::ReactNative::HermesShim {
8
+
9
+ static HMODULE s_hermesModule{nullptr};
10
+ static decltype(&facebook::hermes::makeHermesRuntime) s_makeHermesRuntime{nullptr};
11
+ static decltype(&facebook::hermes::HermesRuntime::enableSamplingProfiler) s_enableSamplingProfiler{nullptr};
12
+ static decltype(&facebook::hermes::HermesRuntime::disableSamplingProfiler) s_disableSamplingProfiler{nullptr};
13
+ static decltype(&facebook::hermes::HermesRuntime::dumpSampledTraceToFile) s_dumpSampledTraceToFile{nullptr};
14
+
15
+ #if _M_X64
16
+ constexpr const char *makeHermesRuntimeSymbol =
17
+ "?makeHermesRuntime@hermes@facebook@@YA?AV?$unique_ptr@VHermesRuntime@hermes@facebook@@U?$default_delete@VHermesRuntime@hermes@facebook@@@std@@@std@@AEBVRuntimeConfig@vm@1@@Z";
18
+ constexpr const char *enableSamlingProfilerSymbol = "?enableSamplingProfiler@HermesRuntime@hermes@facebook@@SAXXZ";
19
+ constexpr const char *disableSamlingProfilerSymbol = "?disableSamplingProfiler@HermesRuntime@hermes@facebook@@SAXXZ";
20
+ constexpr const char *dumpSampledTraceToFileSymbol =
21
+ "?dumpSampledTraceToFile@HermesRuntime@hermes@facebook@@SAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z";
22
+ #endif
23
+
24
+ #if _M_ARM64
25
+ constexpr const char *makeHermesRuntimeSymbol =
26
+ "?makeHermesRuntime@hermes@facebook@@YA?AV?$unique_ptr@VHermesRuntime@hermes@facebook@@U?$default_delete@VHermesRuntime@hermes@facebook@@@std@@@std@@AEBVRuntimeConfig@vm@1@@Z";
27
+ constexpr const char *enableSamlingProfilerSymbol = "?enableSamplingProfiler@HermesRuntime@hermes@facebook@@SAXXZ";
28
+ constexpr const char *disableSamlingProfilerSymbol = "?disableSamplingProfiler@HermesRuntime@hermes@facebook@@SAXXZ";
29
+ constexpr const char *dumpSampledTraceToFileSymbol =
30
+ "?dumpSampledTraceToFile@HermesRuntime@hermes@facebook@@SAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z";
31
+ #endif
32
+
33
+ #if _M_IX86
34
+ constexpr const char *makeHermesRuntimeSymbol =
35
+ "?makeHermesRuntime@hermes@facebook@@YA?AV?$unique_ptr@VHermesRuntime@hermes@facebook@@U?$default_delete@VHermesRuntime@hermes@facebook@@@std@@@std@@ABVRuntimeConfig@vm@1@@Z";
36
+ constexpr const char *enableSamlingProfilerSymbol = "?enableSamplingProfiler@HermesRuntime@hermes@facebook@@SAXXZ";
37
+ constexpr const char *disableSamlingProfilerSymbol = "?disableSamplingProfiler@HermesRuntime@hermes@facebook@@SAXXZ";
38
+ constexpr const char *dumpSampledTraceToFileSymbol =
39
+ "?dumpSampledTraceToFile@HermesRuntime@hermes@facebook@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z";
40
+ #endif
41
+
42
+ static void EnsureHermesLoaded() noexcept {
43
+ if (!s_hermesModule) {
44
+ s_hermesModule = LoadLibrary(L"hermes.dll");
45
+ VerifyElseCrashSz(s_hermesModule, "Could not load \"hermes.dll\"");
46
+
47
+ s_makeHermesRuntime =
48
+ reinterpret_cast<decltype(s_makeHermesRuntime)>(GetProcAddress(s_hermesModule, makeHermesRuntimeSymbol));
49
+ VerifyElseCrash(s_makeHermesRuntime);
50
+
51
+ s_enableSamplingProfiler = reinterpret_cast<decltype(s_enableSamplingProfiler)>(
52
+ GetProcAddress(s_hermesModule, enableSamlingProfilerSymbol));
53
+ VerifyElseCrash(s_enableSamplingProfiler);
54
+
55
+ s_disableSamplingProfiler = reinterpret_cast<decltype(s_disableSamplingProfiler)>(
56
+ GetProcAddress(s_hermesModule, disableSamlingProfilerSymbol));
57
+ VerifyElseCrash(s_disableSamplingProfiler);
58
+
59
+ s_dumpSampledTraceToFile = reinterpret_cast<decltype(s_dumpSampledTraceToFile)>(
60
+ GetProcAddress(s_hermesModule, dumpSampledTraceToFileSymbol));
61
+ VerifyElseCrash(s_dumpSampledTraceToFile);
62
+ }
63
+ }
64
+
65
+ std::unique_ptr<facebook::hermes::HermesRuntime> makeHermesRuntime(const hermes::vm::RuntimeConfig &runtimeConfig) {
66
+ EnsureHermesLoaded();
67
+ return s_makeHermesRuntime(runtimeConfig);
68
+ }
69
+
70
+ void enableSamplingProfiler() {
71
+ EnsureHermesLoaded();
72
+ s_enableSamplingProfiler();
73
+ }
74
+
75
+ void disableSamplingProfiler() {
76
+ EnsureHermesLoaded();
77
+ s_disableSamplingProfiler();
78
+ }
79
+
80
+ void dumpSampledTraceToFile(const std::string &fileName) {
81
+ EnsureHermesLoaded();
82
+ s_dumpSampledTraceToFile(fileName);
83
+ }
84
+
85
+ } // namespace Microsoft::ReactNative::HermesShim
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ #pragma once
5
+
6
+ #include <hermes/hermes.h>
7
+
8
+ //! We do not package hermes.dll for projects that do not require it. We cannot
9
+ //! use pure delay-loading to achieve this, since WACK will detect the
10
+ //! non-present DLL. Functions in this namespace shim to the Hermes DLL via
11
+ //! GetProcAddress.
12
+ namespace Microsoft::ReactNative::HermesShim {
13
+
14
+ std::unique_ptr<facebook::hermes::HermesRuntime> makeHermesRuntime(const hermes::vm::RuntimeConfig &runtimeConfig);
15
+ void enableSamplingProfiler();
16
+ void disableSamplingProfiler();
17
+ void dumpSampledTraceToFile(const std::string &fileName);
18
+
19
+ } // namespace Microsoft::ReactNative::HermesShim
@@ -45,11 +45,9 @@
45
45
  #include <safeint.h>
46
46
  #include "PackagerConnection.h"
47
47
 
48
- #if defined(INCLUDE_HERMES)
49
48
  #include <hermes/BytecodeVersion.h>
50
-
51
49
  #include "HermesRuntimeHolder.h"
52
- #endif
50
+
53
51
  #if defined(USE_V8)
54
52
  #include <JSI/NapiJsiV8RuntimeHolder.h>
55
53
 
@@ -307,7 +305,8 @@ InstanceImpl::InstanceImpl(
307
305
  facebook::react::tracing::initializeETW();
308
306
  #endif
309
307
 
310
- if (m_devSettings->useDirectDebugger && !m_devSettings->useWebDebugger) {
308
+ if (m_devSettings->jsiEngineOverride == JSIEngineOverride::Hermes && m_devSettings->useDirectDebugger &&
309
+ !m_devSettings->useWebDebugger) {
311
310
  m_devManager->StartInspector(m_devSettings->sourceBundleHost, m_devSettings->sourceBundlePort);
312
311
  }
313
312
 
@@ -359,14 +358,9 @@ InstanceImpl::InstanceImpl(
359
358
  assert(m_devSettings->jsiEngineOverride != JSIEngineOverride::Default);
360
359
  switch (m_devSettings->jsiEngineOverride) {
361
360
  case JSIEngineOverride::Hermes:
362
- #if defined(INCLUDE_HERMES)
363
361
  m_devSettings->jsiRuntimeHolder = std::make_shared<HermesRuntimeHolder>(m_devSettings, m_jsThread);
364
362
  m_devSettings->inlineSourceMap = false;
365
363
  break;
366
- #else
367
- assert(false); // Hermes is not available in this build, fallthrough
368
- [[fallthrough]];
369
- #endif
370
364
  case JSIEngineOverride::V8: {
371
365
  #if defined(USE_V8)
372
366
  std::unique_ptr<facebook::jsi::ScriptStore> scriptStore = nullptr;
@@ -608,7 +602,9 @@ void InstanceImpl::loadBundleInternal(std::string &&jsBundleRelativePath, bool s
608
602
  }
609
603
 
610
604
  InstanceImpl::~InstanceImpl() {
611
- m_devManager->StopInspector();
605
+ if (m_devSettings->jsiEngineOverride == JSIEngineOverride::Hermes) {
606
+ m_devManager->StopInspector();
607
+ }
612
608
  m_nativeQueue->quitSynchronous();
613
609
  }
614
610
 
@@ -26,15 +26,10 @@
26
26
  <ClCompile Include="$(MSBuildThisFileDirectory)DevSupportManager.cpp" />
27
27
  <ClCompile Include="$(MSBuildThisFileDirectory)Executors\WebSocketJSExecutor.cpp" />
28
28
  <ClCompile Include="$(MSBuildThisFileDirectory)Executors\WebSocketJSExecutorFactory.cpp" />
29
- <ClCompile Include="$(MSBuildThisFileDirectory)HermesRuntimeHolder.cpp">
30
- <ExcludedFromBuild Condition="'$(IncludeHermes)' != 'true'">true</ExcludedFromBuild>
31
- </ClCompile>
32
- <ClCompile Include="$(MSBuildThisFileDirectory)HermesSamplingProfiler.cpp">
33
- <ExcludedFromBuild Condition="'$(IncludeHermes)' != 'true'">true</ExcludedFromBuild>
34
- </ClCompile>
35
- <ClCompile Include="$(MSBuildThisFileDirectory)InspectorPackagerConnection.cpp">
36
- <ExcludedFromBuild Condition="'$(IncludeHermes)' != 'true'">true</ExcludedFromBuild>
37
- </ClCompile>
29
+ <ClCompile Include="$(MSBuildThisFileDirectory)HermesRuntimeHolder.cpp" />
30
+ <ClCompile Include="$(MSBuildThisFileDirectory)HermesSamplingProfiler.cpp" />
31
+ <ClCompile Include="$(MSBuildThisFileDirectory)HermesShim.cpp" />
32
+ <ClCompile Include="$(MSBuildThisFileDirectory)InspectorPackagerConnection.cpp" />
38
33
  <ClCompile Include="$(MSBuildThisFileDirectory)InstanceManager.cpp" />
39
34
  <ClCompile Include="$(MSBuildThisFileDirectory)JSBigAbiString.cpp" />
40
35
  <ClCompile Include="$(MSBuildThisFileDirectory)JSI\ChakraApi.cpp" />
@@ -79,6 +74,7 @@
79
74
  <ClInclude Include="$(MSBuildThisFileDirectory)AsyncStorage\FollyDynamicConverter.h" />
80
75
  <ClInclude Include="$(MSBuildThisFileDirectory)AsyncStorage\KeyValueStorage.h" />
81
76
  <ClInclude Include="$(MSBuildThisFileDirectory)HermesSamplingProfiler.h" />
77
+ <ClInclude Include="$(MSBuildThisFileDirectory)HermesShim.h" />
82
78
  <ClInclude Include="$(MSBuildThisFileDirectory)JSI\ByteArrayBuffer.h" />
83
79
  <ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraApi.h" />
84
80
  <ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraCoreRuntime.h" />
@@ -130,6 +130,9 @@
130
130
  <ClCompile Include="$(MSBuildThisFileDirectory)HermesSamplingProfiler.cpp">
131
131
  <Filter>Source Files</Filter>
132
132
  </ClCompile>
133
+ <ClCompile Include="$(MSBuildThisFileDirectory)HermesShim.cpp">
134
+ <Filter>Source Files</Filter>
135
+ </ClCompile>
133
136
  </ItemGroup>
134
137
  <ItemGroup>
135
138
  <Filter Include="Source Files">
@@ -378,6 +381,9 @@
378
381
  <ClInclude Include="$(MSBuildThisFileDirectory)HermesSamplingProfiler.h">
379
382
  <Filter>Header Files</Filter>
380
383
  </ClInclude>
384
+ <ClInclude Include="$(MSBuildThisFileDirectory)HermesShim.h">
385
+ <Filter>Header Files</Filter>
386
+ </ClInclude>
381
387
  </ItemGroup>
382
388
  <ItemGroup>
383
389
  <None Include="$(MSBuildThisFileDirectory)tracing\rnw.wprp">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.66.0-preview.6",
3
+ "version": "0.66.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,8 +26,8 @@
26
26
  "@react-native-community/cli": "^6.0.0",
27
27
  "@react-native-community/cli-platform-android": "^6.0.0",
28
28
  "@react-native-community/cli-platform-ios": "^6.0.0",
29
- "@react-native-windows/cli": "0.66.0-preview.2",
30
- "@react-native-windows/virtualized-list": "0.66.0-preview.1",
29
+ "@react-native-windows/cli": "0.66.0",
30
+ "@react-native-windows/virtualized-list": "0.66.0",
31
31
  "@react-native/assets": "1.0.0",
32
32
  "@react-native/normalize-color": "1.0.0",
33
33
  "@react-native/polyfills": "2.0.0",
@@ -35,7 +35,7 @@
35
35
  "anser": "^1.4.9",
36
36
  "base64-js": "^1.1.2",
37
37
  "event-target-shim": "^5.0.1",
38
- "hermes-engine": "~0.8.0",
38
+ "hermes-engine": "~0.9.0",
39
39
  "invariant": "^2.2.4",
40
40
  "jsc-android": "^250230.2.1",
41
41
  "metro-babel-register": "0.66.2",
@@ -58,7 +58,7 @@
58
58
  "ws": "^6.1.4"
59
59
  },
60
60
  "devDependencies": {
61
- "@react-native-windows/codegen": "0.66.0-preview.1",
61
+ "@react-native-windows/codegen": "0.66.0",
62
62
  "@rnw-scripts/eslint-config": "1.1.7",
63
63
  "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.0.1",
64
64
  "@rnx-kit/jest-preset": "^0.1.0",
@@ -73,7 +73,7 @@
73
73
  "metro-config": "^0.66.0",
74
74
  "prettier": "1.19.1",
75
75
  "react": "17.0.2",
76
- "react-native": "0.66.0-rc.1",
76
+ "react-native": "0.66.0",
77
77
  "react-native-platform-override": "^1.4.17",
78
78
  "react-refresh": "^0.4.0",
79
79
  "react-shallow-renderer": "16.14.1",
@@ -81,15 +81,15 @@
81
81
  },
82
82
  "peerDependencies": {
83
83
  "react": "17.0.2",
84
- "react-native": "0.66.0-rc.1"
84
+ "react-native": "^0.66.0"
85
85
  },
86
86
  "beachball": {
87
- "defaultNpmTag": "preview",
87
+ "defaultNpmTag": "latest",
88
88
  "gitTags": true,
89
89
  "disallowedChangeTypes": [
90
90
  "major",
91
91
  "minor",
92
- "patch"
92
+ "prerelease"
93
93
  ]
94
94
  },
95
95
  "files": [
@@ -4,9 +4,14 @@
4
4
  *
5
5
  * @format
6
6
  */
7
+ const fs = require('fs');
7
8
  const path = require('path');
8
9
  const exclusionList = require('metro-config/src/defaults/exclusionList');
9
10
 
11
+ const rnwPath = fs.realpathSync(
12
+ path.resolve(require.resolve('react-native-windows/package.json'), '..'),
13
+ );
14
+
10
15
  module.exports = {
11
16
  resolver: {
12
17
  blockList: exclusionList([
@@ -14,7 +19,9 @@ module.exports = {
14
19
  new RegExp(
15
20
  `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
16
21
  ),
17
- // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip
22
+ // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
23
+ new RegExp(`${rnwPath}/build/.*`),
24
+ new RegExp(`${rnwPath}/target/.*`),
18
25
  /.*\.ProjectImports\.zip/,
19
26
  ]),
20
27
  },
@@ -34,7 +34,9 @@ module.exports = {
34
34
  new RegExp(
35
35
  `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
36
36
  ),
37
- // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip
37
+ // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
38
+ new RegExp(`${rnwPath}/build/.*`),
39
+ new RegExp(`${rnwPath}/target/.*`),
38
40
  /.*\.ProjectImports\.zip/,
39
41
  ]),
40
42
  },