Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump undici from 5.28.4 to 5.28.5 #650

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var require$$1$1 = require('node:util');
var require$$0$5 = require('node:stream');
var require$$7 = require('node:buffer');
var require$$8 = require('node:querystring');
var require$$13 = require('node:stream/web');
var require$$14 = require('node:stream/web');
var require$$0$7 = require('node:worker_threads');
var require$$2$1 = require('node:perf_hooks');
var require$$5 = require('node:util/types');
Expand Down Expand Up @@ -1458,7 +1458,7 @@ function requireUtil$6 () {
let ReadableStream;
function ReadableStreamFrom (iterable) {
if (!ReadableStream) {
ReadableStream = require$$13.ReadableStream;
ReadableStream = require$$14.ReadableStream;
}

if (ReadableStream.from) {
Expand Down Expand Up @@ -4311,7 +4311,7 @@ function requireUtil$5 () {

function isReadableStreamLike (stream) {
if (!ReadableStream) {
ReadableStream = require$$13.ReadableStream;
ReadableStream = require$$14.ReadableStream;
}

return stream instanceof ReadableStream || (
Expand Down Expand Up @@ -6451,6 +6451,14 @@ function requireBody () {
const { File: UndiciFile } = requireFile();
const { parseMIMEType, serializeAMimeType } = requireDataURL();

let random;
try {
const crypto = require('node:crypto');
random = (max) => crypto.randomInt(0, max);
} catch {
random = (max) => Math.floor(Math.random(max));
}

let ReadableStream = globalThis.ReadableStream;

/** @type {globalThis['File']} */
Expand All @@ -6461,7 +6469,7 @@ function requireBody () {
// https://fetch.spec.whatwg.org/#concept-bodyinit-extract
function extractBody (object, keepalive = false) {
if (!ReadableStream) {
ReadableStream = require$$13.ReadableStream;
ReadableStream = require$$14.ReadableStream;
}

// 1. Let stream be null.
Expand Down Expand Up @@ -6536,7 +6544,7 @@ function requireBody () {
// Set source to a copy of the bytes held by object.
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength));
} else if (util.isFormDataLike(object)) {
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`;
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`;
const prefix = `--${boundary}\r\nContent-Disposition: form-data`;

/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
Expand Down Expand Up @@ -6682,7 +6690,7 @@ function requireBody () {
function safelyExtractBody (object, keepalive = false) {
if (!ReadableStream) {
// istanbul ignore next
ReadableStream = require$$13.ReadableStream;
ReadableStream = require$$14.ReadableStream;
}

// To safely extract a body and a `Content-Type` value from
Expand Down Expand Up @@ -15338,7 +15346,7 @@ function requireResponse () {
const assert = require$$0$4;
const { types } = require$$1$1;

const ReadableStream = globalThis.ReadableStream || require$$13.ReadableStream;
const ReadableStream = globalThis.ReadableStream || require$$14.ReadableStream;
const textEncoder = new TextEncoder('utf-8');

// https://fetch.spec.whatwg.org/#response-class
Expand Down Expand Up @@ -16407,7 +16415,7 @@ function requireRequest () {

// 2. Set finalBody to the result of creating a proxy for inputBody.
if (!TransformStream) {
TransformStream = require$$13.TransformStream;
TransformStream = require$$14.TransformStream;
}

// https://streams.spec.whatwg.org/#readablestream-create-a-proxy
Expand Down Expand Up @@ -16900,7 +16908,7 @@ function requireFetch () {
const { Readable, pipeline } = require$$0$5;
const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = requireUtil$6();
const { dataURLProcessor, serializeAMimeType } = requireDataURL();
const { TransformStream } = require$$13;
const { TransformStream } = require$$14;
const { getGlobalDispatcher } = requireGlobal();
const { webidl } = requireWebidl();
const { STATUS_CODES } = require$$2;
Expand Down Expand Up @@ -18570,7 +18578,7 @@ function requireFetch () {
// cancelAlgorithm set to cancelAlgorithm, highWaterMark set to
// highWaterMark, and sizeAlgorithm set to sizeAlgorithm.
if (!ReadableStream) {
ReadableStream = require$$13.ReadableStream;
ReadableStream = require$$14.ReadableStream;
}

const stream = new ReadableStream(
Expand Down
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.