diff --git a/ext/node/polyfill.rs b/ext/node/polyfill.rs index ff4b0f43ca..3d4a1a9fc7 100644 --- a/ext/node/polyfill.rs +++ b/ext/node/polyfill.rs @@ -32,6 +32,7 @@ pub struct NodeModulePolyfill { pub specifier: &'static str, } +// NOTE(bartlomieju): keep this list in sync with `ext/node/polyfills/01_require.js` pub static SUPPORTED_BUILTIN_NODE_MODULES: &[NodeModulePolyfill] = &[ NodeModulePolyfill { name: "assert", @@ -73,6 +74,10 @@ pub static SUPPORTED_BUILTIN_NODE_MODULES: &[NodeModulePolyfill] = &[ name: "dgram", specifier: "ext:deno_node/dgram.ts", }, + NodeModulePolyfill { + name: "diagnostics_channel", + specifier: "ext:deno_node/diagnostics_channel.ts", + }, NodeModulePolyfill { name: "dns", specifier: "ext:deno_node/dns.ts", diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index 7b91d12aa0..394015e31c 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -132,6 +132,7 @@ import zlib from "ext:deno_node/zlib.ts"; const nativeModuleExports = ObjectCreate(null); const builtinModules = []; +// NOTE(bartlomieju): keep this list in sync with `ext/node/polyfill.rs` function setupBuiltinModules() { const nodeModules = { "_http_agent": _httpAgent,