1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

FUTURE: remove Deno.customInspect (#23453)

This commit is contained in:
Asher Gomez 2024-04-19 20:50:18 +10:00 committed by GitHub
parent c497e766f1
commit 05b49a803f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View file

@ -667,7 +667,7 @@ ObjectDefineProperties(finalDenoNs, {
new Error().stack, new Error().stack,
'Use `Symbol.for("Deno.customInspect")` instead.', 'Use `Symbol.for("Deno.customInspect")` instead.',
); );
return customInspect; return internals.future ? undefined : customInspect;
}, },
}, },
}); });

View file

@ -61,8 +61,12 @@ if (Deno.build.os === "windows") {
// TLS // TLS
// Since these tests may run in parallel, ensure this port is unique to this file // Since these tests may run in parallel, ensure this port is unique to this file
const tlsPort = 4510; const tlsPort = 4510;
const cert = Deno.readTextFileSync("../../../testdata/tls/localhost.crt"); const cert = Deno.readTextFileSync(
const key = Deno.readTextFileSync("../../../testdata/tls/localhost.key"); 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 }); const tlsListener = Deno.listenTls({ port: tlsPort, cert, key });
console.log("Deno.TlsListener.prototype.rid is", tlsListener.rid); console.log("Deno.TlsListener.prototype.rid is", tlsListener.rid);
@ -88,4 +92,6 @@ try {
} }
} }
console.log("Deno.customInspect is", Deno.customInspect);
self.close(); self.close();

View file

@ -34,3 +34,4 @@ Deno.TlsListener.prototype.rid is undefined
Deno.TlsConn.prototype.rid is undefined Deno.TlsConn.prototype.rid is undefined
Deno.FsWatcher.prototype.rid is undefined Deno.FsWatcher.prototype.rid is undefined
Deno.FsFile constructor is illegal Deno.FsFile constructor is illegal
Deno.customInspect is undefined