@edge-runtime/node-utils
Advanced tools
Comparing version 3.0.0 to 4.0.0
import { IncomingMessage, ServerResponse, IncomingHttpHeaders } from 'http'; | ||
import * as _edge_runtime_primitives from '@edge-runtime/primitives'; | ||
import { Headers, ReadableStream as ReadableStream$1, Request, FetchEvent, Response } from '@edge-runtime/primitives'; | ||
import { Headers as Headers$1, ReadableStream as ReadableStream$1, Request, FetchEvent, Response } from '@edge-runtime/primitives'; | ||
import { OutgoingHttpHeaders, ServerResponse as ServerResponse$1, IncomingMessage as IncomingMessage$1 } from 'node:http'; | ||
@@ -8,3 +8,3 @@ import { Readable } from 'node:stream'; | ||
interface BuildDependencies { | ||
Headers: typeof Headers; | ||
Headers: typeof Headers$1; | ||
ReadableStream: typeof ReadableStream$1; | ||
@@ -26,13 +26,3 @@ Request: typeof Request; | ||
interface FromWebOptions { | ||
objectMode?: boolean; | ||
highWaterMark?: number; | ||
encoding?: BufferEncoding; | ||
signal?: AbortSignal; | ||
} | ||
/** | ||
* Code adapted from Node's stream.Readable.fromWeb(), because it has to run on Node@14 | ||
* @see https://github.com/nodejs/node/blob/bd462ad81bc30e547e52e699ee3b6fa3d7c882c9/lib/internal/webstreams/adapters.js#L458 | ||
*/ | ||
declare function toToReadable(webStream: ReadableStream, options?: FromWebOptions): Readable; | ||
declare const toToReadable: any; | ||
@@ -42,5 +32,5 @@ declare function buildToFetchEvent(dependencies: BuildDependencies): (request: Request) => _edge_runtime_primitives.FetchEvent; | ||
interface Dependencies$1 { | ||
Headers: typeof Headers; | ||
Headers: typeof Headers$1; | ||
} | ||
declare function buildToHeaders({ Headers }: Dependencies$1): (nodeHeaders: IncomingHttpHeaders) => Headers; | ||
declare function buildToHeaders({ Headers }: Dependencies$1): (nodeHeaders: IncomingHttpHeaders) => Headers$1; | ||
@@ -47,0 +37,0 @@ declare function buildToRequest(dependencies: BuildDependencies): (request: IncomingMessage$1, options: RequestOptions) => Request; |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://edge-runtime.vercel.app/packages/node-utils", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"main": "dist/index.js", | ||
@@ -31,6 +31,6 @@ "module": "dist/index.mjs", | ||
"tsup": "8", | ||
"@edge-runtime/primitives": "5.0.0" | ||
"@edge-runtime/primitives": "6.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
"node": ">=18" | ||
}, | ||
@@ -37,0 +37,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 5 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1840898
38936
21
16