react-native-windows 0.74.19 → 0.74.21

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 (76) hide show
  1. package/Microsoft.ReactNative/ComponentView.idl +33 -32
  2. package/Microsoft.ReactNative/Composition.Input.idl +2 -0
  3. package/Microsoft.ReactNative/CompositionComponentView.idl +43 -24
  4. package/Microsoft.ReactNative/Fabric/AbiEventEmitter.cpp +21 -0
  5. package/Microsoft.ReactNative/Fabric/AbiEventEmitter.h +23 -0
  6. package/Microsoft.ReactNative/Fabric/AbiShadowNode.cpp +7 -0
  7. package/Microsoft.ReactNative/Fabric/AbiShadowNode.h +3 -0
  8. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +318 -59
  9. package/Microsoft.ReactNative/Fabric/ComponentView.h +155 -33
  10. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +2 -2
  11. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +3 -0
  12. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +25 -7
  13. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +22 -4
  14. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +43 -0
  15. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +6 -1
  16. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +147 -119
  17. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +4 -8
  18. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +97 -101
  19. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +28 -52
  20. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +133 -0
  21. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +61 -0
  22. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +1 -2
  23. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +1 -4
  24. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +1 -2
  25. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +1 -6
  26. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +0 -1
  27. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +108 -18
  28. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +33 -5
  29. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +57 -1
  30. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +6 -0
  31. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +8 -2
  32. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +2 -0
  33. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +195 -182
  34. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -3
  35. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +16 -4
  36. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +3 -3
  37. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +12 -17
  38. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +4 -11
  39. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +19 -0
  40. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +4 -0
  41. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
  42. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +10 -7
  43. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +1 -3
  44. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +20 -1
  45. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +3 -0
  46. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +13 -3
  47. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +57 -4
  48. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +14 -32
  49. package/Microsoft.ReactNative/ReactNativeIsland.idl +3 -0
  50. package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.props +1 -0
  51. package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.targets +4 -0
  52. package/PropertySheets/External/Microsoft.ReactNative.Cpp.PackageReferences.props +14 -4
  53. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  54. package/PropertySheets/WinUI.props +1 -1
  55. package/Scripts/Microsoft.ReactNative.VersionCheck.targets +2 -0
  56. package/Shared/Shared.vcxitems +7 -0
  57. package/Shared/Shared.vcxitems.filters +1 -0
  58. package/just-task.js +1 -1
  59. package/package.json +3 -3
  60. package/template/cpp-app/proj/MyApp.sln +19 -19
  61. package/template/cpp-lib/proj/MyLib.sln +19 -19
  62. package/template/cs-app/proj/MyApp.sln +21 -21
  63. package/template/cs-lib/proj/MyLib.sln +21 -21
  64. package/template/metro.config.js +13 -2
  65. package/templates/cpp-app/NuGet_Config +13 -0
  66. package/templates/cpp-app/template.config.js +11 -1
  67. package/templates/cpp-app/windows/ExperimentalFeatures.props +1 -0
  68. package/templates/cpp-app/windows/MyApp.sln +29 -19
  69. package/templates/cpp-lib/NuGet_Config +13 -0
  70. package/templates/cpp-lib/example/NuGet_Config +6 -0
  71. package/templates/cpp-lib/template.config.js +11 -1
  72. package/templates/cpp-lib/windows/ExperimentalFeatures.props +1 -0
  73. package/templates/cpp-lib/windows/MyLib.sln +35 -25
  74. package/templates/old/generateWrapper.js +7 -4
  75. package/templates/templateUtils.js +3 -1
  76. package/template/metro.devMode.config.js +0 -56
@@ -4,47 +4,53 @@ Microsoft Visual Studio Solution File, Format Version 12.00
4
4
  VisualStudioVersion = 17.3.32929.385
5
5
  MinimumVisualStudioVersion = 10.0.40219.1
6
6
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "{{ name }}", "{{ name }}\{{ name }}.vcxproj", "{{ projectGuidUpper }}"
7
+ {{^useNuGets}}
7
8
  ProjectSection(ProjectDependencies) = postProject
8
9
  {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136}
9
10
  EndProjectSection
11
+ {{/useNuGets}}
10
12
  EndProject
11
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\node_modules\react-native-windows\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}"
13
+ {{^useNuGets}}
14
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\{{ rnwPathFromProjectRoot }}\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}"
12
15
  EndProject
13
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "..\node_modules\react-native-windows\fmt\fmt.vcxproj", "{14B93DC8-FD93-4A6D-81CB-8BC96644501C}"
16
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "..\{{ rnwPathFromProjectRoot }}\fmt\fmt.vcxproj", "{14B93DC8-FD93-4A6D-81CB-8BC96644501C}"
14
17
  EndProject
15
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\node_modules\react-native-windows\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}"
18
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\{{ rnwPathFromProjectRoot }}\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}"
16
19
  ProjectSection(ProjectDependencies) = postProject
17
20
  {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {A990658C-CE31-4BCC-976F-0FC6B1AF693D}
18
21
  EndProjectSection
19
22
  EndProject
20
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\node_modules\react-native-windows\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}"
23
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\{{ rnwPathFromProjectRoot }}\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}"
21
24
  EndProject
22
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}"
25
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}"
23
26
  EndProject
24
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}"
27
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}"
25
28
  EndProject
26
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\node_modules\react-native-windows\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}"
29
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\{{ rnwPathFromProjectRoot }}\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}"
27
30
  EndProject
28
31
  Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReactNative", "ReactNative", "{5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}"
29
32
  EndProject
30
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Shared", "..\node_modules\react-native-windows\Shared\Shared.vcxitems", "{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0}"
33
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Shared", "..\{{ rnwPathFromProjectRoot }}\Shared\Shared.vcxitems", "{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0}"
31
34
  EndProject
32
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\node_modules\react-native-windows\Mso\Mso.vcxitems", "{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E}"
35
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\{{ rnwPathFromProjectRoot }}\Mso\Mso.vcxitems", "{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E}"
33
36
  EndProject
34
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "..\node_modules\react-native-windows\include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}"
37
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "..\{{ rnwPathFromProjectRoot }}\include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}"
35
38
  EndProject
39
+ {{/useNuGets}}
36
40
  Global
41
+ {{^useNuGets}}
37
42
  GlobalSection(SharedMSBuildProjectFiles) = preSolution
38
- ..\node_modules\react-native-windows\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9
39
- ..\node_modules\react-native-windows\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9
40
- ..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9
41
- ..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9
42
- ..\node_modules\react-native-windows\include\Include.vcxitems*{ef074ba1-2d54-4d49-a28e-5e040b47cd2e}*SharedItemsImports = 9
43
- ..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
44
- ..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
45
- ..\node_modules\react-native-windows\Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
46
- ..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
43
+ ..\{{ rnwPathFromProjectRoot }}\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9
44
+ ..\{{ rnwPathFromProjectRoot }}\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9
45
+ ..\{{ rnwPathFromProjectRoot }}\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9
46
+ ..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9
47
+ ..\{{ rnwPathFromProjectRoot }}\include\Include.vcxitems*{ef074ba1-2d54-4d49-a28e-5e040b47cd2e}*SharedItemsImports = 9
48
+ ..\{{ rnwPathFromProjectRoot }}\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
49
+ ..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
50
+ ..\{{ rnwPathFromProjectRoot }}\Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
51
+ ..\{{ rnwPathFromProjectRoot }}\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
47
52
  EndGlobalSection
53
+ {{/useNuGets}}
48
54
  GlobalSection(SolutionConfigurationPlatforms) = preSolution
49
55
  Debug|x64 = Debug|x64
50
56
  Debug|x86 = Debug|x86
@@ -54,24 +60,25 @@ Global
54
60
  Release|ARM64 = Release|ARM64
55
61
  EndGlobalSection
56
62
  GlobalSection(ProjectConfigurationPlatforms) = postSolution
57
- {{ projectGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64
58
- {{ projectGuidUpper }}.Debug|ARM64.Build.0 = Debug|ARM64
59
- {{ projectGuidUpper }}.Debug|ARM64.Deploy.0 = Debug|ARM64
60
63
  {{ projectGuidUpper }}.Debug|x64.ActiveCfg = Debug|x64
61
64
  {{ projectGuidUpper }}.Debug|x64.Build.0 = Debug|x64
62
65
  {{ projectGuidUpper }}.Debug|x64.Deploy.0 = Debug|x64
63
66
  {{ projectGuidUpper }}.Debug|x86.ActiveCfg = Debug|Win32
64
67
  {{ projectGuidUpper }}.Debug|x86.Build.0 = Debug|Win32
65
68
  {{ projectGuidUpper }}.Debug|x86.Deploy.0 = Debug|Win32
66
- {{ projectGuidUpper }}.Release|ARM64.ActiveCfg = Release|ARM64
67
- {{ projectGuidUpper }}.Release|ARM64.Build.0 = Release|ARM64
68
- {{ projectGuidUpper }}.Release|ARM64.Deploy.0 = Release|ARM64
69
+ {{ projectGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64
70
+ {{ projectGuidUpper }}.Debug|ARM64.Build.0 = Debug|ARM64
71
+ {{ projectGuidUpper }}.Debug|ARM64.Deploy.0 = Debug|ARM64
69
72
  {{ projectGuidUpper }}.Release|x64.ActiveCfg = Release|x64
70
73
  {{ projectGuidUpper }}.Release|x64.Build.0 = Release|x64
71
74
  {{ projectGuidUpper }}.Release|x64.Deploy.0 = Release|x64
72
75
  {{ projectGuidUpper }}.Release|x86.ActiveCfg = Release|Win32
73
76
  {{ projectGuidUpper }}.Release|x86.Build.0 = Release|Win32
74
77
  {{ projectGuidUpper }}.Release|x86.Deploy.0 = Release|Win32
78
+ {{ projectGuidUpper }}.Release|ARM64.ActiveCfg = Release|ARM64
79
+ {{ projectGuidUpper }}.Release|ARM64.Build.0 = Release|ARM64
80
+ {{ projectGuidUpper }}.Release|ARM64.Deploy.0 = Release|ARM64
81
+ {{^useNuGets}}
75
82
  {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64
76
83
  {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64
77
84
  {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64
@@ -134,10 +141,12 @@ Global
134
141
  {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.ActiveCfg = Release|Win32
135
142
  {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.Build.0 = Release|Win32
136
143
  {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.Deploy.0 = Release|Win32
144
+ {{/useNuGets}}
137
145
  EndGlobalSection
138
146
  GlobalSection(SolutionProperties) = preSolution
139
147
  HideSolutionNode = FALSE
140
148
  EndGlobalSection
149
+ {{^useNuGets}}
141
150
  GlobalSection(NestedProjects) = preSolution
142
151
  {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
143
152
  {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
@@ -150,6 +159,7 @@ Global
150
159
  {EF074BA1-2D54-4D49-A28E-5E040B47CD2E} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
151
160
  {14B93DC8-FD93-4A6D-81CB-8BC96644501C} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
152
161
  EndGlobalSection
162
+ {{/useNuGets}}
153
163
  GlobalSection(ExtensibilityGlobals) = postSolution
154
164
  SolutionGuid = {D43FAD39-F619-437D-BB40-04A3982ACB6A}
155
165
  EndGlobalSection
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  const generateWindows = require('../../generate');
10
+ const templateUtils = require('../templateUtils');
10
11
 
11
12
  function makeGenerateWindowsWrapper(
12
13
  language = 'cpp',
@@ -33,15 +34,17 @@ function makeGenerateWindowsWrapper(
33
34
  const postInstall = async (config = {}, options = {}) => {
34
35
  const experimentalFeatures = config?.project?.windows?.experimentalFeatures;
35
36
 
37
+ const rnwInfo = templateUtils.getRnwInfo(config, options);
38
+
36
39
  const generateOptions = {
37
40
  overwrite: !!options.overwrite,
38
41
  language,
39
42
  projectType,
40
43
  experimentalNuGetDependency:
41
- experimentalFeatures?.UseExperimentalNuget ?? false,
42
- useWinUI3: experimentalFeatures?.UseWinUI3 ?? false,
43
- useHermes: experimentalFeatures?.UseHermes ?? true,
44
- useDevMode: false,
44
+ experimentalFeatures?.UseExperimentalNuget === 'true' ?? false,
45
+ useWinUI3: experimentalFeatures?.UseWinUI3 === 'true' ?? false,
46
+ useHermes: experimentalFeatures?.UseHermes === 'true' ?? true,
47
+ useDevMode: rnwInfo.devMode,
45
48
  verbose: !!options.logging,
46
49
  telemetry: !!options.telemetry,
47
50
  };
@@ -30,6 +30,8 @@ function getRnwInfo(config = {}, options = {}) {
30
30
 
31
31
  const devMode = existsSync(path.join(rnwPath, 'src-win'));
32
32
 
33
+ const isCanary = rnwVersion.includes('canary');
34
+
33
35
  if (options?.logging) {
34
36
  console.log(
35
37
  `Found react-native-windows@${rnwVersion} at ${rnwPath}${
@@ -38,7 +40,7 @@ function getRnwInfo(config = {}, options = {}) {
38
40
  );
39
41
  }
40
42
 
41
- return {rnwPath, rnwVersion, devMode};
43
+ return {rnwPath, rnwVersion, devMode, isCanary};
42
44
  }
43
45
 
44
46
  function getWindowsProjectConfig(root) {
@@ -1,56 +0,0 @@
1
- const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
- const exclusionList = require('metro-config/src/defaults/exclusionList');
6
-
7
- const rnwPath = fs.realpathSync(
8
- path.resolve(require.resolve('react-native-windows/package.json'), '..'),
9
- );
10
-
11
- // [devMode
12
- const rnwRootNodeModules = path.resolve(rnwPath, '..', 'node_modules');
13
- const rnwPackages = path.resolve(rnwPath, '..', 'packages');
14
- // devMode]
15
-
16
- /**
17
- * Metro configuration
18
- * https://facebook.github.io/metro/docs/configuration
19
- *
20
- * @type {import('metro-config').MetroConfig}
21
- */
22
-
23
- const config = {
24
- // [devMode
25
- watchFolders: [rnwPath, rnwRootNodeModules, rnwPackages],
26
- // devMode]
27
- resolver: {
28
- blockList: exclusionList([
29
- // This stops "react-native run-windows" from causing the metro server to crash if its already running
30
- new RegExp(
31
- `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
32
- ),
33
- // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
34
- new RegExp(`${rnwPath}/build/.*`),
35
- new RegExp(`${rnwPath}/target/.*`),
36
- /.*\.ProjectImports\.zip/,
37
- ]),
38
- // [devMode
39
- extraNodeModules: {
40
- 'react-native-windows': rnwPath,
41
- },
42
- // devMode]
43
- },
44
- transformer: {
45
- getTransformOptions: async () => ({
46
- transform: {
47
- experimentalImportSupport: false,
48
- inlineRequires: true,
49
- },
50
- }),
51
- // This fixes the 'missing-asset-registry-path` error (see https://github.com/microsoft/react-native-windows/issues/11437)
52
- assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
53
- },
54
- };
55
-
56
- module.exports = mergeConfig(getDefaultConfig(__dirname), config);