@vercel/build-utils 13.33.0 → 13.33.1
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/CHANGELOG.md +8 -0
- package/dist/file-ref.js +6 -4
- package/dist/index.js +45 -3006
- package/package.json +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.33.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- def07fc: Migrate `@vercel/client` and `@vercel/build-utils` from `node-fetch` to native `fetch`. This removes the last `url.parse()` usage from the CLI bundle, which triggered a `DEP0169` DeprecationWarning on Node 24 (visible in the standalone binary during `vercel deploy`).
|
|
8
|
+
|
|
9
|
+
BREAKING CHANGE (`@vercel/client`): the `agent?: http.Agent` option was replaced with `dispatcher?: FetchDispatcher` (an undici dispatcher, e.g. `undici.ProxyAgent`), since native `fetch` does not support Node.js HTTP agents. The CLI now threads its proxy-aware dispatcher through automatically, so `HTTP_PROXY`/`HTTPS_PROXY` behavior is unchanged for CLI users.
|
|
10
|
+
|
|
3
11
|
## 13.33.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/file-ref.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(file_ref_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(file_ref_exports);
|
|
34
34
|
var import_assert = __toESM(require("assert"));
|
|
35
|
-
var
|
|
35
|
+
var import_stream = require("stream");
|
|
36
36
|
var import_multistream = __toESM(require("multistream"));
|
|
37
37
|
var import_async_retry = __toESM(require("async-retry"));
|
|
38
38
|
var import_async_sema = __toESM(require("async-sema"));
|
|
@@ -97,16 +97,18 @@ class FileRef {
|
|
|
97
97
|
try {
|
|
98
98
|
return await (0, import_async_retry.default)(
|
|
99
99
|
async () => {
|
|
100
|
-
const resp = await (
|
|
101
|
-
if (!resp.ok) {
|
|
100
|
+
const resp = await fetch(url);
|
|
101
|
+
if (!resp.ok || !resp.body) {
|
|
102
102
|
const error = new BailableError(
|
|
103
103
|
`download: ${resp.status} ${resp.statusText} for ${url}`
|
|
104
104
|
);
|
|
105
105
|
if (resp.status === 403)
|
|
106
106
|
error.bail = true;
|
|
107
|
+
await resp.body?.cancel().catch(() => {
|
|
108
|
+
});
|
|
107
109
|
throw error;
|
|
108
110
|
}
|
|
109
|
-
return resp.body;
|
|
111
|
+
return import_stream.Readable.fromWeb(resp.body);
|
|
110
112
|
},
|
|
111
113
|
{ factor: 1, retries: 3 }
|
|
112
114
|
);
|