Skip to content

Commit c121687

Browse files
committed
chore: update undici to v7
1 parent 2f2083e commit c121687

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/grab-project.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,18 @@ export async function grabProject(context) {
107107
});
108108
}
109109

110+
const downloadAgent = new undici.Agent().compose(
111+
undici.interceptors.redirect({ maxRedirections: 5 })
112+
);
113+
110114
async function downloadPackage(packageUrl, context, timeout) {
111115
const filename = path.basename(packageUrl);
112116
const out = path.join(context.path, filename);
113117

114118
const request = await undici.request(packageUrl, {
115119
headersTimeout: timeout,
116120
bodyTimeout: timeout,
117-
maxRedirections: 5
121+
dispatcher: downloadAgent
118122
});
119123

120124
await pipeline(request.body, createWriteStream(out));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"supports-color": "^10.2.2",
5252
"tar": "^7.4.3",
5353
"uid-number": "0.0.6",
54-
"undici": "^6.21.3",
54+
"undici": "^7.16.0",
5555
"which": "^5.0.0",
5656
"winston": "^3.17.0",
5757
"xml-sanitizer": "^2.0.2",

0 commit comments

Comments
 (0)