| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| raw device. If `false`, configures the `tty.ReadStream` to operate in its | ||
| default mode. The `readStream.isRaw` property will be set to the resulting | ||
| mode. | ||
| * `mode` {boolean|string} If `true` or `'raw-vt'`, configures the |
There was a problem hiding this comment.
I would not use 'raw-vt' as a name and instead just use 'raw'. UV_TTY_MODE_RAW_VT is what UV_TTY_MODE_RAW should probably have been all along – the only reason they aren't merged (yet) into a single constant is backwards compatibility expectations in libuv.
Sorry, something went wrong.
There was a problem hiding this comment.
Agreed, updated.
Sorry, something went wrong.
|
Related libuv hardening PR: libuv/libuv#5174 That PR makes Unix uv_tty_set_mode() return UV_EINVAL for unrecognized uv_tty_mode_t values, matching the existing Windows behavior. |
Sorry, something went wrong.
Sorry, something went wrong.
|
I can't see the CI failures, it says access denied. |
Sorry, something went wrong.
|
@samuel-williams-shopify The failures seem exclusively related to alpine: ...
length differs.
expect=4
actual=7
patterns:
pattern = ^raw=true$
pattern = ^normal=false$
pattern = ^raw\-string=true$
pattern = ^io=false$
outlines:
outline = stty: standard input: Not a tty
outline = raw=true
outline = normal=false
outline = stty: standard input: Not a tty
outline = raw-string=true
outline = stty: standard input: Not a tty
outline = io=false
not ok 5141 pseudo-tty/test-set-raw-mode-modes
---
duration_ms: 287.86900
severity: fail
stack: |-
stty: standard input: Not a tty
raw=true
normal=false
stty: standard input: Not a tty
raw-string=true
stty: standard input: Not a tty
io=false
...
Not sure what's different on the Alpine runners, I guess if there's no obvious reason for this it might be fine to silence stderr for stty instead of specifying inherit there |
Sorry, something went wrong.
|
Pushed a test-only update in 7af5c59 to capture stty stderr in test-set-raw-mode-modes instead of inheriting it. This should prevent Alpine's stty: standard input: Not a tty message from polluting the pseudo-tty expected-output comparison while still surfacing stderr if stty exits non-zero. I can't trigger or view the Jenkins run from here, and the new GitHub checks appear to be waiting for maintainer approval. Could a maintainer approve/rerun CI when convenient? |
Sorry, something went wrong.
Sorry, something went wrong.
|
This PR needs to a rebase to resolve conflicts in doc/api/tty.md |
Sorry, something went wrong.
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Codecov Report❌ Patch coverage is 97.05882% with 1 line in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #64140 +/- ##
==========================================
- Coverage 90.12% 90.11% -0.02%
==========================================
Files 752 752
Lines 252312 252338 +26
Branches 47432 47444 +12
==========================================
- Hits 227404 227398 -6
- Misses 16217 16265 +48
+ Partials 8691 8675 -16
... and 32 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Sorry, something went wrong.
Commit Queue failedThis pull request has multiple commits, but no landing policy was selected. Add commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. to land it as one commit, or commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. to land the commits separately. The pull request was removed from the Commit Queue and labeled commit-queue-failed An error occurred while landing this pull request using GitHub Actions. . After resolving the failure, remove that label and add commit-queue Add this label to land a pull request using GitHub Actions. to retry. Full Commit Queue output- Loading data for nodejs/node/pull/64140 ✔ Done loading data for nodejs/node/pull/64140 ----------------------------------- PR info ------------------------------------ Title tty: add raw-vt and io raw modes (#64140) Author Samuel Williams <samuel.williams@shopify.com> (@samuel-williams-shopify, first-time contributor) Branch samuel-williams-shopify:tty-raw-vt-io-mode -> nodejs:main Labels c++, tty, author ready, needs-ci, commit-queue Commits 5 - tty: add raw-vt and io raw modes - doc: update tty raw mode PR-URL - tty: use raw as public raw mode name - tty: reject unknown raw mode strings - test: silence stty stderr in raw mode test Committers 1 - Samuel Williams <samuel.williams@shopify.com> PR-URL: https://github.com/nodejs/node/pull/64140 Refs: https://github.com/nodejs/node/issues/63059 Refs: https://github.com/libuv/libuv/issues/32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64140 Refs: https://github.com/nodejs/node/issues/63059 Refs: https://github.com/libuv/libuv/issues/32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 26 Jun 2026 04:05:37 GMT ✔ Approvals: 3 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/64140#pullrequestreview-4599153146 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/64140#pullrequestreview-4629888278 ✔ - Trivikram Kamat (@trivikr): https://github.com/nodejs/node/pull/64140#pullrequestreview-5000667735 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-08-23T05:18:11Z: https://ci.nodejs.org/job/node-test-pull-request/76273/ - Querying data for job/node-test-pull-request/76273/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD 7072d76a5c..a89fc17cce main -> origin/main ✔ origin/main is now up-to-date main is out of sync with origin/main. Mismatched commits: - fe654d1a54 stream: reuse unexposed managed read buffers - a89fc17cce stream: reuse unexposed managed read buffers -------------------------------------------------------------------------------- HEAD is now at a89fc17cce stream: reuse unexposed managed read buffers ✔ Reset to origin/main - Downloading patch for 64140 From https://github.com/nodejs/node * branch refs/pull/64140/merge -> FETCH_HEAD ✔ Fetched commits as eae0ca39be9c..f94af6ec6e76 -------------------------------------------------------------------------------- [main 6ebb60c5ec] tty: add raw-vt and io raw modes Author: Samuel Williams <samuel.williams@shopify.com> Date: Fri Jun 26 16:05:18 2026 +1200 5 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 test/pseudo-tty/test-set-raw-mode-modes.js create mode 100644 test/pseudo-tty/test-set-raw-mode-modes.out [main 18f60e82d3] doc: update tty raw mode PR-URL Author: Samuel Williams <samuel.williams@shopify.com> Date: Tue Jun 30 11:38:26 2026 +1200 1 file changed, 1 insertion(+), 1 deletion(-) [main cd13331424] tty: use raw as public raw mode name Author: Samuel Williams <samuel.williams@shopify.com> Date: Tue Jun 30 11:38:39 2026 +1200 4 files changed, 11 insertions(+), 11 deletions(-) [main d68dc705ab] tty: reject unknown raw mode strings Author: Samuel Williams <samuel.williams@shopify.com> Date: Tue Jun 30 11:39:07 2026 +1200 2 files changed, 17 insertions(+), 1 deletion(-) [main 347777f3e0] test: silence stty stderr in raw mode test Author: Samuel Williams <samuel.williams@shopify.com> Date: Fri Jul 3 21:24:20 2026 +1200 1 file changed, 3 insertions(+), 3 deletions(-) ✔ Patches applied There are 5 commits in the PR. Attempting autorebase. (node:1323) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. (Use `node --trace-deprecation ...` to show where the warning was created) Rebasing (2/10) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- tty: add raw-vt and io raw modes Signed-off-by: Samuel Williams <samuel.williams@shopify.com> PR-URL: https://github.com/nodejs/node/pull/64140 Refs: https://github.com/nodejs/node/issues/63059 Refs: https://github.com/libuv/libuv/issues/32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> -------------------------------------------------------------------------------- [detached HEAD 9062b86765] tty: add raw-vt and io raw modes Author: Samuel Williams <samuel.williams@shopify.com> Date: Fri Jun 26 16:05:18 2026 +1200 5 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 test/pseudo-tty/test-set-raw-mode-modes.js create mode 100644 test/pseudo-tty/test-set-raw-mode-modes.out Rebasing (3/10) Rebasing (4/10) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- doc: update tty raw mode PR-URL Signed-off-by: Samuel Williams <samuel.williams@shopify.com> PR-URL: https://github.com/nodejs/node/pull/64140 Refs: https://github.com/nodejs/node/issues/63059 Refs: https://github.com/libuv/libuv/issues/32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> -------------------------------------------------------------------------------- [detached HEAD c899fb3810] doc: update tty raw mode PR-URL Author: Samuel Williams <samuel.williams@shopify.com> Date: Tue Jun 30 11:38:26 2026 +1200 1 file changed, 1 insertion(+), 1 deletion(-) Rebasing (5/10) Rebasing (6/10) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- tty: use raw as public raw mode name Signed-off-by: Samuel Williams <samuel.williams@shopify.com> PR-URL: https://github.com/nodejs/node/pull/64140 Refs: https://github.com/nodejs/node/issues/63059 Refs: https://github.com/libuv/libuv/issues/32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> -------------------------------------------------------------------------------- [detached HEAD b0d51a9df8] tty: use raw as public raw mode name Author: Samuel Williams <samuel.williams@shopify.com> Date: Tue Jun 30 11:38:39 2026 +1200 4 files changed, 11 insertions(+), 11 deletions(-) Rebasing (7/10) Rebasing (8/10) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- tty: reject unknown raw mode strings Signed-off-by: Samuel Williams <samuel.williams@shopify.com> PR-URL: https://github.com/nodejs/node/pull/64140 Refs: https://github.com/nodejs/node/issues/63059 Refs: https://github.com/libuv/libuv/issues/32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> -------------------------------------------------------------------------------- [detached HEAD 994d15e30a] tty: reject unknown raw mode strings Author: Samuel Williams <samuel.williams@shopify.com> Date: Tue Jun 30 11:39:07 2026 +1200 2 files changed, 17 insertions(+), 1 deletion(-) Rebasing (9/10) Rebasing (10/10) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- test: silence stty stderr in raw mode test Signed-off-by: Samuel Williams <samuel.williams@shopify.com> PR-URL: https://github.com/nodejs/node/pull/64140 Refs: https://github.com/nodejs/node/issues/63059 Refs: https://github.com/libuv/libuv/issues/32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> -------------------------------------------------------------------------------- [detached HEAD 9894a86a37] test: silence stty stderr in raw mode test Author: Samuel Williams <samuel.williams@shopify.com> Date: Fri Jul 3 21:24:20 2026 +1200 1 file changed, 3 insertions(+), 3 deletions(-) Successfully rebased and updated refs/heads/main. -------------------------------------------------------------------------------- ℹ Add `commit-queue-squash` label to land the PR as one commit, or `commit-queue-rebase` to land as separate commits. |
Sorry, something went wrong.
Signed-off-by: Samuel Williams <samuel.williams@shopify.com> PR-URL: #64140 Refs: #63059 Refs: libuv/libuv#32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com> PR-URL: #64140 Refs: #63059 Refs: libuv/libuv#32 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
| Back | FazBrowse Home | New Git URL |
Adds string raw-mode selection to tty.ReadStream#setRawMode():
This is intended to address the output-processing distinction discussed in #63059 and follows libuv's existing UV_TTY_MODE_IO semantics. It preserves the current setRawMode(true) behavior instead of changing it.
Related libuv hardening PR: libuv/libuv#5174
Refs: #63059
Refs: libuv/libuv#32
Local verification: