Skip to content
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"ultrahtml": "^1.6.0",
"uncrypto": "^0.1.3",
"unctx": "^2.4.1",
"unenv": "2.0.0-rc.17",
"unenv": "^2.0.0-rc.18",
"unimport": "^5.0.1",
"unplugin-utils": "^0.2.4",
"unstorage": "^1.16.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions src/presets/_unenv/node-compat/cloudflare.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto generated using gen-node-compat.ts on 2025-04-10
// Auto generated using gen-node-compat.ts on 2025-06-25
// Source: https://platform-node-compat.pi0.workers.dev/
// Do not edit this file manually

Expand Down Expand Up @@ -42,7 +42,7 @@ export const hybridNodeModules = [
"crypto", // Missing exports: Cipher, Decipher
"module", // Missing exports: Module, SourceMap, constants, enableCompileCache, findPackageJSON, findSourceMap, flushCompileCache, getCompileCacheDir, getSourceMapsSupport, globalPaths, register, runMain, setSourceMapsSupport, stripTypeScriptTypes, syncBuiltinESMExports
"process", // Missing exports: abort, allowedNodeEnvironmentFlags, arch, argv, argv0, assert, availableMemory, binding, chdir, config, constrainedMemory, cpuUsage, cwd, debugPort, dlopen, domain, emitWarning, execArgv, execPath, exitCode, finalization, getActiveResourcesInfo, getegid, geteuid, getgid, getgroups, getuid, hasUncaughtExceptionCaptureCallback, hrtime, initgroups, kill, loadEnvFile, memoryUsage, moduleLoadList, openStdin, pid, ppid, reallyExit, ref, release, report, resourceUsage, setSourceMapsEnabled, setUncaughtExceptionCaptureCallback, setegid, seteuid, setgid, setgroups, setuid, sourceMapsEnabled, stderr, stdin, stdout, title, umask, unref, uptime, version, versions
"tls", // Missing exports: CLIENT_RENEG_LIMIT, CLIENT_RENEG_WINDOW, DEFAULT_CIPHERS, DEFAULT_ECDH_CURVE, DEFAULT_MAX_VERSION, DEFAULT_MIN_VERSION, Server, createSecurePair, createServer, getCiphers, rootCertificates
"tls", // Missing exports: createSecurePair
"util", // Missing exports: isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined
];

Expand Down
16 changes: 8 additions & 8 deletions src/presets/_unenv/node-compat/deno.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto generated using gen-node-compat.ts on 2025-04-10
// Auto generated using gen-node-compat.ts on 2025-06-25
// Source: https://platform-node-compat.deno.dev/
// Do not edit this file manually

Expand All @@ -8,11 +8,11 @@ export const builtnNodeModules = [
"_http_common", // Missing exports: freeParser, isLenient, parsers, prepareError
"_http_outgoing",
"_http_server", // Missing exports: Server, ServerResponse, httpServerPreClose, kConnectionsCheckingInterval, kServerResponse, setupConnectionsTracking, storeHTTPOptions
"_stream_duplex",
"_stream_duplex", // Missing exports: from, fromWeb, toWeb
"_stream_passthrough",
"_stream_readable",
"_stream_readable", // Missing exports: ReadableState, from, fromWeb, toWeb, wrap
"_stream_transform",
"_stream_writable",
"_stream_writable", // Missing exports: WritableState, fromWeb, toWeb
"_tls_common", // Missing exports: SecureContext, translatePeerCertificate
"_tls_wrap",
"assert", // Missing exports: CallTracker, partialDeepStrictEqual
Expand Down Expand Up @@ -44,26 +44,26 @@ export const builtnNodeModules = [
"path/posix", // Missing exports: matchesGlob
"path/win32", // Missing exports: matchesGlob
"perf_hooks", // Missing exports: Performance, PerformanceMark, PerformanceMeasure, PerformanceObserverEntryList, PerformanceResourceTiming, createHistogram
"process", // Missing exports: assert, availableMemory, binding, config, constrainedMemory, cpuUsage, debugPort, domain, exitCode, features, finalization, getActiveResourcesInfo, getgroups, hasUncaughtExceptionCaptureCallback, initgroups, loadEnvFile, moduleLoadList, openStdin, ppid, reallyExit, ref, release, report, resourceUsage, setSourceMapsEnabled, setUncaughtExceptionCaptureCallback, setegid, seteuid, setgid, setgroups, setuid, sourceMapsEnabled, title, unref, uptime
"process", // Missing exports: assert, availableMemory, binding, config, constrainedMemory, debugPort, domain, exitCode, features, finalization, getActiveResourcesInfo, getgroups, hasUncaughtExceptionCaptureCallback, initgroups, loadEnvFile, moduleLoadList, openStdin, ppid, reallyExit, ref, release, report, resourceUsage, setSourceMapsEnabled, setUncaughtExceptionCaptureCallback, setegid, seteuid, setgid, setgroups, setuid, sourceMapsEnabled, title, unref, uptime
"punycode",
"querystring",
"readline",
"readline/promises",
"repl", // Missing exports: Recoverable, writer
"sqlite", // Missing exports: StatementSync
"stream", // Missing exports: duplexPair, promises
"stream", // Missing exports: destroy, promises
"stream/consumers",
"stream/promises",
"stream/web",
"string_decoder",
"sys", // Missing exports: MIMEParams, MIMEType, getCallSite, getCallSites, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"sys", // Missing exports: MIMEParams, MIMEType, getCallSite, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"timers", // Missing exports: active, enroll, unenroll
"timers/promises",
"tls", // Missing exports: SecureContext, convertALPNProtocols
"trace_events",
"tty",
"url",
"util", // Missing exports: MIMEParams, MIMEType, getCallSite, getCallSites, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"util", // Missing exports: MIMEParams, MIMEType, getCallSite, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"util/types", // Missing exports: isExternal
"v8", // Missing exports: GCProfiler, promiseHooks, queryObjects, setHeapSnapshotNearHeapLimit, startupSnapshot
"vm",
Expand Down
16 changes: 8 additions & 8 deletions src/presets/_unenv/node-compat/netlify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto generated using gen-node-compat.ts on 2025-04-10
// Auto generated using gen-node-compat.ts on 2025-06-25
// Source: https://platform-node-compat.netlify.app/
// Do not edit this file manually

Expand All @@ -8,11 +8,11 @@ export const builtnNodeModules = [
"_http_common", // Missing exports: freeParser, isLenient, parsers, prepareError
"_http_outgoing",
"_http_server", // Missing exports: Server, ServerResponse, httpServerPreClose, kConnectionsCheckingInterval, kServerResponse, setupConnectionsTracking, storeHTTPOptions
"_stream_duplex",
"_stream_duplex", // Missing exports: from, fromWeb, toWeb
"_stream_passthrough",
"_stream_readable",
"_stream_readable", // Missing exports: ReadableState, from, fromWeb, toWeb, wrap
"_stream_transform",
"_stream_writable",
"_stream_writable", // Missing exports: WritableState, fromWeb, toWeb
"_tls_common", // Missing exports: SecureContext, translatePeerCertificate
"_tls_wrap",
"assert", // Missing exports: CallTracker, partialDeepStrictEqual
Expand Down Expand Up @@ -44,26 +44,26 @@ export const builtnNodeModules = [
"path/posix", // Missing exports: matchesGlob
"path/win32", // Missing exports: matchesGlob
"perf_hooks", // Missing exports: Performance, PerformanceMark, PerformanceMeasure, PerformanceObserverEntryList, PerformanceResourceTiming, createHistogram
"process", // Missing exports: assert, availableMemory, binding, config, constrainedMemory, cpuUsage, debugPort, domain, exitCode, features, finalization, getActiveResourcesInfo, getgroups, hasUncaughtExceptionCaptureCallback, initgroups, loadEnvFile, moduleLoadList, openStdin, ppid, reallyExit, ref, release, report, resourceUsage, setSourceMapsEnabled, setUncaughtExceptionCaptureCallback, setegid, seteuid, setgid, setgroups, setuid, sourceMapsEnabled, title, unref, uptime
"process", // Missing exports: assert, availableMemory, binding, config, constrainedMemory, debugPort, domain, exitCode, features, finalization, getActiveResourcesInfo, getgroups, hasUncaughtExceptionCaptureCallback, initgroups, loadEnvFile, moduleLoadList, openStdin, ppid, reallyExit, ref, release, report, resourceUsage, setSourceMapsEnabled, setUncaughtExceptionCaptureCallback, setegid, seteuid, setgid, setgroups, setuid, sourceMapsEnabled, title, unref, uptime
"punycode",
"querystring",
"readline",
"readline/promises",
"repl", // Missing exports: Recoverable, writer
"sqlite", // Missing exports: StatementSync
"stream", // Missing exports: duplexPair, promises
"stream", // Missing exports: destroy, promises
"stream/consumers",
"stream/promises",
"stream/web",
"string_decoder",
"sys", // Missing exports: MIMEParams, MIMEType, getCallSite, getCallSites, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"sys", // Missing exports: MIMEParams, MIMEType, getCallSite, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"timers", // Missing exports: active, enroll, unenroll
"timers/promises",
"tls", // Missing exports: SecureContext, convertALPNProtocols
"trace_events",
"tty",
"url",
"util", // Missing exports: MIMEParams, MIMEType, getCallSite, getCallSites, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"util", // Missing exports: MIMEParams, MIMEType, getCallSite, getSystemErrorMap, getSystemErrorMessage, parseEnv, transferableAbortController, transferableAbortSignal
"util/types", // Missing exports: isExternal
"v8", // Missing exports: GCProfiler, promiseHooks, queryObjects, setHeapSnapshotNearHeapLimit, startupSnapshot
"vm",
Expand Down
8 changes: 4 additions & 4 deletions src/presets/_unenv/node-compat/vercel.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Auto generated using gen-node-compat.ts on 2025-04-10
// Auto generated using gen-node-compat.ts on 2025-06-25
// Source: https://platform-node-compat.vercel.app/
// Do not edit this file manually

// prettier-ignore
export const builtnNodeModules = [
"assert", // Missing exports: CallTracker, partialDeepStrictEqual
"async_hooks",
"async_hooks", // Missing exports: asyncWrapProviders, createHook, executionAsyncId, executionAsyncResource, triggerAsyncId
"buffer",
"events", // Missing exports: captureRejections, init
"util", // Missing exports: isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined
"events",
"util", // Missing exports: getCallSites, getSystemErrorMap, getSystemErrorMessage, getSystemErrorName, isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, parseEnv, styleText
];

// prettier-ignore
Expand Down
38 changes: 12 additions & 26 deletions src/presets/_unenv/workerd/tls.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,33 @@

import workerdTLS from "#workerd/node:tls";

import {
CLIENT_RENEG_LIMIT,
CLIENT_RENEG_WINDOW,
DEFAULT_CIPHERS,
DEFAULT_ECDH_CURVE,
DEFAULT_MAX_VERSION,
DEFAULT_MIN_VERSION,
Server,
createSecurePair,
createServer,
getCiphers,
rootCertificates,
} from "unenv/node/tls";
import { createSecurePair } from "unenv/node/tls";

export { createSecurePair } from "unenv/node/tls";

export {
export const {
TLSSocket,
connect,
SecureContext,
checkServerIdentity,
convertALPNProtocols,
createSecureContext,
CLIENT_RENEG_LIMIT,
CLIENT_RENEG_WINDOW,
DEFAULT_CIPHERS,
DEFAULT_ECDH_CURVE,
DEFAULT_MAX_VERSION,
DEFAULT_MIN_VERSION,
Server,
createSecurePair,
createServer,
getCiphers,
rootCertificates,
} from "unenv/node/tls";

export const {
TLSSocket,
connect,
SecureContext,
checkServerIdentity,
convertALPNProtocols,
createSecureContext,
} = workerdTLS;

export default {
// native
TLSSocket,
connect,
// polyfill
CLIENT_RENEG_LIMIT,
CLIENT_RENEG_WINDOW,
DEFAULT_CIPHERS,
Expand All @@ -55,8 +40,9 @@ export default {
checkServerIdentity,
convertALPNProtocols,
createSecureContext,
createSecurePair,
createServer,
getCiphers,
rootCertificates,
// polyfill
createSecurePair,
};