zarro 1.150.0 → 1.151.2

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.
@@ -182,7 +182,10 @@
182
182
  : str;
183
183
  }
184
184
  async function test(opts) {
185
- return runOnAllConfigurations(label("Testing"), opts, configuration => {
185
+ const labelText = !!opts.label
186
+ ? `${label("Testing")}`
187
+ : `${opts.label} ${label("Testing")}`;
188
+ return runOnAllConfigurations(labelText, opts, configuration => {
186
189
  const args = [
187
190
  "test",
188
191
  q(opts.target)
@@ -201,9 +204,26 @@
201
204
  // error dump is not only unnecessary, it confuses
202
205
  // the test handler wrt quackers output handling
203
206
  opts.suppressStdIoInErrors = true;
207
+ incrementTempDbPortHintIfFound(opts.env);
204
208
  return runDotNetWith(args, opts);
205
209
  });
206
210
  }
211
+ let tempDbPortIncrements = 0;
212
+ function incrementTempDbPortHintIfFound(env) {
213
+ if (env === undefined) {
214
+ return;
215
+ }
216
+ const current = env["TEMPDB_PORT_HINT"];
217
+ if (current === undefined) {
218
+ return;
219
+ }
220
+ let port = parseInt(current);
221
+ if (isNaN(port)) {
222
+ return;
223
+ }
224
+ port += tempDbPortIncrements++;
225
+ env["TEMPDB_PORT_HINT"] = `${port}`;
226
+ }
207
227
  async function listNugetSources() {
208
228
  const raw = await runDotNetWith(["nuget", "list", "source"], {
209
229
  suppressOutput: true
@@ -748,6 +768,7 @@ WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
748
768
  removeNugetSource,
749
769
  disableNugetSource,
750
770
  enableNugetSource,
751
- tryFindConfiguredNugetSource
771
+ tryFindConfiguredNugetSource,
772
+ incrementTempDbPortHintIfFound
752
773
  };
753
774
  })();
@@ -175,7 +175,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
175
175
  return async () => {
176
176
  debug(`${idx} start test run ${path}`);
177
177
  try {
178
- const result = await testOneDotNetCoreProject(path, configuration, verbosity, testResults, runningInParallel, rebuild);
178
+ const result = await testOneDotNetCoreProject(path, configuration, verbosity, testResults, runningInParallel, rebuild, false, `(${idx + 1} / ${testProjectPaths.length})`);
179
179
  testProcessResults.push(result);
180
180
  }
181
181
  catch (e) {
@@ -304,7 +304,7 @@ Test Run Summary
304
304
  const ms = totalMs % 1000, seconds = Math.floor(totalMs / 1000);
305
305
  return `${seconds}.${ms} seconds`;
306
306
  }
307
- async function testOneDotNetCoreProject(target, configuration, verbosity, testResults, runningInParallel, forceBuild, suppressOutput) {
307
+ async function testOneDotNetCoreProject(target, configuration, verbosity, testResults, runningInParallel, forceBuild, suppressOutput, label) {
308
308
  const quackersState = {
309
309
  inSummary: false,
310
310
  inFailureSummary: false,
@@ -342,7 +342,8 @@ Test Run Summary
342
342
  stdout,
343
343
  suppressOutput,
344
344
  suppressErrors: true,
345
- env: testEnvironment
345
+ env: testEnvironment,
346
+ label
346
347
  });
347
348
  return result;
348
349
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zarro",
3
- "version": "1.150.0",
3
+ "version": "1.151.2",
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"
package/types.d.ts CHANGED
@@ -1508,6 +1508,7 @@ declare global {
1508
1508
  env?: Dictionary<string>;
1509
1509
  filter?: string;
1510
1510
  diagnostics?: string;
1511
+ label?: string;
1511
1512
  }
1512
1513
 
1513
1514
  interface NugetSource {
@@ -1569,6 +1570,7 @@ declare global {
1569
1570
  enableNugetSource: DotNetEnableNugetSourceFunction;
1570
1571
  disableNugetSource: DotNetDisableNugetSourceFunction;
1571
1572
  tryFindConfiguredNugetSource: DotNetTryMatchNugetSourceFunction;
1573
+ incrementTempDbPortHintIfFound: (env: Dictionary<string>) => void;
1572
1574
  }
1573
1575
 
1574
1576
  type ReadCsProjNode = (csproj: string) => Promise<string>;