Comparing version 5.25.2 to 5.25.3
@@ -34,2 +34,10 @@ 'use strict' | ||
module.exports = function () { | ||
// FIXME: remove workaround when the Node bug is fixed | ||
// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 | ||
if (process.env.NODE_V8_COVERAGE) { | ||
return { | ||
WeakRef: CompatWeakRef, | ||
FinalizationRegistry: CompatFinalizer | ||
} | ||
} | ||
return { | ||
@@ -36,0 +44,0 @@ WeakRef: global.WeakRef || CompatWeakRef, |
@@ -61,27 +61,27 @@ 'use strict' | ||
if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { | ||
throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') | ||
if (!/^https?:/.test(url.origin || url.protocol)) { | ||
throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') | ||
} | ||
if (url.path != null && typeof url.path !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') | ||
} | ||
if (!(url instanceof URL)) { | ||
if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { | ||
throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') | ||
} | ||
if (url.pathname != null && typeof url.pathname !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') | ||
} | ||
if (url.path != null && typeof url.path !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') | ||
} | ||
if (url.hostname != null && typeof url.hostname !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') | ||
} | ||
if (url.pathname != null && typeof url.pathname !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') | ||
} | ||
if (url.origin != null && typeof url.origin !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') | ||
} | ||
if (url.hostname != null && typeof url.hostname !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') | ||
} | ||
if (!/^https?:/.test(url.origin || url.protocol)) { | ||
throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') | ||
} | ||
if (url.origin != null && typeof url.origin !== 'string') { | ||
throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') | ||
} | ||
if (!(url instanceof URL)) { | ||
const port = url.port != null | ||
@@ -88,0 +88,0 @@ ? url.port |
'use strict' | ||
const Busboy = require('busboy') | ||
const Busboy = require('@fastify/busboy') | ||
const util = require('../core/util') | ||
@@ -388,6 +388,5 @@ const { | ||
try { | ||
busboy = Busboy({ | ||
busboy = new Busboy({ | ||
headers, | ||
preservePath: true, | ||
defParamCharset: 'utf8' | ||
preservePath: true | ||
}) | ||
@@ -401,4 +400,3 @@ } catch (err) { | ||
}) | ||
busboy.on('file', (name, value, info) => { | ||
const { filename, encoding, mimeType } = info | ||
busboy.on('file', (name, value, filename, encoding, mimeType) => { | ||
const chunks = [] | ||
@@ -405,0 +403,0 @@ |
@@ -12,10 +12,2 @@ 'use strict' | ||
function setGlobalOrigin (newOrigin) { | ||
if ( | ||
newOrigin !== undefined && | ||
typeof newOrigin !== 'string' && | ||
!(newOrigin instanceof URL) | ||
) { | ||
throw new Error('Invalid base url') | ||
} | ||
if (newOrigin === undefined) { | ||
@@ -22,0 +14,0 @@ Object.defineProperty(globalThis, globalOrigin, { |
{ | ||
"name": "undici", | ||
"version": "5.25.2", | ||
"version": "5.25.3", | ||
"description": "An HTTP/1.1 client, written from scratch for Node.js", | ||
@@ -164,4 +164,4 @@ "homepage": "https://undici.nodejs.org", | ||
"dependencies": { | ||
"busboy": "^1.6.0" | ||
"@fastify/busboy": "^2.0.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1144749
19922
13
+ Added@fastify/busboy@^2.0.0
+ Added@fastify/busboy@2.1.1(transitive)
- Removedbusboy@^1.6.0
- Removedbusboy@1.6.0(transitive)
- Removedstreamsearch@1.1.0(transitive)