mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
fix: node:inspector
not being registered (#25007)
For some reason we didn't register the `node:inspector` module, which lead to a panic when trying to import it. This PR registers it. Related: https://github.com/denoland/deno/issues/25004
This commit is contained in:
parent
3b4cbc189c
commit
533d31bc4e
7 changed files with 13 additions and 2 deletions
|
@ -483,7 +483,6 @@ deno_core::extension!(deno_node,
|
||||||
"_zlib_binding.mjs",
|
"_zlib_binding.mjs",
|
||||||
"_zlib.mjs",
|
"_zlib.mjs",
|
||||||
"assertion_error.ts",
|
"assertion_error.ts",
|
||||||
"inspector.ts",
|
|
||||||
"internal_binding/_libuv_winerror.ts",
|
"internal_binding/_libuv_winerror.ts",
|
||||||
"internal_binding/_listen.ts",
|
"internal_binding/_listen.ts",
|
||||||
"internal_binding/_node.ts",
|
"internal_binding/_node.ts",
|
||||||
|
@ -616,6 +615,7 @@ deno_core::extension!(deno_node,
|
||||||
"node:http" = "http.ts",
|
"node:http" = "http.ts",
|
||||||
"node:http2" = "http2.ts",
|
"node:http2" = "http2.ts",
|
||||||
"node:https" = "https.ts",
|
"node:https" = "https.ts",
|
||||||
|
"node:inspector" = "inspector.ts",
|
||||||
"node:module" = "01_require.js",
|
"node:module" = "01_require.js",
|
||||||
"node:net" = "net.ts",
|
"node:net" = "net.ts",
|
||||||
"node:os" = "os.ts",
|
"node:os" = "os.ts",
|
||||||
|
|
|
@ -45,6 +45,7 @@ generate_builtin_node_module_lists! {
|
||||||
"http",
|
"http",
|
||||||
"http2",
|
"http2",
|
||||||
"https",
|
"https",
|
||||||
|
"inspector",
|
||||||
"module",
|
"module",
|
||||||
"net",
|
"net",
|
||||||
"os",
|
"os",
|
||||||
|
|
|
@ -92,7 +92,7 @@ import fsPromises from "node:fs/promises";
|
||||||
import http from "node:http";
|
import http from "node:http";
|
||||||
import http2 from "node:http2";
|
import http2 from "node:http2";
|
||||||
import https from "node:https";
|
import https from "node:https";
|
||||||
import inspector from "ext:deno_node/inspector.ts";
|
import inspector from "node:inspector";
|
||||||
import internalCp from "ext:deno_node/internal/child_process.ts";
|
import internalCp from "ext:deno_node/internal/child_process.ts";
|
||||||
import internalCryptoCertificate from "ext:deno_node/internal/crypto/certificate.ts";
|
import internalCryptoCertificate from "ext:deno_node/internal/crypto/certificate.ts";
|
||||||
import internalCryptoCipher from "ext:deno_node/internal/crypto/cipher.ts";
|
import internalCryptoCipher from "ext:deno_node/internal/crypto/cipher.ts";
|
||||||
|
|
|
@ -7548,6 +7548,7 @@ fn lsp_completions_node_specifier() {
|
||||||
"node:http",
|
"node:http",
|
||||||
"node:http2",
|
"node:http2",
|
||||||
"node:https",
|
"node:https",
|
||||||
|
"node:inspector",
|
||||||
"node:module",
|
"node:module",
|
||||||
"node:net",
|
"node:net",
|
||||||
"node:os",
|
"node:os",
|
||||||
|
|
|
@ -74,6 +74,7 @@ util::unit_test_factory!(
|
||||||
fetch_test,
|
fetch_test,
|
||||||
http_test,
|
http_test,
|
||||||
http2_test,
|
http2_test,
|
||||||
|
inspector_test,
|
||||||
_randomBytes_test = internal / _randomBytes_test,
|
_randomBytes_test = internal / _randomBytes_test,
|
||||||
_randomFill_test = internal / _randomFill_test,
|
_randomFill_test = internal / _randomFill_test,
|
||||||
_randomInt_test = internal / _randomInt_test,
|
_randomInt_test = internal / _randomInt_test,
|
||||||
|
|
7
tests/unit_node/inspector_test.ts
Normal file
7
tests/unit_node/inspector_test.ts
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
import inspector from "node:inspector";
|
||||||
|
import { assertEquals } from "@std/assert/equals";
|
||||||
|
|
||||||
|
Deno.test("[node/inspector] - importing inspector works", () => {
|
||||||
|
assertEquals(typeof inspector.open, "function");
|
||||||
|
});
|
|
@ -78,6 +78,7 @@
|
||||||
"node:http": "../ext/node/polyfills/http.ts",
|
"node:http": "../ext/node/polyfills/http.ts",
|
||||||
"node:http2": "../ext/node/polyfills/http2.ts",
|
"node:http2": "../ext/node/polyfills/http2.ts",
|
||||||
"node:https": "../ext/node/polyfills/https.ts",
|
"node:https": "../ext/node/polyfills/https.ts",
|
||||||
|
"node:inspector": "../ext/node/polyfills/inspector.ts",
|
||||||
"ext:deno_node/inspector.ts": "../ext/node/polyfills/inspector.ts",
|
"ext:deno_node/inspector.ts": "../ext/node/polyfills/inspector.ts",
|
||||||
"ext:deno_node/internal_binding/_libuv_winerror.ts": "../ext/node/polyfills/internal_binding/_libuv_winerror.ts",
|
"ext:deno_node/internal_binding/_libuv_winerror.ts": "../ext/node/polyfills/internal_binding/_libuv_winerror.ts",
|
||||||
"ext:deno_node/internal_binding/_listen.ts": "../ext/node/polyfills/internal_binding/_listen.ts",
|
"ext:deno_node/internal_binding/_listen.ts": "../ext/node/polyfills/internal_binding/_listen.ts",
|
||||||
|
|
Loading…
Reference in a new issue