zarro 1.176.2 → 1.178.0
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.
- package/gulp-tasks/generate-local-task.js +8 -8
- package/gulp-tasks/modules/dotnet-cli.js +6 -3
- package/gulp-tasks/modules/register-environment-variables.js +5 -0
- package/gulp-tasks/modules/resolve-nuget.js +1 -1
- package/gulp-tasks/modules/shim-nuget.js +2 -2
- package/gulp-tasks/update-self.js +4 -4
- package/gulp-tasks/upgrade-packages.js +3 -2
- package/gulp-tasks/verify-up-to-date.js +3 -3
- package/package.json +2 -2
- package/types.d.ts +3 -0
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
await writeTextFile(target, template.replace("%TASK_NAME%", taskName));
|
|
10
10
|
log.info(`generated new task file at: ${target}`);
|
|
11
11
|
});
|
|
12
|
-
const template = `
|
|
13
|
-
/// <reference path="../node_modules/zarro/types.d.ts" />
|
|
14
|
-
const
|
|
15
|
-
gulp = requireModule<Gulp>("gulp");
|
|
16
|
-
|
|
17
|
-
gulp.task(\`%TASK_NAME%\`, async () => {
|
|
18
|
-
|
|
19
|
-
});
|
|
12
|
+
const template = `
|
|
13
|
+
/// <reference path="../node_modules/zarro/types.d.ts" />
|
|
14
|
+
const
|
|
15
|
+
gulp = requireModule<Gulp>("gulp");
|
|
16
|
+
|
|
17
|
+
gulp.task(\`%TASK_NAME%\`, async () => {
|
|
18
|
+
|
|
19
|
+
});
|
|
20
20
|
`.trim();
|
|
21
21
|
})();
|
|
@@ -1011,8 +1011,8 @@ WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
|
|
|
1011
1011
|
}
|
|
1012
1012
|
const s = toUpgrade.length === 1 ? "" : "s", message = `searching for ${toUpgrade.length} package${s} to upgrade in ${project}`, upgradeIds = toUpgrade.map(o => o.id);
|
|
1013
1013
|
const upstream = await ctx.exec(message, async () => {
|
|
1014
|
-
var _a;
|
|
1015
|
-
return await searchForMultiplePackages(upgradeIds, opts.source, (_a = opts.preRelease) !== null && _a !== void 0 ? _a : false);
|
|
1014
|
+
var _a, _b;
|
|
1015
|
+
return await searchForMultiplePackages(upgradeIds, opts.source, (_a = opts.preRelease) !== null && _a !== void 0 ? _a : false, (_b = opts.clearNugetHttpCache) !== null && _b !== void 0 ? _b : false);
|
|
1016
1016
|
});
|
|
1017
1017
|
if (upstream.length === 0) {
|
|
1018
1018
|
log.warn(`No results found for packages at ${opts.source} (preRelease: ${!!opts.preRelease})\n- ${upgradeIds.join("\n- ")}`);
|
|
@@ -1040,7 +1040,10 @@ WARNING: 'dotnet pack' ignores --version-suffix when a nuspec file is provided.
|
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
async function searchForMultiplePackages(packageIds, source, preRelease) {
|
|
1043
|
+
async function searchForMultiplePackages(packageIds, source, preRelease, clearNugetHttpCache) {
|
|
1044
|
+
if (clearNugetHttpCache) {
|
|
1045
|
+
await clearCaches(DotNetCache.httpCache);
|
|
1046
|
+
}
|
|
1044
1047
|
// TODO: optimise
|
|
1045
1048
|
const promises = packageIds.map(id => searchPackages({
|
|
1046
1049
|
search: id,
|
|
@@ -485,6 +485,11 @@
|
|
|
485
485
|
help: "Flag: when set truthy (default), don't actively restore packages (next build will do so) - makes the process faster",
|
|
486
486
|
default: "true"
|
|
487
487
|
});
|
|
488
|
+
env.register({
|
|
489
|
+
name: "UPGRADE_PACKAGES_BYPASS_CACHE",
|
|
490
|
+
help: "Flag: when set truthy, first clear the nuget http cache before searching for upgrades",
|
|
491
|
+
default: "false"
|
|
492
|
+
});
|
|
488
493
|
env.register({
|
|
489
494
|
name: "PACK_INCLUDE_CSPROJ",
|
|
490
495
|
help: "Mask to apply for inclusions to 'dotnet pack'",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
throw new ZarroError("MONO is required to run nuget restore on this platform");
|
|
100
100
|
}
|
|
101
101
|
const baseFolder = findNpmBase();
|
|
102
|
-
const script = `#!/bin/sh
|
|
102
|
+
const script = `#!/bin/sh
|
|
103
103
|
mono ${path.resolve(nugetPath)} $@`;
|
|
104
104
|
const scriptPath = path.join(baseFolder, "node_modules", ".bin", "mono-nuget");
|
|
105
105
|
writeFileSync(scriptPath, script, { encoding: "utf-8" });
|
|
@@ -55,10 +55,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
55
55
|
this.emit("end");
|
|
56
56
|
}
|
|
57
57
|
catch (err) {
|
|
58
|
-
console.error(chalk.redBright(`
|
|
59
|
-
==================================================
|
|
60
|
-
| WARNING: Unable to update zarro, error(s) follow |
|
|
61
|
-
==================================================
|
|
58
|
+
console.error(chalk.redBright(`
|
|
59
|
+
==================================================
|
|
60
|
+
| WARNING: Unable to update zarro, error(s) follow |
|
|
61
|
+
==================================================
|
|
62
62
|
`));
|
|
63
63
|
this.emit("error", err);
|
|
64
64
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
(function () {
|
|
3
3
|
const { ls, FsEntities, fileExistsSync } = require("yafs"), gulp = requireModule("gulp");
|
|
4
4
|
gulp.task("upgrade-packages", async () => {
|
|
5
|
-
const env = requireModule("env"), { upgradePackages } = requireModule("dotnet-cli"), rawPackageMask = env.resolveArray(env.UPGRADE_PACKAGES), packageMask = parseMasks(rawPackageMask, true), rawTargetMask = env.resolveArray(env.UPGRADE_PACKAGES_TARGET), nugetSource = env.resolve(env.NUGET_SOURCE), showProgress = env.resolveFlag(env.UPGRADE_PACKAGES_PROGRESS), preRelease = env.resolveFlag(env.UPGRADE_PACKAGES_PRERELEASE), noRestore = env.resolveFlag(env.UPGRADE_PACKAGES_NO_RESTORE), targets = await resolveTargets(rawTargetMask);
|
|
5
|
+
const env = requireModule("env"), { upgradePackages } = requireModule("dotnet-cli"), rawPackageMask = env.resolveArray(env.UPGRADE_PACKAGES), packageMask = parseMasks(rawPackageMask, true), rawTargetMask = env.resolveArray(env.UPGRADE_PACKAGES_TARGET), nugetSource = env.resolve(env.NUGET_SOURCE), showProgress = env.resolveFlag(env.UPGRADE_PACKAGES_PROGRESS), preRelease = env.resolveFlag(env.UPGRADE_PACKAGES_PRERELEASE), noRestore = env.resolveFlag(env.UPGRADE_PACKAGES_NO_RESTORE), clearNugetHttpCache = env.resolveFlag(env.UPGRADE_PACKAGES_BYPASS_CACHE), targets = await resolveTargets(rawTargetMask);
|
|
6
6
|
for (const target of targets) {
|
|
7
7
|
await upgradePackages({
|
|
8
8
|
source: nugetSource,
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
packages: packageMask,
|
|
11
11
|
pathToProjectOrSolution: target,
|
|
12
12
|
preRelease: preRelease,
|
|
13
|
-
noRestore: noRestore
|
|
13
|
+
noRestore: noRestore,
|
|
14
|
+
clearNugetHttpCache: clearNugetHttpCache
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
});
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
const e = ex;
|
|
44
44
|
const msg = e.message || e;
|
|
45
45
|
if (msg === "operation timed out") {
|
|
46
|
-
log.error(chalk.redBright(`fetch operation timed out:
|
|
47
|
-
- check that the current account can fetch from all remotes
|
|
48
|
-
- optionally disable fetch with SKIP_FETCH_ON_VERIFY=1
|
|
46
|
+
log.error(chalk.redBright(`fetch operation timed out:
|
|
47
|
+
- check that the current account can fetch from all remotes
|
|
48
|
+
- optionally disable fetch with SKIP_FETCH_ON_VERIFY=1
|
|
49
49
|
- optionally increase GIT_FETCH_TIMEOUT from current value: ${timeout}`));
|
|
50
50
|
}
|
|
51
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zarro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.178.0",
|
|
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"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"event-stream": "^4.0.1",
|
|
64
64
|
"exec-step": "^0.14.0",
|
|
65
65
|
"fancy-log": "^1.3.3",
|
|
66
|
-
"gulp": "^
|
|
66
|
+
"gulp": "^5.0.0",
|
|
67
67
|
"gulp-debug": "^4.0.0",
|
|
68
68
|
"gulp-dotnet-cli": "^1.1.0",
|
|
69
69
|
"gulp-edit-xml": "^3.1.1",
|
package/types.d.ts
CHANGED
|
@@ -523,6 +523,7 @@ declare global {
|
|
|
523
523
|
"BUILD_TOOLS_INSTALL_FORCE_NUGET_EXE" |
|
|
524
524
|
"UPGRADE_PACKAGES_PROGRESS" |
|
|
525
525
|
"UPGRADE_PACKAGES_PRERELEASE" |
|
|
526
|
+
"UPGRADE_PACKAGES_BYPASS_CACHE" |
|
|
526
527
|
string;
|
|
527
528
|
|
|
528
529
|
type AnyEnvVar = StringEnvVar | NumericEnvVar | FlagEnvVar | VersionIncrementStrategy;
|
|
@@ -704,6 +705,7 @@ declare global {
|
|
|
704
705
|
BUILD_TOOLS_INSTALL_FORCE_NUGET_EXE: FlagEnvVar;
|
|
705
706
|
UPGRADE_PACKAGES_PROGRESS: FlagEnvVar;
|
|
706
707
|
UPGRADE_PACKAGES_PRERELEASE: FlagEnvVar;
|
|
708
|
+
UPGRADE_PACKAGES_BYPASS_CACHE: FlagEnvVar;
|
|
707
709
|
|
|
708
710
|
BUILD_MAX_CPU_COUNT: NumericEnvVar;
|
|
709
711
|
MAX_NUNIT_AGENTS: NumericEnvVar;
|
|
@@ -1653,6 +1655,7 @@ declare global {
|
|
|
1653
1655
|
* defaults to true
|
|
1654
1656
|
*/
|
|
1655
1657
|
showProgress?: boolean;
|
|
1658
|
+
clearNugetHttpCache?: boolean;
|
|
1656
1659
|
}
|
|
1657
1660
|
|
|
1658
1661
|
enum DotNetCache {
|