diff --git a/lib/bin/citgm-all.js b/lib/bin/citgm-all.js index 821dbc6e..23c06f3f 100755 --- a/lib/bin/citgm-all.js +++ b/lib/bin/citgm-all.js @@ -45,7 +45,7 @@ const yargs = commonArgs() .example('citgm-all --includeTags express', 'Only test express.') .example('citgm-all --excludeTags native', "Don't test native modules."); -const app = yargs.argv; +const app = yargs.parse(); const log = logger({ level: app.verbose, diff --git a/lib/bin/citgm.js b/lib/bin/citgm.js index 1cd47fa6..f2911566 100755 --- a/lib/bin/citgm.js +++ b/lib/bin/citgm.js @@ -14,7 +14,7 @@ const yargs = commonArgs().usage('citgm [options] ').option('sha', { description: 'Install module from commit-sha, branch or tag' }); -const app = yargs.argv; +const app = yargs.parse(); mod = app._[0]; diff --git a/lib/grab-project.js b/lib/grab-project.js index 535c1755..f76a83b5 100644 --- a/lib/grab-project.js +++ b/lib/grab-project.js @@ -107,6 +107,10 @@ export async function grabProject(context) { }); } +const downloadAgent = new undici.Agent().compose( + undici.interceptors.redirect({ maxRedirections: 5 }) +); + async function downloadPackage(packageUrl, context, timeout) { const filename = path.basename(packageUrl); const out = path.join(context.path, filename); @@ -114,7 +118,7 @@ async function downloadPackage(packageUrl, context, timeout) { const request = await undici.request(packageUrl, { headersTimeout: timeout, bodyTimeout: timeout, - maxRedirections: 5 + dispatcher: downloadAgent }); await pipeline(request.body, createWriteStream(out)); diff --git a/package.json b/package.json index c7308b4a..e0433deb 100644 --- a/package.json +++ b/package.json @@ -36,39 +36,39 @@ "dependencies": { "@npmcli/package-json": "^7.0.0", "async": "^3.2.6", - "bl": "^6.0.16", - "chalk": "^5.4.0", + "bl": "^6.1.3", + "chalk": "^5.6.2", "columnify": "^1.6.0", - "execa": "^9.5.2", + "execa": "^9.6.0", "lodash": "^4.17.21", "normalize-git-url": "^3.0.2", - "npm-package-arg": "^12.0.1", + "npm-package-arg": "^13.0.0", "npm-which": "^3.0.1", - "pnpm": "^9.15.1", + "pnpm": "^10.15.1", "root-check": "^2.0.0", - "semver": "^7.6.3", - "strip-ansi": "^7.1.0", - "supports-color": "^10.0.0", + "semver": "^7.7.2", + "strip-ansi": "^7.1.2", + "supports-color": "^10.2.2", "tar": "^7.4.3", "uid-number": "0.0.6", - "undici": "^6.21.0", + "undici": "^7.16.0", "which": "^5.0.0", "winston": "^3.17.0", "xml-sanitizer": "^2.0.2", "xmlbuilder": "^15.1.1", - "yargs": "^17.7.2", + "yargs": "^18.0.0", "yarn": "^1.22.22" }, "devDependencies": { - "@eslint/js": "^9.17.0", - "ansi-regex": "^6.1.0", - "eslint": "^9.17.0", - "eslint-config-prettier": "^9.1.0", - "globals": "^15.14.0", - "prettier": "^3.4.2", + "@eslint/js": "^9.35.0", + "ansi-regex": "^6.2.2", + "eslint": "^9.35.0", + "eslint-config-prettier": "^10.1.8", + "globals": "^16.4.0", + "prettier": "^3.6.2", "string-to-stream": "^3.0.1", - "tap": "^20.0.3", - "tap-parser": "^17.0.0", + "tap": "^21.1.0", + "tap-parser": "^18.0.0", "xml2js": "^0.6.2" }, "prettier": {