summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts27
-rw-r--r--ext/io/12_io.js17
-rw-r--r--tests/unit/files_test.ts3
-rw-r--r--tests/unit_node/process_test.ts3
-rw-r--r--tests/unit_node/tty_test.ts6
5 files changed, 10 insertions, 46 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index 077d00b9e..320e6f29b 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -2468,15 +2468,6 @@ declare namespace Deno {
* @category I/O
*/
export const stdin: Reader & ReaderSync & Closer & {
- /**
- * The resource ID assigned to `stdin`. This can be used with the discrete
- * I/O functions in the `Deno` namespace.
- *
- * @deprecated This will be soft-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.
- */
- readonly rid: number;
/** A readable stream interface to `stdin`. */
readonly readable: ReadableStream<Uint8Array>;
/**
@@ -2516,15 +2507,6 @@ declare namespace Deno {
* @category I/O
*/
export const stdout: Writer & WriterSync & Closer & {
- /**
- * The resource ID assigned to `stdout`. This can be used with the discrete
- * I/O functions in the `Deno` namespace.
- *
- * @deprecated This will be soft-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.
- */
- readonly rid: number;
/** A writable stream interface to `stdout`. */
readonly writable: WritableStream<Uint8Array>;
/**
@@ -2550,15 +2532,6 @@ declare namespace Deno {
* @category I/O
*/
export const stderr: Writer & WriterSync & Closer & {
- /**
- * The resource ID assigned to `stderr`. This can be used with the discrete
- * I/O functions in the `Deno` namespace.
- *
- * @deprecated This will be soft-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.
- */
- readonly rid: number;
/** A writable stream interface to `stderr`. */
readonly writable: WritableStream<Uint8Array>;
/**
diff --git a/ext/io/12_io.js b/ext/io/12_io.js
index 1caf6fe06..3cdcb113b 100644
--- a/ext/io/12_io.js
+++ b/ext/io/12_io.js
@@ -4,7 +4,7 @@
// Documentation liberally lifted from them too.
// Thank you! We love Go! <3
-import { core, internals, primordials } from "ext:core/mod.js";
+import { core, primordials } from "ext:core/mod.js";
import { op_set_raw } from "ext:core/ops";
const {
Uint8Array,
@@ -121,11 +121,6 @@ class Stdin {
}
get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.stdin.rid",
- new Error().stack,
- "Use `Deno.stdin` instance methods instead.",
- );
return this.#rid;
}
@@ -186,11 +181,6 @@ class Stdout {
}
get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.stdout.rid",
- new Error().stack,
- "Use `Deno.stdout` instance methods instead.",
- );
return this.#rid;
}
@@ -226,11 +216,6 @@ class Stderr {
}
get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.stderr.rid",
- new Error().stack,
- "Use `Deno.stderr` instance methods instead.",
- );
return this.#rid;
}
diff --git a/tests/unit/files_test.ts b/tests/unit/files_test.ts
index 7b939d1ec..b39b5f417 100644
--- a/tests/unit/files_test.ts
+++ b/tests/unit/files_test.ts
@@ -12,8 +12,11 @@ import { copy } from "@std/io/copy";
// Note tests for Deno.FsFile.setRaw is in integration tests.
Deno.test(function filesStdioFileDescriptors() {
+ // @ts-ignore `Deno.stdin.rid` was soft-removed in Deno 2.
assertEquals(Deno.stdin.rid, 0);
+ // @ts-ignore `Deno.stdout.rid` was soft-removed in Deno 2.
assertEquals(Deno.stdout.rid, 1);
+ // @ts-ignore `Deno.stderr.rid` was soft-removed in Deno 2.
assertEquals(Deno.stderr.rid, 2);
});
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index b3db9753e..579b51116 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -461,6 +461,7 @@ Deno.test({
Deno.test({
name: "process.stdin",
fn() {
+ // @ts-ignore `Deno.stdin.rid` was soft-removed in Deno 2.
assertEquals(process.stdin.fd, Deno.stdin.rid);
assertEquals(process.stdin.isTTY, Deno.stdin.isTerminal());
},
@@ -640,6 +641,7 @@ Deno.test({
Deno.test({
name: "process.stdout",
fn() {
+ // @ts-ignore `Deno.stdout.rid` was soft-removed in Deno 2.
assertEquals(process.stdout.fd, Deno.stdout.rid);
const isTTY = Deno.stdout.isTerminal();
assertEquals(process.stdout.isTTY, isTTY);
@@ -668,6 +670,7 @@ Deno.test({
Deno.test({
name: "process.stderr",
fn() {
+ // @ts-ignore `Deno.stderr.rid` was soft-removed in Deno 2.
assertEquals(process.stderr.fd, Deno.stderr.rid);
const isTTY = Deno.stderr.isTerminal();
assertEquals(process.stderr.isTTY, isTTY);
diff --git a/tests/unit_node/tty_test.ts b/tests/unit_node/tty_test.ts
index 7f0395682..76d7ddc55 100644
--- a/tests/unit_node/tty_test.ts
+++ b/tests/unit_node/tty_test.ts
@@ -7,9 +7,9 @@ import tty from "node:tty";
import process from "node:process";
Deno.test("[node/tty isatty] returns true when fd is a tty, false otherwise", () => {
- assert(Deno.stdin.isTerminal() === isatty(Deno.stdin.rid));
- assert(Deno.stdout.isTerminal() === isatty(Deno.stdout.rid));
- assert(Deno.stderr.isTerminal() === isatty(Deno.stderr.rid));
+ assert(Deno.stdin.isTerminal() === isatty((Deno as any).stdin.rid));
+ assert(Deno.stdout.isTerminal() === isatty((Deno as any).stdout.rid));
+ assert(Deno.stderr.isTerminal() === isatty((Deno as any).stderr.rid));
using file = Deno.openSync("README.md");
assert(!isatty(file.rid));