Skip to content

Commit bc46019

Browse files
authored
fix(windows): do not enable NuGet by default when New Arch is (#2653)
NuGet artifacts are currently not stable enough to be enabled by default
1 parent 08c115d commit bc46019

5 files changed

Lines changed: 17 additions & 15 deletions

File tree

packages/app/ios/ReactTestApp/ReactInstance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ final class ReactInstance: NSObject, RNXHostConfig {
155155
#if swift(>=5.9)
156156

157157
#if os(visionOS)
158-
// Fallback to iOS extensions if visionOS is not present
158+
/// Fallback to iOS extensions if visionOS is not present
159159
let extensions = [".visionos", ".ios", ".mobile", ".native", ""]
160160
#elseif os(iOS)
161161
let extensions = [".ios", ".mobile", ".native", ""]

packages/app/ios/ReactTestApp/Session.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Foundation
22

3-
/// `UserDefaults` can be misused for fingerprinting and developers are now
4-
/// required to provide a reason for using it. This was announced at WWDC 2023
5-
/// (see https://developer.apple.com/videos/play/wwdc2023/10060/?time=457). By
6-
/// excluding unused modules when in single app mode, we also conveniently
7-
/// remove all uses of it.
3+
// `UserDefaults` can be misused for fingerprinting and developers are now
4+
// required to provide a reason for using it. This was announced at WWDC 2023
5+
// (see https://developer.apple.com/videos/play/wwdc2023/10060/?time=457). By
6+
// excluding unused modules when in single app mode, we also conveniently
7+
// remove all uses of it.
88
#if !ENABLE_SINGLE_APP_MODE
99

1010
enum Session {

packages/app/windows/Win32/ReactApp.vcxproj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@
7979
<SDLCheck>true</SDLCheck>
8080
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
8181
<DisableSpecificWarnings></DisableSpecificWarnings>
82+
<AdditionalIncludeDirectories>
83+
$(ReactAppWin32Dir);
84+
$(ReactAppSharedDir);
85+
$(ReactAppGeneratedDir);
86+
%(AdditionalIncludeDirectories)
87+
</AdditionalIncludeDirectories>
88+
<PreprocessorDefinitions>ENABLE_SINGLE_APP_MODE=0;REACT_NATIVE_VERSION=1000000000;USE_FABRIC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
89+
<LanguageStandard>stdcpp20</LanguageStandard>
8290
</ClCompile>
8391
<Link>
8492
<AdditionalDependencies>shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependenices)</AdditionalDependencies>
@@ -96,13 +104,6 @@
96104
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
97105
</ClCompile>
98106
</ItemDefinitionGroup>
99-
<ItemDefinitionGroup>
100-
<ClCompile>
101-
<LanguageStandard>stdcpp20</LanguageStandard>
102-
<PreprocessorDefinitions>ENABLE_SINGLE_APP_MODE=0;REACT_NATIVE_VERSION=1000000000;USE_FABRIC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
103-
<AdditionalIncludeDirectories>$(ReactAppWin32Dir);$(ReactAppSharedDir);$(ReactAppGeneratedDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
104-
</ClCompile>
105-
</ItemDefinitionGroup>
106107
<PropertyGroup Label="UserMacros" />
107108
<ItemGroup>
108109
<ClInclude Include="$(ReactAppSharedDir)\JSValueWriterHelper.h" />

packages/app/windows/app.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ export async function generateSolution(destPath, options, fs = nodefs) {
216216
...templateView,
217217
name: path.basename(projectFileName, path.extname(projectFileName)),
218218
useExperimentalNuget: info.useExperimentalNuGet,
219+
useNuGets: info.useExperimentalNuGet,
219220
rnwPathFromProjectRoot: path.relative(
220221
path.dirname(projectManifest),
221222
rnWindowsPath
@@ -228,14 +229,14 @@ export async function generateSolution(destPath, options, fs = nodefs) {
228229
/"\.\.\\node_modules\\react-native-windows\\/g,
229230
`"${path.relative(destPath, rnWindowsPath)}\\`
230231
)
231-
.replace("ReactApp\\ReactApp.vcxproj", vcxprojLocalPath) // Win32
232232
.replace(
233233
"ReactApp.Package\\ReactApp.Package.wapproj", // Win32
234234
vcxprojLocalPath.replace(
235235
"ReactApp.vcxproj",
236236
"ReactApp.Package.wapproj"
237237
)
238238
)
239+
.replace("ReactApp\\ReactApp.vcxproj", vcxprojLocalPath) // Win32
239240
.replace("ReactTestApp\\ReactTestApp.vcxproj", vcxprojLocalPath) // UWP
240241
.replace(
241242
/EndProject\r?\nGlobal/,

packages/app/windows/project.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export async function projectInfo(
421421
versionNumber,
422422
bundle: getBundleResources(findNearest("app.json", destPath, fs), fs),
423423
nugetDependencies: await getNuGetDependencies(rnWindowsPath),
424-
useExperimentalNuGet: newArch || useNuGet,
424+
useExperimentalNuGet: useNuGet,
425425
useFabric: newArch,
426426
};
427427
}

0 commit comments

Comments
 (0)