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

FUTURE: remove Deno.customInspect #23453

Merged
merged 1 commit into from
Apr 19, 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 runtime/js/99_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ ObjectDefineProperties(finalDenoNs, {
new Error().stack,
'Use `Symbol.for("Deno.customInspect")` instead.',
);
return customInspect;
return internals.future ? undefined : customInspect;
},
},
});
Expand Down
10 changes: 8 additions & 2 deletions tests/specs/future/runtime_api/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ if (Deno.build.os === "windows") {
// TLS
// Since these tests may run in parallel, ensure this port is unique to this file
const tlsPort = 4510;
const cert = Deno.readTextFileSync("../../../testdata/tls/localhost.crt");
const key = Deno.readTextFileSync("../../../testdata/tls/localhost.key");
const cert = Deno.readTextFileSync(
new URL("../../../testdata/tls/localhost.crt", import.meta.url),
);
const key = Deno.readTextFileSync(
new URL("../../../testdata/tls/localhost.key", import.meta.url),
);
const tlsListener = Deno.listenTls({ port: tlsPort, cert, key });
console.log("Deno.TlsListener.prototype.rid is", tlsListener.rid);

Expand All @@ -88,4 +92,6 @@ try {
}
}

console.log("Deno.customInspect is", Deno.customInspect);

self.close();
1 change: 1 addition & 0 deletions tests/specs/future/runtime_api/main.out
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ Deno.TlsListener.prototype.rid is undefined
Deno.TlsConn.prototype.rid is undefined
Deno.FsWatcher.prototype.rid is undefined
Deno.FsFile constructor is illegal
Deno.customInspect is undefined