mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
BREAKING(console): remove Deno.customInspect
(#25348)
Note: this is implemented on Deploy. However, according to @magurotuna, a thin compatibility layer might be in the works that'd prevent breakages for PRs such as this one. Towards #22079
This commit is contained in:
parent
71e4ac774b
commit
1a82b0f808
4 changed files with 0 additions and 28 deletions
13
cli/tsc/dts/lib.deno.ns.d.ts
vendored
13
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -5216,19 +5216,6 @@ declare namespace Deno {
|
||||||
*/
|
*/
|
||||||
export const args: string[];
|
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
|
/** The URL of the entrypoint module entered from the command-line. It
|
||||||
* requires read permission to the CWD.
|
* requires read permission to the CWD.
|
||||||
*
|
*
|
||||||
|
|
|
@ -56,7 +56,6 @@ import * as version from "ext:runtime/01_version.ts";
|
||||||
import * as os from "ext:runtime/30_os.js";
|
import * as os from "ext:runtime/30_os.js";
|
||||||
import * as timers from "ext:deno_web/02_timers.js";
|
import * as timers from "ext:deno_web/02_timers.js";
|
||||||
import {
|
import {
|
||||||
customInspect,
|
|
||||||
getDefaultInspectOptions,
|
getDefaultInspectOptions,
|
||||||
getStderrNoColor,
|
getStderrNoColor,
|
||||||
inspectArgs,
|
inspectArgs,
|
||||||
|
@ -534,18 +533,6 @@ ObjectDefineProperties(finalDenoNs, {
|
||||||
noColor: core.propGetterOnly(() => op_bootstrap_no_color()),
|
noColor: core.propGetterOnly(() => op_bootstrap_no_color()),
|
||||||
args: core.propGetterOnly(opArgs),
|
args: core.propGetterOnly(opArgs),
|
||||||
mainModule: core.propGetterOnly(() => op_main_module()),
|
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: {
|
exitCode: {
|
||||||
get() {
|
get() {
|
||||||
return os.getExitCode();
|
return os.getExitCode();
|
||||||
|
|
|
@ -118,6 +118,5 @@ try {
|
||||||
console.log("Deno.ListenTlsOptions.(keyFile|certFile) do nothing");
|
console.log("Deno.ListenTlsOptions.(keyFile|certFile) do nothing");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("Deno.customInspect is", Deno.customInspect);
|
|
||||||
|
|
||||||
self.close();
|
self.close();
|
||||||
|
|
|
@ -29,4 +29,3 @@ Deno.FsFile constructor is illegal
|
||||||
Deno.ConnectTlsOptions.(certFile|keyFile) do nothing
|
Deno.ConnectTlsOptions.(certFile|keyFile) do nothing
|
||||||
Deno.ConnectTlsOptions.(certChain|privateKey) do nothing
|
Deno.ConnectTlsOptions.(certChain|privateKey) do nothing
|
||||||
Deno.ListenTlsOptions.(keyFile|certFile) do nothing
|
Deno.ListenTlsOptions.(keyFile|certFile) do nothing
|
||||||
Deno.customInspect is undefined
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue