diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2024-09-06 19:52:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 12:52:59 +0200 |
commit | f0a3d206422af3177e0f36ed22802c1ccc6f7654 (patch) | |
tree | 57ad718cc47b7b98c0bbd869d6c070adee3bf30a /ext/node/polyfills/_process/streams.mjs | |
parent | 8ef08f1d294dbe7e3771202084ecbede73ca28aa (diff) |
fix(runtime): use more null proto objects again (#25040)
proceed with #23921
This PR is a preparation for
https://github.com/denoland/deno_lint/pull/1307
---------
Signed-off-by: Kenta Moriuchi <moriken@kimamass.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'ext/node/polyfills/_process/streams.mjs')
-rw-r--r-- | ext/node/polyfills/_process/streams.mjs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/node/polyfills/_process/streams.mjs b/ext/node/polyfills/_process/streams.mjs index fa24bd155..19c1c9c18 100644 --- a/ext/node/polyfills/_process/streams.mjs +++ b/ext/node/polyfills/_process/streams.mjs @@ -65,22 +65,26 @@ export function createWritableStdioStream(writer, name, warmup = false) { stream.once("close", () => writer?.close()); ObjectDefineProperties(stream, { columns: { + __proto__: null, enumerable: true, configurable: true, get: () => writer?.isTerminal() ? Deno.consoleSize?.().columns : undefined, }, rows: { + __proto__: null, enumerable: true, configurable: true, get: () => writer?.isTerminal() ? Deno.consoleSize?.().rows : undefined, }, isTTY: { + __proto__: null, enumerable: true, configurable: true, get: () => writer?.isTerminal(), }, getWindowSize: { + __proto__: null, enumerable: true, configurable: true, value: () => @@ -203,6 +207,7 @@ export const initStdin = (warmup = false) => { stdin.on("close", () => io.stdin?.close()); stdin.fd = io.stdin ? io.STDIN_RID : -1; ObjectDefineProperty(stdin, "isTTY", { + __proto__: null, enumerable: true, configurable: true, get() { @@ -216,6 +221,7 @@ export const initStdin = (warmup = false) => { return stdin; }; ObjectDefineProperty(stdin, "isRaw", { + __proto__: null, enumerable: true, configurable: true, get() { |