New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

unenv

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unenv - npm Package Compare versions

Comparing version

to
1.0.1

runtime/node/util/_legacy-types.cjs

4

dist/index.d.ts

@@ -19,3 +19,5 @@ declare const NodeBuiltinModules: string[];

declare const nodeless: Preset;
declare const nodeless: Preset & {
alias: Map<string, string>;
};

@@ -22,0 +24,0 @@ declare function env(...presets: Preset[]): Environment;

{
"name": "unenv",
"version": "1.0.0",
"version": "1.0.1",
"description": "",

@@ -27,8 +27,2 @@ "repository": "unjs/unenv",

],
"scripts": {
"build": "unbuild",
"lint": "eslint --ext .ts .",
"prepack": "unbuild",
"release": "standard-version && pnpm publish && git push --follow-tags"
},
"dependencies": {

@@ -41,11 +35,19 @@ "defu": "^6.1.1",

"devDependencies": {
"@types/node": "^18.11.9",
"@types/node": "^18.11.18",
"consola": "^2.15.3",
"eslint": "^8.27.0",
"eslint-config-unjs": "^0.0.2",
"eslint": "^8.31.0",
"eslint-config-unjs": "^0.0.3",
"prettier": "^2.8.1",
"standard-version": "^9.5.0",
"typescript": "^4.8.4",
"unbuild": "^0.9.4"
"typescript": "^4.9.4",
"unbuild": "^1.0.2"
},
"packageManager": "pnpm@7.16.0"
}
"packageManager": "pnpm@7.21.0",
"scripts": {
"build": "unbuild",
"lint": "eslint --ext .ts . && prettier -c src",
"typecheck": "tsc --noEmit",
"release": "pnpm test && standard-version && pnpm publish && git push --follow-tags",
"test": "pnpm lint && pnpm typecheck"
}
}

@@ -1,5 +0,5 @@

export declare type Callback<E = Error | null | undefined> = (error?: E) => void;
export declare type HeadersObject = {
export type Callback<E = Error | null | undefined> = (error?: E) => void;
export type HeadersObject = {
[key: string]: string | string[] | undefined;
};
export declare type BufferEncoding = any;
export type BufferEncoding = any;
import type { HeadersObject } from "./types";
export declare function rawHeaders(headers: HeadersObject): any[];
export declare function mergeFns(...functions: Function[]): (...args: any[]) => void;
export declare function rawHeaders(headers: HeadersObject): never[];
type Fn = (...args: any[]) => any;
export declare function mergeFns(...functions: Fn[]): (...args: any[]) => void;
export declare function notImplemented(name: string): () => any;
export {};
import { IncomingMessage } from "../node/http/_request";
import { ServerResponse } from "../node/http/_response";
export declare type Handle = (req: IncomingMessage, res: ServerResponse) => Promise<any>;
export declare type CallHandle = ReturnType<typeof createCall>;
export type Handle = (req: IncomingMessage, res: ServerResponse) => Promise<any>;
export type CallHandle = ReturnType<typeof createCall>;
export interface CallContext {

@@ -6,0 +6,0 @@ [key: string]: any;

import { CallContext, CallHandle } from "./call";
export * from "./call";
export declare type FetchOptions = globalThis.RequestInit & CallContext;
export type FetchOptions = globalThis.RequestInit & CallContext;
export declare function createFetch(call: CallHandle, _fetch?: typeof fetch): (input: string | Request, init: FetchOptions) => Promise<Response>;
export { Buffer, kMaxLength, INSPECT_MAX_BYTES, SlowBuffer } from "./_buffer";
export declare const Blob: {
new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
prototype: Blob;
};
export declare const Blob: any;
export declare const resolveObjectURL: () => any;

@@ -7,0 +4,0 @@ export declare const transcode: () => any;

import type fsp from "node:fs/promises";
export { constants } from "../_constants";
export declare const access: typeof fsp.access;

@@ -3,0 +4,0 @@ export declare const copyFile: typeof fsp.copyFile;

@@ -18,7 +18,9 @@ import type http from "node:http";

statusMessage: string;
closed: boolean;
errored: Error | null;
readable: boolean;
constructor(socket?: Socket);
get rawHeaders(): any[];
get rawTrailers(): any[];
get rawHeaders(): never[];
get rawTrailers(): never[];
setTimeout(_msecs: number, _callback?: () => void): this;
}

@@ -36,2 +36,3 @@ /// <reference types="node" />

flushHeaders(): void;
writeEarlyHints(_headers: http.OutgoingHttpHeaders, cb: () => void): void;
}

@@ -1,2 +0,2 @@

import http from "node:http";
import type http from "node:http";
export * from "./_consts";

@@ -13,3 +13,6 @@ export * from "./_request";

export declare const globalAgent: typeof http.globalAgent;
export declare const validateHeaderName: typeof http.validateHeaderName;
export declare const validateHeaderValue: typeof http.validateHeaderValue;
export declare const setMaxIdleHTTPParsers: typeof http.setMaxIdleHTTPParsers;
declare const _default: any;
export default _default;

@@ -30,2 +30,3 @@ /// <reference types="node" />

ref(): this;
resetAndDestroy(): this;
}
/// <reference types="node" />
import type * as stream from "node:stream";
declare type DuplexClass = new () => stream.Duplex;
type DuplexClass = new () => stream.Duplex;
export declare const Duplex: DuplexClass;
export {};

@@ -1,2 +0,2 @@

import stream from "node:stream";
import type stream from "node:stream";
export { Readable } from "./readable";

@@ -3,0 +3,0 @@ export { Writable } from "./writable";

@@ -15,2 +15,4 @@ /// <reference types="node" />

readonly readableDidRead: boolean;
readonly closed: boolean;
readonly errored: Error | null;
readable: boolean;

@@ -17,0 +19,0 @@ destroyed: boolean;

/// <reference types="node" />
import type * as stramWeb from "node:stream/web";
export declare const ReadableStream: (() => any) | {
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
export declare const ReadableStream: {
new (underlyingSource: UnderlyingByteSource, strategy?: {
highWaterMark?: number | undefined;
} | undefined): ReadableStream<Uint8Array>;
new <R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R> | undefined): ReadableStream<R>;
new <R_1 = any>(underlyingSource?: UnderlyingSource<R_1> | undefined, strategy?: QueuingStrategy<R_1> | undefined): ReadableStream<R_1>;
prototype: ReadableStream<any>;
};
export declare const ReadableStreamDefaultReader: (() => any) | {
export declare const ReadableStreamDefaultReader: {
new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
prototype: ReadableStreamDefaultReader<any>;
};
export declare const ReadableStreamBYOBReader: (() => any) | {
export declare const ReadableStreamBYOBReader: {
new (stream: ReadableStream<any>): ReadableStreamBYOBReader;
prototype: ReadableStreamBYOBReader;
};
export declare const ReadableStreamBYOBRequest: (() => any) | {
export declare const ReadableStreamBYOBRequest: {
new (): ReadableStreamBYOBRequest;
prototype: ReadableStreamBYOBRequest;
};
export declare const ReadableByteStreamController: (() => any) | {
export declare const ReadableByteStreamController: {
new (): ReadableByteStreamController;
prototype: ReadableByteStreamController;
};
export declare const ReadableStreamDefaultController: (() => any) | {
export declare const ReadableStreamDefaultController: {
new (): ReadableStreamDefaultController<any>;
prototype: ReadableStreamDefaultController<any>;
};
export declare const TransformStream: (() => any) | {
new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
export declare const TransformStream: {
new <I = any, O = any>(transformer?: Transformer<I, O> | undefined, writableStrategy?: QueuingStrategy<I> | undefined, readableStrategy?: QueuingStrategy<O> | undefined): TransformStream<I, O>;
prototype: TransformStream<any, any>;
};
export declare const TransformStreamDefaultController: (() => any) | {
export declare const TransformStreamDefaultController: {
new (): TransformStreamDefaultController<any>;
prototype: TransformStreamDefaultController<any>;
};
export declare const WritableStream: (() => any) | {
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
export declare const WritableStream: {
new <W = any>(underlyingSink?: UnderlyingSink<W> | undefined, strategy?: QueuingStrategy<W> | undefined): WritableStream<W>;
prototype: WritableStream<any>;
};
export declare const WritableStreamDefaultWriter: (() => any) | {
export declare const WritableStreamDefaultWriter: {
new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
prototype: WritableStreamDefaultWriter<any>;
};
export declare const WritableStreamDefaultController: (() => any) | {
export declare const WritableStreamDefaultController: {
new (): WritableStreamDefaultController;
prototype: WritableStreamDefaultController;
};
export declare const ByteLengthQueuingStrategy: (() => any) | {
export declare const ByteLengthQueuingStrategy: {
new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
prototype: ByteLengthQueuingStrategy;
};
export declare const CountQueuingStrategy: (() => any) | {
export declare const CountQueuingStrategy: {
new (init: QueuingStrategyInit): CountQueuingStrategy;
prototype: CountQueuingStrategy;
};
export declare const TextEncoderStream: (() => any) | {
export declare const TextEncoderStream: {
new (): TextEncoderStream;
prototype: TextEncoderStream;
};
export declare const TextDecoderStream: (() => any) | {
new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
export declare const TextDecoderStream: {
new (label?: string | undefined, options?: TextDecoderOptions | undefined): TextDecoderStream;
prototype: TextDecoderStream;

@@ -62,0 +66,0 @@ };

@@ -14,2 +14,5 @@ /// <reference types="node" />

readonly writableCorked: number;
readonly closed: boolean;
readonly errored: Error | null;
readonly writableNeedDrain: boolean;
destroyed: boolean;

@@ -16,0 +19,0 @@ _data: unknown;

@@ -1,9 +0,4 @@

export declare const URL: {
new (url: string | URL, base?: string | URL): URL;
prototype: URL;
createObjectURL(obj: Blob | MediaSource): string;
revokeObjectURL(url: string): void;
};
export declare const URL: any;
export declare const URLSearchParams: {
new (init?: string | URLSearchParams | Record<string, string> | string[][]): URLSearchParams;
new (init?: string | URLSearchParams | Record<string, string> | string[][] | undefined): URLSearchParams;
prototype: URLSearchParams;

@@ -10,0 +5,0 @@ toString(): string;

import type util from "node:util";
export * from "./_legacyTypes";
export * from "./_legacy-types";
export * from "./_log";

@@ -17,3 +17,6 @@ export { default as inherits } from "../../npm/inherits";

export declare const stripVTControlCharacters: typeof util.stripVTControlCharacters;
export declare const transferableAbortController: typeof util.transferableAbortController;
export declare const transferableAbortSignal: typeof util.transferableAbortSignal;
export declare const parseArgs: typeof util.parseArgs;
declare const _default: any;
export default _default;

@@ -1,2 +0,2 @@

import utilTypes from "node:util/types";
import type utilTypes from "node:util/types";
export declare const isExternal: typeof utilTypes.isExternal;

@@ -3,0 +3,0 @@ export declare const isDate: typeof utilTypes.isDate;

@@ -1,16 +0,16 @@

export declare const fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
export declare const fetch: (input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>;
export default fetch;
export declare const Headers: {
new (init?: HeadersInit): Headers;
new (init?: HeadersInit | undefined): Headers;
prototype: Headers;
};
export declare const Request: {
new (input: RequestInfo | URL, init?: RequestInit): Request;
new (input: RequestInfo | URL, init?: RequestInit | undefined): Request;
prototype: Request;
};
export declare const Response: {
new (body?: BodyInit, init?: ResponseInit): Response;
new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response;
prototype: Response;
error(): Response;
redirect(url: string | URL, status?: number): Response;
redirect(url: string | URL, status?: number | undefined): Response;
};
declare const _default: {
watch(_dir: string, _cb: Function): Promise<void>;
watch(_dir: string, _cb: (...args: any[]) => any): Promise<void>;
getInfo(path: string, _flags: number, _id: string): {

@@ -4,0 +4,0 @@ event: string;

@@ -1,3 +0,3 @@

declare const fetch: {
(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
export declare const fetch: {
(input: RequestInfo | URL, init?: RequestInit | undefined): Promise<Response>;
Promise: PromiseConstructor;

@@ -7,14 +7,14 @@ isRedirect: (code: number) => boolean;

export declare const Headers: {
new (init?: HeadersInit): Headers;
new (init?: HeadersInit | undefined): Headers;
prototype: Headers;
};
export declare const Request: {
new (input: RequestInfo | URL, init?: RequestInit): Request;
new (input: RequestInfo | URL, init?: RequestInit | undefined): Request;
prototype: Request;
};
export declare const Response: {
new (body?: BodyInit, init?: ResponseInit): Response;
new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response;
prototype: Response;
error(): Response;
redirect(url: string | URL, status?: number): Response;
redirect(url: string | URL, status?: number | undefined): Response;
};

@@ -21,0 +21,0 @@ export declare const FetchError: ErrorConstructor;

export declare const URL: {
new (url: string | URL, base?: string | URL): URL;
new (url: string | URL, base?: string | URL | undefined): URL;
prototype: URL;

@@ -8,3 +8,3 @@ createObjectURL(obj: Blob | MediaSource): string;

export declare const URLSearchParams: {
new (init?: string | URLSearchParams | Record<string, string> | string[][]): URLSearchParams;
new (init?: string | URLSearchParams | Record<string, string> | string[][] | undefined): URLSearchParams;
prototype: URLSearchParams;

@@ -11,0 +11,0 @@ toString(): string;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet