Skip to content

Commit 71cb7ae

Browse files
committed
refactor(cloudflare): update node-compat (#3558)
1 parent bad2509 commit 71cb7ae

6 files changed

Lines changed: 8 additions & 463 deletions

File tree

scripts/gen-node-compat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const platforms = {
1111
"events",
1212
"net",
1313
"stream",
14+
"constants",
1415
],
1516
},
1617
// Deno deploy and Netlify edge are almost identical

src/presets/_unenv/node-compat/cloudflare.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Auto generated using gen-node-compat.ts on 2025-06-25
1+
// Auto generated using gen-node-compat.ts on 2025-08-28
22
// Source: https://platform-node-compat.pi0.workers.dev/
33
// Do not edit this file manually
44

@@ -15,10 +15,14 @@ export const builtnNodeModules = [
1515
"assert/strict", // Missing exports: CallTracker, partialDeepStrictEqual
1616
"async_hooks",
1717
"buffer",
18+
"constants", // Missing exports: EXTENSIONLESS_FORMAT_JAVASCRIPT, EXTENSIONLESS_FORMAT_WASM, O_DIRECT, O_NOATIME, RTLD_DEEPBIND, SIGPOLL, SIGPWR, SIGSTKFLT, defaultCipherList
19+
"crypto",
1820
"diagnostics_channel",
1921
"dns",
2022
"dns/promises",
2123
"events", // Missing exports: captureRejections, init
24+
"fs/promises",
25+
"module",
2226
"net",
2327
"path",
2428
"path/posix",
@@ -31,19 +35,17 @@ export const builtnNodeModules = [
3135
"string_decoder",
3236
"timers",
3337
"timers/promises",
38+
"tls",
3439
"url",
40+
"util",
3541
"util/types",
3642
"zlib",
3743
];
3844

3945
// prettier-ignore
4046
export const hybridNodeModules = [
4147
"console",
42-
"crypto", // Missing exports: Cipher, Decipher
43-
"module", // Missing exports: Module, SourceMap, constants, enableCompileCache, findPackageJSON, findSourceMap, flushCompileCache, getCompileCacheDir, getSourceMapsSupport, globalPaths, register, runMain, setSourceMapsSupport, stripTypeScriptTypes, syncBuiltinESMExports
4448
"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
45-
"tls", // Missing exports: createSecurePair
46-
"util", // Missing exports: isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined
4749
];
4850

4951
// prettier-ignore
@@ -57,11 +59,9 @@ export const unsupportedNodeModules = [
5759
"_stream_wrap",
5860
"child_process",
5961
"cluster",
60-
"constants",
6162
"dgram",
6263
"domain",
6364
"fs",
64-
"fs/promises",
6565
"http",
6666
"http2",
6767
"https",

src/presets/_unenv/workerd/crypto.mjs

Lines changed: 0 additions & 173 deletions
This file was deleted.

src/presets/_unenv/workerd/module.mjs

Lines changed: 0 additions & 109 deletions
This file was deleted.

src/presets/_unenv/workerd/tls.mjs

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)