Skip to content

Commit

Permalink
node: use ReadStream/WriteStream for stdio
Browse files Browse the repository at this point in the history
  • Loading branch information
gpanders committed Jan 7, 2025
1 parent 5d6aec3 commit 8270506
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/runtime/node/process/internal/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type nodeProcess from "node:process";
import mock from "../../../mock/proxy";
import empty from "../../../mock/empty";
import { notImplemented } from "../../../_internal/utils";
import { ReadStream, WriteStream } from "../../tty/index.mjs";

Check failure on line 6 in src/runtime/node/process/internal/process.ts

View workflow job for this annotation

GitHub Actions / ci

Cannot find module '../../tty/index.mjs' or its corresponding type declarations.
import { env } from "./env";
import { hrtime, nextTick } from "./time";

Expand Down Expand Up @@ -191,9 +192,9 @@ export const setMaxListeners = notImplemented<Process["setMaxListeners"]>(
export const setSourceMapsEnabled = notImplemented<
Process["setSourceMapsEnabled"]
>("process.setSourceMapsEnabled");
export const stdout: Process["stdout"] = mock.__createMock__("process.stdout");
export const stderr: Process["stderr"] = mock.__createMock__("process.stderr");
export const stdin: Process["stdin"] = mock.__createMock__("process.stdin");
export const stdout: Process["stdout"] = new WriteStream();
export const stderr: Process["stderr"] = new WriteStream();
export const stdin: Process["stdin"] = new ReadStream();
const traceDeprecation: Process["traceDeprecation"] = false;
export const uptime: Process["uptime"] = () => 0;
export const exitCode: Process["exitCode"] = 0;
Expand Down

0 comments on commit 8270506

Please sign in to comment.