zarro 1.152.0 → 1.152.4

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.
@@ -92,6 +92,20 @@
92
92
  return inProgress[inProgressKey] = doInstall(toolsFolder, requiredTools);
93
93
  }
94
94
  async function doInstall(toolsFolder, requiredTools) {
95
+ return env.resolveFlag(env.BUILD_TOOLS_INSTALL_FORCE_NUGET_EXE)
96
+ ? doInstallViaNugetExe(toolsFolder, requiredTools)
97
+ : doInstallViaNodeNugetClient(toolsFolder, requiredTools);
98
+ }
99
+ async function doInstallViaNodeNugetClient(toolsFolder, requiredTools) {
100
+ const { NugetClient } = require("node-nuget-client"), client = new NugetClient();
101
+ for (const tool of requiredTools) {
102
+ await client.downloadPackage({
103
+ packageId: tool,
104
+ output: toolsFolder
105
+ });
106
+ }
107
+ }
108
+ async function doInstallViaNugetExe(toolsFolder, requiredTools) {
95
109
  const findLocalNuget = requireModule("find-local-nuget");
96
110
  await mkdir(toolsFolder);
97
111
  await cleanFoldersFrom(toolsFolder);
@@ -10,6 +10,12 @@
10
10
  help: "Location for downloading locally-used build tools (eg nuget, nunit, opencover, report generator)",
11
11
  default: "build-tools"
12
12
  });
13
+ env.register({
14
+ name: "BUILD_TOOLS_INSTALL_FORCE_NUGET_EXE",
15
+ help: `Flag: when set, revert to the original behavior for downloading tooling via nuget.exe
16
+ (default is to use node-nuget-client since nuget.exe now refuses to download packages marked as tools)`,
17
+ default: "false"
18
+ });
13
19
  env.register({
14
20
  name: "USE_SYSTEM_NUGET",
15
21
  default: "false",
@@ -151,8 +157,8 @@
151
157
  default: "auto",
152
158
  help: "process model for nunit-runner to use"
153
159
  });
154
- const extra = `
155
- - globs match dotnet core projects or .net framework built assemblies
160
+ const extra = `
161
+ - globs match dotnet core projects or .net framework built assemblies
156
162
  - elements surrounded with () are treated as pure gulp.src masks`, defaultTestInclude = "*.Tests,*.Tests.*,Tests,Test,Test.*", defaultTestExclude = `{!**/node_modules/**/*},{!./${getToolsFolder(env)}/**/*}`;
157
163
  env.register({
158
164
  name: "TEST_INCLUDE",
@@ -174,7 +180,7 @@
174
180
  });
175
181
  env.register({
176
182
  name: "TEST_VERBOSITY",
177
- help: `Verbosity of reporting for dotnet core testing: ${msbuildVerbosityOptions}`,
183
+ help: `Verbosity of reporting for dotnet core testing: ${msbuildVerbosityOptions} (if you're using Quackers, this will be dropped to minimal as Quackers provides plenty of logging)`,
178
184
  default: "normal"
179
185
  });
180
186
  env.register({
@@ -650,9 +656,9 @@
650
656
  env.register({
651
657
  name: "ZARRO_ALLOW_FILE_RESOLUTION",
652
658
  default: "true",
653
- help: `when enabled, the value provided by an environment variable may be the path
654
- to a file to use for that configuration; for example MSBUILD_PROPERTIES=foo.json will
655
- instruct Zarro to read the mapping in foo.json for extra msbuild properties to pass on
659
+ help: `when enabled, the value provided by an environment variable may be the path
660
+ to a file to use for that configuration; for example MSBUILD_PROPERTIES=foo.json will
661
+ instruct Zarro to read the mapping in foo.json for extra msbuild properties to pass on
656
662
  where applicable.`
657
663
  });
658
664
  env.register({
@@ -160,7 +160,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
160
160
  slowSummary: [],
161
161
  started: Date.now(),
162
162
  fullLog: [],
163
- }, testProcessResults = [], testProjectPaths = await gatherPaths(testProjects, true), verbosity = env.resolve("BUILD_VERBOSITY");
163
+ }, testProcessResults = [], testProjectPaths = await gatherPaths(testProjects, true), verbosity = env.resolve("TEST_VERBOSITY");
164
164
  const testInParallel = await shouldTestInParallel(testProjectPaths);
165
165
  const concurrency = testInParallel
166
166
  ? env.resolveNumber("MAX_CONCURRENCY")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zarro",
3
- "version": "1.152.0",
3
+ "version": "1.152.4",
4
4
  "description": "Some glue to make gulp easier, perhaps even zero- or close-to-zero-conf",
5
5
  "bin": {
6
6
  "zarro": "./index.js"
@@ -68,6 +68,7 @@
68
68
  "gulp-filter": "^6.0.0",
69
69
  "gulp-msbuild": "^0.10.0",
70
70
  "lodash.kebabcase": "^4.1.1",
71
+ "node-nuget-client": "^0.6.0",
71
72
  "npm-run-all": "^4.1.5",
72
73
  "plugin-error": "^1.0.1",
73
74
  "readline": "^1.3.0",
package/types.d.ts CHANGED
@@ -509,6 +509,7 @@ declare global {
509
509
  "NPM_PUBLISH_SKIP_OTP" |
510
510
  "SKIP_NUGET_UPDATE" |
511
511
  "PACK_INCREMENT_MINOR_ON_FIRST_PRERELEASE" |
512
+ "BUILD_TOOLS_INSTALL_FORCE_NUGET_EXE" |
512
513
  string;
513
514
 
514
515
  type AnyEnvVar = StringEnvVar | NumericEnvVar | FlagEnvVar | VersionIncrementStrategy;
@@ -683,6 +684,7 @@ declare global {
683
684
  NPM_PUBLISH_SKIP_OTP: FlagEnvVar;
684
685
  SKIP_NUGET_UPDATE: FlagEnvVar;
685
686
  PACK_INCREMENT_MINOR_ON_FIRST_PRERELEASE: FlagEnvVar;
687
+ BUILD_TOOLS_INSTALL_FORCE_NUGET_EXE: FlagEnvVar;
686
688
 
687
689
  BUILD_MAX_CPU_COUNT: NumericEnvVar;
688
690
  MAX_NUNIT_AGENTS: NumericEnvVar;