react-native-windows 0.72.0-preview.6 → 0.72.0-preview.8

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.
Files changed (55) hide show
  1. package/Directory.Build.props +27 -21
  2. package/Microsoft.ReactNative/IReactContext.cpp +4 -0
  3. package/Microsoft.ReactNative/IReactContext.h +1 -0
  4. package/Microsoft.ReactNative/IReactContext.idl +6 -0
  5. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -4
  6. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +2 -57
  7. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +7 -0
  8. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +1 -0
  9. package/Microsoft.ReactNative/ReactHost/React.h +2 -0
  10. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +27 -17
  11. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -2
  12. package/Microsoft.ReactNative/ReactInstanceSettings.h +13 -0
  13. package/Microsoft.ReactNative/ReactInstanceSettings.idl +4 -0
  14. package/Microsoft.ReactNative/ReactNativeHost.cpp +1 -0
  15. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiLoader.cpp +16 -0
  16. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +41 -12
  17. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +17 -6
  18. package/Microsoft.ReactNative.Managed/ReactSettingsSnapshot.cs +2 -0
  19. package/Microsoft.ReactNative.Managed/packages.lock.json +6 -6
  20. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +1 -1
  21. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +1 -1
  22. package/PropertySheets/External/Microsoft.ReactNative.WinAppSDK.CSharpApp.targets +1 -1
  23. package/PropertySheets/Generated/PackageVersion.g.props +2 -2
  24. package/PropertySheets/JSEngine.props +4 -4
  25. package/PropertySheets/NuGet.Cpp.props +3 -2
  26. package/PropertySheets/Warnings.props +6 -0
  27. package/ReactCommon/ReactCommon.vcxproj +53 -1
  28. package/ReactCommon/cgmanifest.json +15 -0
  29. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +36 -0
  30. package/Shared/DevSettings.h +3 -0
  31. package/Shared/DevSupportManager.cpp +2 -9
  32. package/Shared/DevSupportManager.h +2 -6
  33. package/Shared/HermesRuntimeHolder.cpp +318 -81
  34. package/Shared/HermesRuntimeHolder.h +15 -19
  35. package/Shared/HermesSamplingProfiler.cpp +5 -6
  36. package/Shared/InspectorPackagerConnection.cpp +62 -108
  37. package/Shared/InspectorPackagerConnection.h +9 -21
  38. package/Shared/JSI/ScriptStore.h +18 -20
  39. package/Shared/JSI/V8RuntimeHolder.cpp +262 -0
  40. package/Shared/JSI/V8RuntimeHolder.h +37 -0
  41. package/Shared/OInstance.cpp +20 -40
  42. package/Shared/SafeLoadLibrary.cpp +41 -0
  43. package/Shared/SafeLoadLibrary.h +15 -0
  44. package/Shared/Shared.vcxitems +21 -10
  45. package/Shared/Shared.vcxitems.filters +23 -30
  46. package/package.json +2 -2
  47. package/template/cs-app-WinAppSDK/proj/ExperimentalFeatures.props +1 -1
  48. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +0 -2105
  49. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.h +0 -73
  50. package/Shared/HermesShim.cpp +0 -122
  51. package/Shared/HermesShim.h +0 -41
  52. package/Shared/JSI/NapiJsiV8RuntimeHolder.cpp +0 -209
  53. package/Shared/JSI/NapiJsiV8RuntimeHolder.h +0 -46
  54. package/Shared/V8JSIRuntimeHolder.cpp +0 -71
  55. package/Shared/V8JSIRuntimeHolder.h +0 -58
@@ -34,6 +34,11 @@
34
34
  "resolved": "1.0.0",
35
35
  "contentHash": "z2fpmmt+1Jfl+ZnBki9nSP08S1/tbEOxFdsK1rSR+LBehIJz1Xv9/6qOOoGNqlwnAGGVGis1Oj6S8Kt9COEYlQ=="
36
36
  },
37
+ "Microsoft.JavaScript.Hermes": {
38
+ "type": "Transitive",
39
+ "resolved": "0.1.15",
40
+ "contentHash": "My/u5RvxoymtwWokoweU6iVpuP79w271UjadcmSNqnQ9ESIv00tlVP4sHnIiN3t2lJNDeciyE1EVF4swGPECKQ=="
41
+ },
37
42
  "Microsoft.Net.Native.Compiler": {
38
43
  "type": "Transitive",
39
44
  "resolved": "2.2.7-rel-27913-00",
@@ -91,11 +96,6 @@
91
96
  "Microsoft.NETCore.Platforms": "1.1.0"
92
97
  }
93
98
  },
94
- "ReactNative.Hermes.Windows": {
95
- "type": "Transitive",
96
- "resolved": "0.0.0-2302.1001-19052299",
97
- "contentHash": "XL7czD9ZzeuXq+t/1vmbOSC3GYkdhxAAKmfiFuH1NdxLvwtJKOBeN7ep9ihA7n1K/cZubCBYmiuSAJByP/BY7g=="
98
- },
99
99
  "runtime.win10-arm.Microsoft.Net.Native.Compiler": {
100
100
  "type": "Transitive",
101
101
  "resolved": "2.2.7-rel-27913-00",
@@ -181,10 +181,10 @@
181
181
  "dependencies": {
182
182
  "Common": "[1.0.0, )",
183
183
  "Folly": "[1.0.0, )",
184
+ "Microsoft.JavaScript.Hermes": "[0.1.15, )",
184
185
  "Microsoft.UI.Xaml": "[2.8.0, )",
185
186
  "Microsoft.Windows.SDK.BuildTools": "[10.0.22000.194, )",
186
187
  "ReactCommon": "[1.0.0, )",
187
- "ReactNative.Hermes.Windows": "[0.0.0-2302.1001-19052299, )",
188
188
  "boost": "[1.76.0, )"
189
189
  }
190
190
  },
@@ -19,7 +19,7 @@
19
19
  <!-- WinUI package name and version are set by WinUI.props -->
20
20
  <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
21
21
  <!-- Hermes version is set by JSEngine.props -->
22
- <PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" Condition="$(UseHermes)" />
22
+ <PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" Condition="$(UseHermes)" />
23
23
  </ItemGroup>
24
24
 
25
25
  <Import Project="$(ReactNativeWindowsDir)PropertySheets\ManagedCodeGen\Microsoft.ReactNative.Managed.CodeGen.targets"
@@ -19,7 +19,7 @@
19
19
  <!-- WinUI package name and version are set by WinUI.props -->
20
20
  <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
21
21
  <!-- Hermes version is set by JSEngine.props -->
22
- <PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" Condition="$(UseHermes)" />
22
+ <PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" Condition="$(UseHermes)" />
23
23
  </ItemGroup>
24
24
 
25
25
  <!-- The props file for bundling is not set up to be just defaults, it assumes to be run at the end of the project. -->
@@ -24,7 +24,7 @@
24
24
  <!-- WinUI package name and version are set by WinUI.props -->
25
25
  <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
26
26
  <!-- Hermes version is set by JSEngine.props -->
27
- <PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" Condition="$(UseHermes)" />
27
+ <PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" Condition="$(UseHermes)" />
28
28
  </ItemGroup>
29
29
 
30
30
  <!-- Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.72.0-preview.6</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.72.0-preview.8</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>72</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>b9a2d51896667aadcd9a7c497631ca96fe0d1ca4</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>258dc53b8d2868b1889441ddff63f7238de5f7dc</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -14,9 +14,9 @@
14
14
  <!-- Enabling this will (1) Include hermes glues in the Microsoft.ReactNative binaries AND (2) Make hermes the default engine -->
15
15
  <UseHermes Condition="'$(UseHermes)' == ''">false</UseHermes>
16
16
  <!-- 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 -->
17
- <HermesVersion Condition="'$(HermesVersion)' == ''">0.0.0-2302.1002-2d4bf1df</HermesVersion>
18
- <HermesPackage Condition="'$(HermesPackage)' == '' And Exists('$(PkgReactNative_Hermes_Windows)')">$(PkgReactNative_Hermes_Windows)</HermesPackage>
19
- <HermesPackage Condition="'$(HermesPackage)' == ''">$(NuGetPackageRoot)\ReactNative.Hermes.Windows\$(HermesVersion)</HermesPackage>
17
+ <HermesVersion Condition="'$(HermesVersion)' == ''">0.1.15</HermesVersion>
18
+ <HermesPackage Condition="'$(HermesPackage)' == '' And Exists('$(PkgMicrosoft_JavaScript_Hermes)')">$(PkgMicrosoft_JavaScript_Hermes)</HermesPackage>
19
+ <HermesPackage Condition="'$(HermesPackage)' == ''">$(NuGetPackageRoot)\Microsoft.JavaScript.Hermes\$(HermesVersion)</HermesPackage>
20
20
  <EnableHermesInspectorInReleaseFlavor Condition="'$(EnableHermesInspectorInReleaseFlavor)' == ''">false</EnableHermesInspectorInReleaseFlavor>
21
21
  <!-- Disable linking Hermes into the output in cases where we need to fully rely on HermesShim -->
22
22
  <HermesNoLink Condition="'$(HermesNoLink)' == '' and '$(Configuration)' == 'Release' and '$(EnableHermesInspectorInReleaseFlavor)' != 'true'">true</HermesNoLink>
@@ -24,7 +24,7 @@
24
24
  <EnableDevServerHBCBundles Condition="'$(EnableDevServerHBCBundles)' == ''">false</EnableDevServerHBCBundles>
25
25
 
26
26
  <UseV8 Condition="'$(UseV8)' == ''">false</UseV8>
27
- <V8Version Condition="'$(V8Version)' == ''">0.71.3</V8Version>
27
+ <V8Version Condition="'$(V8Version)' == ''">0.71.5</V8Version>
28
28
  <V8PackageName>ReactNative.V8Jsi.Windows</V8PackageName>
29
29
  <V8PackageName Condition="'$(V8AppPlatform)' != 'win32'">$(V8PackageName).UWP</V8PackageName>
30
30
  </PropertyGroup>
@@ -9,8 +9,9 @@
9
9
 
10
10
  <PropertyGroup Label="NuGet">
11
11
  <!-- Should match entry in $(ReactNativeWindowsDir)vnext\Directory.Build.props -->
12
- <!--See https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#restore-target-->
13
- <RestoreUseStaticGraphEvaluation Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(DisableRestoreUseStaticGraphEvaluation)' != 'true'">true</RestoreUseStaticGraphEvaluation>
12
+ <!-- See https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#restore-target -->
13
+ <!-- RestoreUseStaticGraphEvaluation broke in VS 17.6, see https://github.com/microsoft/react-native-windows/issues/11670 -->
14
+ <RestoreUseStaticGraphEvaluation Condition="'$(BuildingInsideVisualStudio)' == 'true' AND $([MSBuild]::VersionLessThan('$(MSBuildVersion)', '17.6')) AND '$(DisableRestoreUseStaticGraphEvaluation)' != 'true'">true</RestoreUseStaticGraphEvaluation>
14
15
 
15
16
  <!-- Ensure PackageReference compatibility for any consuming projects/apps -->
16
17
  <ResolveNuGetPackages>false</ResolveNuGetPackages>
@@ -34,6 +34,12 @@
34
34
  <TreatWarningAsError>true</TreatWarningAsError>
35
35
  <WarningLevel>Level4</WarningLevel>
36
36
  </ClCompile>
37
+ <Link>
38
+ <!--
39
+ LNK4199: /DELAYLOAD:v8jsi.dll ignored; no imports found from v8jsi.dll
40
+ -->
41
+ <AdditionalOptions>/ignore:4199 %(AdditionalOptions)</AdditionalOptions>
42
+ </Link>
37
43
  </ItemDefinitionGroup>
38
44
 
39
45
  </Project>
@@ -106,6 +106,7 @@
106
106
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\cxxreact\SystraceSection.h" />
107
107
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsiexecutor\jsireact\JSIExecutor.h" />
108
108
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsiexecutor\jsireact\JSINativeModules.h" />
109
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsinspector\InspectorInterfaces.h" />
109
110
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.h" />
110
111
  <ClInclude Include="$(YogaDir)\yoga\YGEnums.h" />
111
112
  <ClInclude Include="$(YogaDir)\yoga\YGMacros.h" />
@@ -127,6 +128,7 @@
127
128
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\jsi\jsi\JSIDynamic.cpp" />
128
129
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\jsiexecutor\jsireact\JSIExecutor.cpp" />
129
130
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\jsiexecutor\jsireact\JSINativeModules.cpp" />
131
+ <ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector\InspectorInterfaces.cpp" />
130
132
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.cpp" />
131
133
  <CLCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\BridgeNativeModulePerfLogger.cpp" />
132
134
  <ClCompile Include="$(YogaDir)\yoga\log.cpp" />
@@ -176,6 +178,52 @@
176
178
  <ItemGroup>
177
179
  <PackageReference Include="boost" Version="1.76.0.0" />
178
180
  </ItemGroup>
181
+ <PropertyGroup>
182
+ <NodeApiJsiZipDir>$(NodeApiJsiDir)..\.node-api-jsi-zip</NodeApiJsiZipDir>
183
+ <NodeApiJsiZipFile>$(NodeApiJsiZipDir)\node-api-jsi-$(NodeApiJsiCommitHash).zip</NodeApiJsiZipFile>
184
+ <CGManifestFile>$(MSBuildThisFileDirectory)cgmanifest.json</CGManifestFile>
185
+ </PropertyGroup>
186
+ <Target Name="DownloadNodeApiJsi" BeforeTargets="PrepareForBuild" Inputs="$(NodeApiJsiZipFile)" Outputs="$(NodeApiJsiZipFile)">
187
+ <Message Text="Downloading node-api-jsi..." Importance="High" />
188
+ <DownloadFile
189
+ SourceUrl="https://github.com/microsoft/node-api-jsi/archive/$(NodeApiJsiCommitHash).zip"
190
+ DestinationFileName="$(NodeApiJsiZipFile)"
191
+ DestinationFolder="$(NodeApiJsiZipDir)"
192
+ Retries="10" />
193
+ </Target>
194
+ <Target Name="UnzipNodeApiJsi" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadNodeApiJsi">
195
+ <Message Text="Unzipping node-api-jsi to $([MSBuild]::NormalizePath($(NodeApiJsiDir)..))." Importance="High"
196
+ Condition="!Exists('$(NodeApiJsiDir)src\NodeApiJsiRuntime.h')" />
197
+ <Unzip
198
+ Condition="!Exists('$(NodeApiJsiDir)src\NodeApiJsiRuntime.h')"
199
+ SourceFiles="$(NodeApiJsiZipFile)"
200
+ DestinationFolder="$([MSBuild]::NormalizePath($(NodeApiJsiDir)..))"
201
+ OverwriteReadOnlyFiles="true" />
202
+ </Target>
203
+ <Target Name="WriteCGManifest" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadNodeApiJsi" Inputs="$(NodeApiJsiZipFile)" Outputs="$(CGManifestFile)">
204
+ <PropertyGroup>
205
+ <CGManifestText>{
206
+ "$schema": "https://json.schemastore.org/component-detection-manifest.json",
207
+ "Registrations": [
208
+ {
209
+ "Component": {
210
+ "Type": "git",
211
+ "Git": {
212
+ "RepositoryUrl": "https://github.com/microsoft/node-api-jsi",
213
+ "CommitHash": "$(NodeApiJsiCommitHash)"
214
+ }
215
+ },
216
+ "DevelopmentDependency": false
217
+ }
218
+ ]
219
+ }</CGManifestText>
220
+ </PropertyGroup>
221
+ <Message Text="Generating $(CGManifestFile)." Importance="High" />
222
+ <WriteLinesToFile
223
+ File="$(CGManifestFile)"
224
+ Overwrite="true"
225
+ Lines="$(CGManifestText)" />
226
+ </Target>
179
227
  <Target Name="EnsureNodeModuleBuildImports" BeforeTargets="PrepareForBuild">
180
228
  <Error Condition="!Exists('$(ReactNativeDir)')" Text="This project references code in the node_modules folder that is missing on this computer. Use `yarn install` to download them." />
181
229
  <Error Condition="!Exists('$(YogaDir)')" Text="This project references code in the node_modules folder that is missing on this computer. Use `yarn install` to download them." />
@@ -185,7 +233,11 @@
185
233
  </ItemGroup>
186
234
  <Target Name="Deploy" />
187
235
  <!-- Reenable this task if we need to temporarily replace any folly files for fixes, while we wait for PRs to land in folly -->
188
- <Target Name="ApplyReactCommonTemporaryPatch" BeforeTargets="PrepareForBuild">
236
+ <Target Name="ApplyReactCommonTemporaryPatch" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipNodeApiJsi">
237
+ <ItemGroup>
238
+ <NodeApiJsiFiles Include="$([MSBuild]::NormalizePath($(NodeApiJsiDir)..))\jsi\**\*.*" />
239
+ </ItemGroup>
240
+ <Copy DestinationFiles="@(NodeApiJsiFiles->'$(ReactNativeDir)\ReactCommon\jsi\%(RecursiveDir)%(Filename)%(Extension)')" SourceFiles="@(NodeApiJsiFiles)" />
189
241
  <Copy DestinationFiles="@(TemporaryReactCommonPatchFiles->'$(ReactNativeDir)\ReactCommon\%(RecursiveDir)%(Filename)%(Extension)')" SourceFiles="@(TemporaryReactCommonPatchFiles)" />
190
242
  </Target>
191
243
  </Project>
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/component-detection-manifest.json",
3
+ "Registrations": [
4
+ {
5
+ "Component": {
6
+ "Type": "git",
7
+ "Git": {
8
+ "RepositoryUrl": "https://github.com/microsoft/node-api-jsi",
9
+ "CommitHash": "53b897b03c1c7e57c3372acc6234447a44e150d6"
10
+ }
11
+ },
12
+ "DevelopmentDependency": false
13
+ }
14
+ ]
15
+ }
@@ -15,6 +15,23 @@ Write-Host "Destination root: [$TargetRoot]"
15
15
  Write-Host "React Native root: [$ReactNativeRoot]"
16
16
  Write-Host "ReactCommon Override root: [$ReactCommonOverrideRoot]"
17
17
 
18
+ [xml]$props = gc $PSScriptRoot\..\..\Directory.Build.props
19
+ [string] $NodeApiJsiCommitHash = $props.Project.PropertyGroup.NodeApiJsiCommitHash;
20
+ $NodeApiJsiCommitHash = $NodeApiJsiCommitHash.Trim()
21
+ $NodeApiJsiRoot = "$SourceRoot\node_modules\.node-api-jsi\node-api-jsi-${NodeApiJsiCommitHash}";
22
+ Write-Host "Node-API JSI root: [$NodeApiJsiRoot]"
23
+
24
+ # Download Node-API JSI if running on a machine which hasn't run native build logic to acquire it
25
+ if (!(Test-Path $NodeApiJsiRoot)) {
26
+ Write-Host "Downloading Node-API JSI $NodeApiJsiCommitHash"
27
+ $NodeApiJsiZip = "$SourceRoot\node_modules\.node-api-jsi\node-api-jsi-${NodeApiJsiCommitHash}.zip"
28
+ $NodeApiJsiDest = "$SourceRoot\node_modules\.node-api-jsi"
29
+
30
+ New-Item $NodeApiJsiRoot -ItemType Directory
31
+ Invoke-RestMethod -Uri "https://github.com/microsoft/node-api-jsi/archive/${NodeApiJsiCommitHash}.zip" -OutFile $NodeApiJsiZip
32
+ Expand-Archive -LiteralPath $NodeApiJsiZip -DestinationPath $NodeApiJsiDest
33
+ }
34
+
18
35
  md -Force $TargetRoot
19
36
 
20
37
  $patterns = $Extensions| ForEach-Object {"*.$_"}
@@ -39,6 +56,25 @@ Copy-Item -Force -Path $ReactNativeRoot\ReactCommon\jsi\jsi\jsi.h -Destination $
39
56
  Copy-Item -Force -Path $ReactNativeRoot\ReactCommon\jsi\jsi\jsi-inl.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\jsi\
40
57
  Copy-Item -Force -Path $ReactNativeRoot\ReactCommon\jsi\jsi\threadsafe.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\jsi\
41
58
 
59
+ # Microsoft.ReactNative.CXX project Node-API files
60
+ New-Item $TargetRoot\Microsoft.ReactNative.Cxx\node-api -ItemType Directory -Force
61
+ Copy-Item -Force -Path $NodeApiJsiRoot\node-api\js_native_api.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
62
+ Copy-Item -Force -Path $NodeApiJsiRoot\node-api\js_native_api_types.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
63
+ Copy-Item -Force -Path $NodeApiJsiRoot\node-api\js_runtime_api.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
64
+
65
+ # Microsoft.ReactNative.CXX project Node-API JSI files
66
+ New-Item $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders -ItemType Directory -Force
67
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\JSRuntimeApi.cpp -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
68
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\JSRuntimeApi.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
69
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\JSRuntimeApi.inc -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
70
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\NodeApi.cpp -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
71
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\NodeApi.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
72
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\NodeApi.inc -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
73
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\NodeApi_posix.cpp -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
74
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\ApiLoaders\NodeApi_win.cpp -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders\
75
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\NodeApiJsiRuntime.cpp -Destination $TargetRoot\Microsoft.ReactNative.Cxx\
76
+ Copy-Item -Force -Path $NodeApiJsiRoot\src\NodeApiJsiRuntime.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\
77
+
42
78
  # Microsoft.ReactNative.CXX project TurboModule files
43
79
  New-Item -ItemType Directory -Path $TargetRoot\Microsoft.ReactNative.Cxx\ReactCommon -Force
44
80
  Copy-Item -Force -Path $ReactNativeRoot\ReactCommon\callinvoker\ReactCommon\CallInvoker.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\ReactCommon\
@@ -95,6 +95,9 @@ struct DevSettings {
95
95
 
96
96
  bool inlineSourceMap{true};
97
97
 
98
+ // When querying the bundle server for a bundle, should it request the dev bundle or release bundle
99
+ bool devBundle{true};
100
+
98
101
  bool enableDefaultCrashHandler{false};
99
102
  };
100
103
 
@@ -21,10 +21,8 @@
21
21
  #include <winrt/Windows.Web.Http.Headers.h>
22
22
  #include <winrt/Windows.Web.Http.h>
23
23
 
24
- #ifdef HERMES_ENABLE_DEBUGGER
25
24
  #include <winrt/Windows.ApplicationModel.Activation.h>
26
25
  #include <winrt/Windows.Networking.Connectivity.h>
27
- #endif
28
26
 
29
27
  #pragma warning(push)
30
28
  #pragma warning(disable : 4068 4251 4101 4804 4309)
@@ -243,7 +241,6 @@ void DevSupportManager::StopPollingLiveReload() {
243
241
  void DevSupportManager::EnsureHermesInspector(
244
242
  [[maybe_unused]] const std::string &packagerHost,
245
243
  [[maybe_unused]] const uint16_t packagerPort) noexcept {
246
- #ifdef HERMES_ENABLE_DEBUGGER
247
244
  static std::once_flag once;
248
245
  std::call_once(once, [this, &packagerHost, packagerPort]() {
249
246
  // TODO: should we use the bundleAppId as the app param if available?
@@ -266,14 +263,10 @@ void DevSupportManager::EnsureHermesInspector(
266
263
  m_BundleStatusProvider);
267
264
  m_inspectorPackagerConnection->connectAsync();
268
265
  });
269
-
270
- #endif
271
266
  }
272
267
 
273
- void DevSupportManager::UpdateBundleStatus(bool isLastDownloadSucess, int64_t updateTimestamp) noexcept {
274
- #ifdef HERMES_ENABLE_DEBUGGER
275
- m_BundleStatusProvider->updateBundleStatus(isLastDownloadSucess, updateTimestamp);
276
- #endif
268
+ void DevSupportManager::UpdateBundleStatus(bool isLastDownloadSuccess, int64_t updateTimestamp) noexcept {
269
+ m_BundleStatusProvider->updateBundleStatus(isLastDownloadSuccess, updateTimestamp);
277
270
  }
278
271
 
279
272
  std::pair<std::string, bool> GetJavaScriptFromServer(
@@ -14,9 +14,7 @@
14
14
  #include <memory>
15
15
  #include <string>
16
16
 
17
- #if defined(HERMES_ENABLE_DEBUGGER)
18
17
  #include <InspectorPackagerConnection.h>
19
- #endif
20
18
 
21
19
  namespace facebook {
22
20
  namespace react {
@@ -57,7 +55,6 @@ class DevSupportManager final : public facebook::react::IDevSupportManager {
57
55
  private:
58
56
  std::atomic_bool m_cancellation_token;
59
57
 
60
- #if defined(HERMES_ENABLE_DEBUGGER)
61
58
  std::shared_ptr<InspectorPackagerConnection> m_inspectorPackagerConnection;
62
59
 
63
60
  struct BundleStatusProvider : public InspectorPackagerConnection::IBundleStatusProvider {
@@ -65,8 +62,8 @@ class DevSupportManager final : public facebook::react::IDevSupportManager {
65
62
  return m_bundleStatus;
66
63
  }
67
64
 
68
- void updateBundleStatus(bool isLastDownloadSucess, int64_t updateTimestamp) {
69
- m_bundleStatus.m_isLastDownloadSucess = isLastDownloadSucess;
65
+ void updateBundleStatus(bool isLastDownloadSuccess, int64_t updateTimestamp) {
66
+ m_bundleStatus.m_isLastDownloadSuccess = isLastDownloadSuccess;
70
67
  m_bundleStatus.m_updateTimestamp = updateTimestamp;
71
68
  }
72
69
 
@@ -74,7 +71,6 @@ class DevSupportManager final : public facebook::react::IDevSupportManager {
74
71
  InspectorPackagerConnection::BundleStatus m_bundleStatus;
75
72
  };
76
73
  std::shared_ptr<BundleStatusProvider> m_BundleStatusProvider = std::make_shared<BundleStatusProvider>();
77
- #endif
78
74
  };
79
75
 
80
76
  } // namespace Microsoft::ReactNative