From ac33fc2892f8faf9484c31c2aabfdc3744de0314 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 4 Sep 2024 18:12:11 +1000 Subject: chore(tty): soft-remove `Deno.isatty()` (#25410) Towards #22079 --- runtime/js/40_tty.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/40_tty.js b/runtime/js/40_tty.js index 7cf1e4f5d..72e7b6884 100644 --- a/runtime/js/40_tty.js +++ b/runtime/js/40_tty.js @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { core, internals, primordials } from "ext:core/mod.js"; +import { core, primordials } from "ext:core/mod.js"; import { op_console_size } from "ext:core/ops"; const { Uint32Array, @@ -15,12 +15,9 @@ function consoleSize() { return { columns: size[0], rows: size[1] }; } +// Note: This function was soft-removed in Deno 2. Its types have been removed, +// but its implementation has been kept to avoid breaking changes. function isatty(rid) { - internals.warnOnDeprecatedApi( - "Deno.isatty()", - new Error().stack, - "Use `Deno.stdin.isTerminal()`, `Deno.stdout.isTerminal()`, `Deno.stderr.isTerminal()` or `Deno.FsFile.isTerminal()` instead.", - ); return isTerminal(rid); } -- cgit v1.2.3