diff options
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r-- | ext/node/lib.rs | 105 |
1 files changed, 54 insertions, 51 deletions
diff --git a/ext/node/lib.rs b/ext/node/lib.rs index bb8d744c8..f139f0c7b 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -31,8 +31,8 @@ mod resolution; pub use package_json::PackageJson; pub use path::PathClean; pub use polyfill::is_builtin_node_module; -pub use polyfill::NodeModulePolyfill; pub use polyfill::SUPPORTED_BUILTIN_NODE_MODULES; +pub use polyfill::SUPPORTED_BUILTIN_NODE_MODULES_WITH_PREFIX; pub use resolution::NodeModuleKind; pub use resolution::NodeResolution; pub use resolution::NodeResolutionMode; @@ -251,7 +251,6 @@ deno_core::extension!(deno_node, esm = [ dir "polyfills", "00_globals.js", - "01_require.js", "02_init.js", "_brotli.js", "_events.mjs", @@ -315,27 +314,7 @@ deno_core::extension!(deno_node, "_utils.ts", "_zlib_binding.mjs", "_zlib.mjs", - "assert.ts", - "assert/strict.ts", "assertion_error.ts", - "async_hooks.ts", - "buffer.ts", - "child_process.ts", - "cluster.ts", - "console.ts", - "constants.ts", - "crypto.ts", - "dgram.ts", - "diagnostics_channel.ts", - "dns.ts", - "dns/promises.ts", - "domain.ts", - "events.ts", - "fs.ts", - "fs/promises.ts", - "http.ts", - "http2.ts", - "https.ts", "inspector.ts", "internal_binding/_libuv_winerror.ts", "internal_binding/_listen.ts", @@ -435,9 +414,6 @@ deno_core::extension!(deno_node, "internal/util/inspect.mjs", "internal/util/types.ts", "internal/validators.mjs", - "net.ts", - "os.ts", - "path.ts", "path/_constants.ts", "path/_interface.ts", "path/_util.ts", @@ -445,34 +421,61 @@ deno_core::extension!(deno_node, "path/_win32.ts", "path/common.ts", "path/mod.ts", - "path/posix.ts", "path/separator.ts", - "path/win32.ts", - "perf_hooks.ts", - "process.ts", - "punycode.ts", - "querystring.ts", - "readline.ts", "readline/promises.ts", "repl.ts", - "stream.ts", - "stream/consumers.mjs", - "stream/promises.mjs", - "stream/web.ts", - "string_decoder.ts", - "sys.ts", - "timers.ts", - "timers/promises.ts", - "tls.ts", - "tty.ts", - "url.ts", - "util.ts", - "util/types.ts", - "v8.ts", - "vm.ts", - "wasi.ts", - "worker_threads.ts", - "zlib.ts", + "wasi.ts" + ], + esm_with_specifiers = [ + dir "polyfills", + ("node:assert", "assert.ts"), + ("node:assert/strict", "assert/strict.ts"), + ("node:async_hooks", "async_hooks.ts"), + ("node:buffer", "buffer.ts"), + ("node:child_process", "child_process.ts"), + ("node:cluster", "cluster.ts"), + ("node:console", "console.ts"), + ("node:constants", "constants.ts"), + ("node:crypto", "crypto.ts"), + ("node:dgram", "dgram.ts"), + ("node:diagnostics_channel", "diagnostics_channel.ts"), + ("node:dns", "dns.ts"), + ("node:dns/promises", "dns/promises.ts"), + ("node:domain", "domain.ts"), + ("node:events", "events.ts"), + ("node:fs", "fs.ts"), + ("node:fs/promises", "fs/promises.ts"), + ("node:http", "http.ts"), + ("node:http2", "http2.ts"), + ("node:https", "https.ts"), + ("node:module", "01_require.js"), + ("node:net", "net.ts"), + ("node:os", "os.ts"), + ("node:path", "path.ts"), + ("node:path/posix", "path/posix.ts"), + ("node:path/win32", "path/win32.ts"), + ("node:perf_hooks", "perf_hooks.ts"), + ("node:process", "process.ts"), + ("node:punycode", "punycode.ts"), + ("node:querystring", "querystring.ts"), + ("node:readline", "readline.ts"), + ("node:stream", "stream.ts"), + ("node:stream/consumers", "stream/consumers.mjs"), + ("node:stream/promises", "stream/promises.mjs"), + ("node:stream/web", "stream/web.ts"), + ("node:string_decoder", "string_decoder.ts"), + ("node:sys", "sys.ts"), + ("node:timers", "timers.ts"), + ("node:timers/promises", "timers/promises.ts"), + ("node:tls", "tls.ts"), + ("node:tty", "tty.ts"), + ("node:url", "url.ts"), + ("node:util", "util.ts"), + ("node:util/types", "util/types.ts"), + ("node:v8", "v8.ts"), + ("node:vm", "vm.ts"), + ("node:worker_threads", "worker_threads.ts"), + ("node:zlib", "zlib.ts"), ], options = { maybe_npm_resolver: Option<NpmResolverRc>, @@ -488,7 +491,7 @@ deno_core::extension!(deno_node, npm_resolver, ))) } - }, + } ); pub fn initialize_runtime( |