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

BREAKING(console): remove Deno.customInspect #25348

Merged
merged 3 commits into from
Sep 3, 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
13 changes: 0 additions & 13 deletions cli/tsc/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5273,19 +5273,6 @@ declare namespace Deno {
*/
export const args: string[];

/**
* A symbol which can be used as a key for a custom method which will be
* called when `Deno.inspect()` is called, or when the object is logged to
* the console.
*
* @deprecated This will be removed in Deno 2.0. See the
* {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*
* @category I/O
*/
export const customInspect: unique symbol;

/** The URL of the entrypoint module entered from the command-line. It
* requires read permission to the CWD.
*
Expand Down
13 changes: 0 additions & 13 deletions runtime/js/99_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ import * as version from "ext:runtime/01_version.ts";
import * as os from "ext:runtime/30_os.js";
import * as timers from "ext:deno_web/02_timers.js";
import {
customInspect,
getDefaultInspectOptions,
getStderrNoColor,
inspectArgs,
Expand Down Expand Up @@ -644,18 +643,6 @@ ObjectDefineProperties(finalDenoNs, {
noColor: core.propGetterOnly(() => op_bootstrap_no_color()),
args: core.propGetterOnly(opArgs),
mainModule: core.propGetterOnly(() => op_main_module()),
// TODO(kt3k): Remove this export at v2
// See https://github.com/denoland/deno/issues/9294
customInspect: {
get() {
warnOnDeprecatedApi(
"Deno.customInspect",
new Error().stack,
'Use `Symbol.for("Deno.customInspect")` instead.',
);
return internals.future ? undefined : customInspect;
},
},
exitCode: {
get() {
return os.getExitCode();
Expand Down
1 change: 0 additions & 1 deletion tests/specs/future/runtime_api/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,5 @@ try {
console.log("Deno.ListenTlsOptions.(keyFile|certFile) do nothing");
}
}
console.log("Deno.customInspect is", Deno.customInspect);

self.close();
1 change: 0 additions & 1 deletion tests/specs/future/runtime_api/main.out
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ Deno.FsFile constructor is illegal
Deno.ConnectTlsOptions.(certFile|keyFile) do nothing
Deno.ConnectTlsOptions.(certChain|privateKey) do nothing
Deno.ListenTlsOptions.(keyFile|certFile) do nothing
Deno.customInspect is undefined