Repository: microsoft/react-native-test-app
Pull request #840 (2022-03-30 13:11:52)

chore: bump @microsoft/eslint-plugin-sdl to 0.2.0
### Description

Bumps @microsoft/eslint-plugin-sdl to 0.2.0

### Platforms affected

- [ ] Android
- [ ] iOS
- [ ] macOS
- [ ] Windows

### Test plan

CI should pass


Patch:
diff --git a/android/gradle.properties b/android/gradle.properties
index 3785375..c409761 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,25 +1,35 @@
 # Project-wide Gradle settings.
+
 # IDE (e.g. Android Studio) users:
 # Gradle settings configured through the IDE *will override*
 # any settings specified in this file.
+
 # For more details on how to configure your build environment visit
 # http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
+
+# Specifies the JVM arguments used for the Gradle Daemon. The setting is
+# particularly useful for configuring JVM memory settings for build performance.
+# This does not affect the JVM settings for the Gradle client VM.
+# The default is `-Xmx512m -XX:MaxMetaspaceSize=256m`.
+org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will fork up to org.gradle.workers.max JVMs to execute
+# projects in parallel. To learn more about parallel task execution, see the
+# section on Gradle build performance:
+# https://docs.gradle.org/current/userguide/performance.html#parallel_execution.
+# Default is `false`.
+#org.gradle.parallel=true
+
 # AndroidX package structure to make it clearer which packages are bundled with the
 # Android operating system, and which are packaged with your app's APK
 # https://developer.android.com/topic/libraries/support-library/androidx-rn
 android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
 
 # Failed to transform '/~/bcprov-jdk15on-1.68.jar' using Jetifier.
 # Reason: IllegalArgumentException, message: Unsupported class file major version 59.
 android.jetifier.ignorelist=bcprov-jdk15on
+
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
diff --git a/example/package.json b/example/package.json
index d3b2e3b..87bdf19 100644
--- a/example/package.json
+++ b/example/package.json
@@ -17,10 +17,10 @@
     "windows": "react-native run-windows --no-packager"
   },
   "peerDependencies": {
-    "react": "~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2",
-    "react-native": "^0.0.0-0 || 0.60 - 0.67 || 1000.0.0",
-    "react-native-macos": "^0.0.0-0 || 0.60 - 0.66",
-    "react-native-windows": "^0.0.0-0 || 0.62 - 0.67"
+    "react": "~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2",
+    "react-native": "^0.0.0-0 || 0.62 - 0.68 || 1000.0.0",
+    "react-native-macos": "^0.0.0-0 || 0.62 - 0.66",
+    "react-native-windows": "^0.0.0-0 || 0.62 - 0.68"
   },
   "devDependencies": {
     "@babel/core": "^7.0.0",
diff --git a/example/react-native.config.js b/example/react-native.config.js
index 262d4b8..9b40783 100644
--- a/example/react-native.config.js
+++ b/example/react-native.config.js
@@ -1,24 +1,31 @@
-const fs = require("fs");
-const path = require("path");
-const {
-  androidManifestPath,
-  iosProjectPath,
-  windowsProjectPath,
-} = require("react-native-test-app");
+const project = (() => {
+  const fs = require("fs");
+  const path = require("path");
+  try {
+    const {
+      androidManifestPath,
+      iosProjectPath,
+      windowsProjectPath,
+    } = require("react-native-test-app");
+    return {
+      android: {
+        sourceDir: "android",
+        manifestPath: androidManifestPath(path.join(__dirname, "android")),
+      },
+      ios: {
+        project: iosProjectPath("ios"),
+      },
+      windows: fs.existsSync("windows/Example.sln") && {
+        sourceDir: "windows",
+        solutionFile: "Example.sln",
+        project: windowsProjectPath(path.join(__dirname, "windows")),
+      },
+    };
+  } catch (_) {
+    return undefined;
+  }
+})();
 
 module.exports = {
-  project: {
-    android: {
-      sourceDir: "android",
-      manifestPath: androidManifestPath(path.join(__dirname, "android")),
-    },
-    ios: {
-      project: iosProjectPath("ios"),
-    },
-    windows: fs.existsSync("windows/Example.sln") && {
-      sourceDir: "windows",
-      solutionFile: "Example.sln",
-      project: windowsProjectPath(path.join(__dirname, "windows")),
-    },
-  },
+  ...(project ? { project } : undefined),
 };
diff --git a/package.json b/package.json
index 4ff45b4..80920db 100644
--- a/package.json
+++ b/package.json
@@ -80,9 +80,9 @@
     "@react-native-community/cli-platform-ios": ">=4.10.0",
     "mustache": "^4.0.0",
     "react": "~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2",
-    "react-native": "^0.0.0-0 || 0.62 - 0.67 || 1000.0.0",
+    "react-native": "^0.0.0-0 || 0.62 - 0.68 || 1000.0.0",
     "react-native-macos": "^0.0.0-0 || 0.62 - 0.66",
-    "react-native-windows": "^0.0.0-0 || 0.62 - 0.67"
+    "react-native-windows": "^0.0.0-0 || 0.62 - 0.68"
   },
   "peerDependenciesMeta": {
     "@react-native-community/cli": {
@@ -108,7 +108,7 @@
     "@babel/core": "^7.0.0",
     "@commitlint/cli": "^16.0.0",
     "@commitlint/config-conventional": "^16.0.0",
-    "@microsoft/eslint-plugin-sdl": "^0.1.9",
+    "@microsoft/eslint-plugin-sdl": "^0.2.0",
     "@react-native-community/cli": "^6.0.0",
     "@react-native-community/cli-platform-android": "^6.0.0",
     "@react-native-community/cli-platform-ios": "^6.0.0",
diff --git a/scripts/configure.js b/scripts/configure.js
index bc55c16..ce73ea6 100755
--- a/scripts/configure.js
+++ b/scripts/configure.js
@@ -282,14 +282,22 @@ function reactNativeConfig({ name, testAppPath, platforms, flatten }) {
     switch (platforms[0]) {
       case "android":
         return join(
-          'const { androidManifestPath } = require("react-native-test-app");',
+          "const project = (() => {",
+          "  try {",
+          '    const { androidManifestPath } = require("react-native-test-app");',
+          "    return {",
+          "      android: {",
+          '        sourceDir: ".",',
+          "        manifestPath: androidManifestPath(__dirname),",
+          "      },",
+          "    };",
+          "  } catch (_) {",
+          "    return undefined;",
+          "  }",
+          "})();",
+          "",
           "module.exports = {",
-          "  project: {",
-          "    android: {",
-          '      sourceDir: ".",',
-          "      manifestPath: androidManifestPath(__dirname),",
-          "    },",
-          "  },",
+          "  ...(project ? { project } : undefined),",
           "};",
           ""
         );
@@ -297,31 +305,46 @@ function reactNativeConfig({ name, testAppPath, platforms, flatten }) {
       case "macos":
       case "ios":
         return join(
-          'const { iosProjectPath } = require("react-native-test-app");',
-          "module.exports = {",
-          "  project: {",
-          "    ios: {",
-          '      project: iosProjectPath("."),',
-          "    }",
+          "const project = (() => {",
+          "  try {",
+          '    const { iosProjectPath } = require("react-native-test-app");',
+          "    return {",
+          "      ios: {",
+          '        project: iosProjectPath("."),',
+          "      },",
+          "    };",
+          "  } catch (_) {",
+          "    return undefined;",
           "  }",
+          "})();",
+          "",
+          "module.exports = {",
+          "  ...(project ? { project } : undefined),",
           "};",
           ""
         );
 
       case "windows":
         return join(
-          'const path = require("path");',
-          'const { windowsProjectPath } = require("react-native-test-app");',
+          "const project = (() => {",
+          '  const path = require("path");',
+          '  const sourceDir = "windows";',
+          "  try {",
+          '    const { windowsProjectPath } = require("react-native-test-app");',
+          "    return {",
+          "      windows: {",
+          "        sourceDir,",
+          `        solutionFile: "${name}.sln",`,
+          "        project: windowsProjectPath(path.join(__dirname, sourceDir)),",
+          "      },",
+          "    };",
+          "  } catch (_) {",
+          "    return undefined;",
+          "  }",
+          "})();",
           "",
-          'const sourceDir = "windows";',
           "module.exports = {",
-          "  project: {",
-          "    windows: {",
-          "      sourceDir,",
-          `      solutionFile: "${name}.sln",`,
-          "      project: windowsProjectPath(path.join(__dirname, sourceDir)),",
-          "    },",
-          "  },",
+          "  ...(project ? { project } : undefined),",
           '  reactNativePath: "node_modules/react-native-windows",',
           "};",
           ""
diff --git a/yarn.lock b/yarn.lock
index 133f41b..8c2f835 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1612,14 +1612,14 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@microsoft/eslint-plugin-sdl@npm:^0.1.9":
-  version: 0.1.9
-  resolution: "@microsoft/eslint-plugin-sdl@npm:0.1.9"
+"@microsoft/eslint-plugin-sdl@npm:^0.2.0":
+  version: 0.2.0
+  resolution: "@microsoft/eslint-plugin-sdl@npm:0.2.0"
   dependencies:
     eslint-plugin-node: 11.1.0
     eslint-plugin-react: 7.24.0
     eslint-plugin-security: 1.4.0
-  checksum: 871f6aa8696b7d1ca5cbbb731a8f86d0d30a1e2f0257be6631755bb189d9aec94ea7f2432912d445585a9df415b10c382196f5117d1f9c34df87fa3f2f17bd26
+  checksum: 44fd7a0d29ebed48fc935d0b0f96394dea4e3a055467b0b53173c76ce44fb33ddf2b5913db6920e92cc5da1974b5c4e7942500f5f22f60f36f8fe1a3b2eae6c6
   languageName: node
   linkType: hard
 
@@ -5414,10 +5414,10 @@ __metadata:
     react-native-test-app: "workspace:."
     react-native-windows: ^0.66.11
   peerDependencies:
-    react: ~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2
-    react-native: ^0.0.0-0 || 0.60 - 0.67 || 1000.0.0
-    react-native-macos: ^0.0.0-0 || 0.60 - 0.66
-    react-native-windows: ^0.0.0-0 || 0.62 - 0.67
+    react: ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2
+    react-native: ^0.0.0-0 || 0.62 - 0.68 || 1000.0.0
+    react-native-macos: ^0.0.0-0 || 0.62 - 0.66
+    react-native-windows: ^0.0.0-0 || 0.62 - 0.68
   languageName: unknown
   linkType: soft
 
@@ -10595,7 +10595,7 @@ __metadata:
     "@babel/core": ^7.0.0
     "@commitlint/cli": ^16.0.0
     "@commitlint/config-conventional": ^16.0.0
-    "@microsoft/eslint-plugin-sdl": ^0.1.9
+    "@microsoft/eslint-plugin-sdl": ^0.2.0
     "@react-native-community/cli": ^6.0.0
     "@react-native-community/cli-platform-android": ^6.0.0
     "@react-native-community/cli-platform-ios": ^6.0.0
@@ -10634,9 +10634,9 @@ __metadata:
     "@react-native-community/cli-platform-ios": ">=4.10.0"
     mustache: ^4.0.0
     react: ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2
-    react-native: ^0.0.0-0 || 0.62 - 0.67 || 1000.0.0
+    react-native: ^0.0.0-0 || 0.62 - 0.68 || 1000.0.0
     react-native-macos: ^0.0.0-0 || 0.62 - 0.66
-    react-native-windows: ^0.0.0-0 || 0.62 - 0.67
+    react-native-windows: ^0.0.0-0 || 0.62 - 0.68
   peerDependenciesMeta:
     "@react-native-community/cli":
       optional: true


Test patch:
diff --git a/test/configure/__snapshots__/gatherConfig.test.js.snap b/test/configure/__snapshots__/gatherConfig.test.js.snap
index 0eeeece..86e7058 100644
--- a/test/configure/__snapshots__/gatherConfig.test.js.snap
+++ b/test/configure/__snapshots__/gatherConfig.test.js.snap
@@ -24,13 +24,21 @@ use_test_app!
     "metro.config.js": Object {
       "source": "example/metro.config.js",
     },
-    "react-native.config.js": "const { iosProjectPath } = require(\\"react-native-test-app\\");
-module.exports = {
-  project: {
-    ios: {
-      project: iosProjectPath(\\".\\"),
-    }
+    "react-native.config.js": "const project = (() => {
+  try {
+    const { iosProjectPath } = require(\\"react-native-test-app\\");
+    return {
+      ios: {
+        project: iosProjectPath(\\".\\"),
+      },
+    };
+  } catch (_) {
+    return undefined;
   }
+})();
+
+module.exports = {
+  ...(project ? { project } : undefined),
 };
 ",
   },
@@ -126,29 +134,36 @@ use_test_app!
     "metro.config.js": Object {
       "source": "example/metro.config.js",
     },
-    "react-native.config.js": "const fs = require(\\"fs\\");
-const path = require(\\"path\\");
-const {
-  androidManifestPath,
-  iosProjectPath,
-  windowsProjectPath,
-} = require(\\"react-native-test-app\\");
+    "react-native.config.js": "const project = (() => {
+  const fs = require(\\"fs\\");
+  const path = require(\\"path\\");
+  try {
+    const {
+      androidManifestPath,
+      iosProjectPath,
+      windowsProjectPath,
+    } = require(\\"react-native-test-app\\");
+    return {
+      android: {
+        sourceDir: \\"android\\",
+        manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
+      },
+      ios: {
+        project: iosProjectPath(\\"ios\\"),
+      },
+      windows: fs.existsSync(\\"windows/Test.sln\\") && {
+        sourceDir: \\"windows\\",
+        solutionFile: \\"Test.sln\\",
+        project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
+      },
+    };
+  } catch (_) {
+    return undefined;
+  }
+})();
 
 module.exports = {
-  project: {
-    android: {
-      sourceDir: \\"android\\",
-      manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
-    },
-    ios: {
-      project: iosProjectPath(\\"ios\\"),
-    },
-    windows: fs.existsSync(\\"windows/Test.sln\\") && {
-      sourceDir: \\"windows\\",
-      solutionFile: \\"Test.sln\\",
-      project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
-    },
-  },
+  ...(project ? { project } : undefined),
 };
 ",
   },
@@ -193,57 +208,71 @@ Object {
     "common/metro.config.js": Object {
       "source": "example/metro.config.js",
     },
-    "common/react-native.config.js": "const fs = require(\\"fs\\");
-const path = require(\\"path\\");
-const {
-  androidManifestPath,
-  iosProjectPath,
-  windowsProjectPath,
-} = require(\\"react-native-test-app\\");
+    "common/react-native.config.js": "const project = (() => {
+  const fs = require(\\"fs\\");
+  const path = require(\\"path\\");
+  try {
+    const {
+      androidManifestPath,
+      iosProjectPath,
+      windowsProjectPath,
+    } = require(\\"react-native-test-app\\");
+    return {
+      android: {
+        sourceDir: \\"android\\",
+        manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
+      },
+      ios: {
+        project: iosProjectPath(\\"ios\\"),
+      },
+      windows: fs.existsSync(\\"windows/Test.sln\\") && {
+        sourceDir: \\"windows\\",
+        solutionFile: \\"Test.sln\\",
+        project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
+      },
+    };
+  } catch (_) {
+    return undefined;
+  }
+})();
 
 module.exports = {
-  project: {
-    android: {
-      sourceDir: \\"android\\",
-      manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
-    },
-    ios: {
-      project: iosProjectPath(\\"ios\\"),
-    },
-    windows: fs.existsSync(\\"windows/Test.sln\\") && {
-      sourceDir: \\"windows\\",
-      solutionFile: \\"Test.sln\\",
-      project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
-    },
-  },
+  ...(project ? { project } : undefined),
 };
 ",
     "metro.config.js": Object {
       "source": "example/metro.config.js",
     },
-    "react-native.config.js": "const fs = require(\\"fs\\");
-const path = require(\\"path\\");
-const {
-  androidManifestPath,
-  iosProjectPath,
-  windowsProjectPath,
-} = require(\\"react-native-test-app\\");
+    "react-native.config.js": "const project = (() => {
+  const fs = require(\\"fs\\");
+  const path = require(\\"path\\");
+  try {
+    const {
+      androidManifestPath,
+      iosProjectPath,
+      windowsProjectPath,
+    } = require(\\"react-native-test-app\\");
+    return {
+      android: {
+        sourceDir: \\"android\\",
+        manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
+      },
+      ios: {
+        project: iosProjectPath(\\"ios\\"),
+      },
+      windows: fs.existsSync(\\"windows/Test.sln\\") && {
+        sourceDir: \\"windows\\",
+        solutionFile: \\"Test.sln\\",
+        project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
+      },
+    };
+  } catch (_) {
+    return undefined;
+  }
+})();
 
 module.exports = {
-  project: {
-    android: {
-      sourceDir: \\"android\\",
-      manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
-    },
-    ios: {
-      project: iosProjectPath(\\"ios\\"),
-    },
-    windows: fs.existsSync(\\"windows/Test.sln\\") && {
-      sourceDir: \\"windows\\",
-      solutionFile: \\"Test.sln\\",
-      project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
-    },
-  },
+  ...(project ? { project } : undefined),
 };
 ",
   },
@@ -278,29 +307,36 @@ use_test_app!
     "metro.config.js": Object {
       "source": "example/metro.config.js",
     },
-    "react-native.config.js": "const fs = require(\\"fs\\");
-const path = require(\\"path\\");
-const {
-  androidManifestPath,
-  iosProjectPath,
-  windowsProjectPath,
-} = require(\\"react-native-test-app\\");
+    "react-native.config.js": "const project = (() => {
+  const fs = require(\\"fs\\");
+  const path = require(\\"path\\");
+  try {
+    const {
+      androidManifestPath,
+      iosProjectPath,
+      windowsProjectPath,
+    } = require(\\"react-native-test-app\\");
+    return {
+      android: {
+        sourceDir: \\"android\\",
+        manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
+      },
+      ios: {
+        project: iosProjectPath(\\"ios\\"),
+      },
+      windows: fs.existsSync(\\"windows/Test.sln\\") && {
+        sourceDir: \\"windows\\",
+        solutionFile: \\"Test.sln\\",
+        project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
+      },
+    };
+  } catch (_) {
+    return undefined;
+  }
+})();
 
 module.exports = {
-  project: {
-    android: {
-      sourceDir: \\"android\\",
-      manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
-    },
-    ios: {
-      project: iosProjectPath(\\"ios\\"),
-    },
-    windows: fs.existsSync(\\"windows/Test.sln\\") && {
-      sourceDir: \\"windows\\",
-      solutionFile: \\"Test.sln\\",
-      project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
-    },
-  },
+  ...(project ? { project } : undefined),
 };
 ",
   },
@@ -405,29 +441,36 @@ use_test_app!
     "metro.config.js": Object {
       "source": "example/metro.config.js",
     },
-    "react-native.config.js": "const fs = require(\\"fs\\");
-const path = require(\\"path\\");
-const {
-  androidManifestPath,
-  iosProjectPath,
-  windowsProjectPath,
-} = require(\\"react-native-test-app\\");
+    "react-native.config.js": "const project = (() => {
+  const fs = require(\\"fs\\");
+  const path = require(\\"path\\");
+  try {
+    const {
+      androidManifestPath,
+      iosProjectPath,
+      windowsProjectPath,
+    } = require(\\"react-native-test-app\\");
+    return {
+      android: {
+        sourceDir: \\"android\\",
+        manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
+      },
+      ios: {
+        project: iosProjectPath(\\"ios\\"),
+      },
+      windows: fs.existsSync(\\"windows/Test.sln\\") && {
+        sourceDir: \\"windows\\",
+        solutionFile: \\"Test.sln\\",
+        project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
+      },
+    };
+  } catch (_) {
+    return undefined;
+  }
+})();
 
 module.exports = {
-  project: {
-    android: {
-      sourceDir: \\"android\\",
-      manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
-    },
-    ios: {
-      project: iosProjectPath(\\"ios\\"),
-    },
-    windows: fs.existsSync(\\"windows/Test.sln\\") && {
-      sourceDir: \\"windows\\",
-      solutionFile: \\"Test.sln\\",
-      project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
-    },
-  },
+  ...(project ? { project } : undefined),
 };
 ",
     "windows/.gitignore": Object {
@@ -539,29 +582,36 @@ use_test_app!
     "metro.config.js": Object {
       "source": "example/metro.config.js",
     },
-    "react-native.config.js": "const fs = require(\\"fs\\");
-const path = require(\\"path\\");
-const {
-  androidManifestPath,
-  iosProjectPath,
-  windowsProjectPath,
-} = require(\\"react-native-test-app\\");
+    "react-native.config.js": "const project = (() => {
+  const fs = require(\\"fs\\");
+  const path = require(\\"path\\");
+  try {
+    const {
+      androidManifestPath,
+      iosProjectPath,
+      windowsProjectPath,
+    } = require(\\"react-native-test-app\\");
+    return {
+      android: {
+        sourceDir: \\"android\\",
+        manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
+      },
+      ios: {
+        project: iosProjectPath(\\"ios\\"),
+      },
+      windows: fs.existsSync(\\"windows/Test.sln\\") && {
+        sourceDir: \\"windows\\",
+        solutionFile: \\"Test.sln\\",
+        project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
+      },
+    };
+  } catch (_) {
+    return undefined;
+  }
+})();
 
 module.exports = {
-  project: {
-    android: {
-      sourceDir: \\"android\\",
-      manifestPath: androidManifestPath(path.join(__dirname, \\"android\\")),
-    },
-    ios: {
-      project: iosProjectPath(\\"ios\\"),
-    },
-    windows: fs.existsSync(\\"windows/Test.sln\\") && {
-      sourceDir: \\"windows\\",
-      solutionFile: \\"Test.sln\\",
-      project: windowsProjectPath(path.join(__dirname, \\"windows\\")),
-    },
-  },
+  ...(project ? { project } : undefined),
 };
 ",
   },