Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: node:inspector not being registered #25007

Merged
merged 6 commits into from
Aug 14, 2024
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 ext/node/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ deno_core::extension!(deno_node,
"_zlib_binding.mjs",
"_zlib.mjs",
"assertion_error.ts",
"inspector.ts",
"internal_binding/_libuv_winerror.ts",
"internal_binding/_listen.ts",
"internal_binding/_node.ts",
Expand Down Expand Up @@ -616,6 +615,7 @@ deno_core::extension!(deno_node,
"node:http" = "http.ts",
"node:http2" = "http2.ts",
"node:https" = "https.ts",
"node:inspector" = "inspector.ts",
"node:module" = "01_require.js",
"node:net" = "net.ts",
"node:os" = "os.ts",
Expand Down
1 change: 1 addition & 0 deletions ext/node/polyfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ generate_builtin_node_module_lists! {
"http",
"http2",
"https",
"inspector",
"module",
"net",
"os",
Expand Down
2 changes: 1 addition & 1 deletion ext/node/polyfills/01_require.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import fsPromises from "node:fs/promises";
import http from "node:http";
import http2 from "node:http2";
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 internalCryptoCertificate from "ext:deno_node/internal/crypto/certificate.ts";
import internalCryptoCipher from "ext:deno_node/internal/crypto/cipher.ts";
Expand Down
1 change: 1 addition & 0 deletions tests/integration/lsp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7548,6 +7548,7 @@ fn lsp_completions_node_specifier() {
"node:http",
"node:http2",
"node:https",
"node:inspector",
"node:module",
"node:net",
"node:os",
Expand Down
1 change: 1 addition & 0 deletions tests/integration/node_unit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ util::unit_test_factory!(
fetch_test,
http_test,
http2_test,
inspector_test,
_randomBytes_test = internal / _randomBytes_test,
_randomFill_test = internal / _randomFill_test,
_randomInt_test = internal / _randomInt_test,
Expand Down
7 changes: 7 additions & 0 deletions tests/unit_node/inspector_test.ts
Original file line number Diff line number Diff line change
@@ -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");
});
1 change: 1 addition & 0 deletions tools/core_import_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"node:http": "../ext/node/polyfills/http.ts",
"node:http2": "../ext/node/polyfills/http2.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/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",
Expand Down