bun icon indicating copy to clipboard operation
bun copied to clipboard

[WIP] Add `process.stdin.setRawMode`

Open ThatOneBro opened this issue 2 years ago • 1 comments

Still need to finish wiring things and make sure the mode is set properly for a few different cases (namely, async iteration of console, ie:

for await (const line of console)...

and also for node:readline interfaces) but this is nearly ready.

Closes #2025

ThatOneBro avatar Feb 11 '23 01:02 ThatOneBro

Update on this PR: Got process.stdin.isRaw and process.stdin.setRawMode working now, though I do need to add some tests to verify that it's working in all cases (such as when we try to do read from async iter on console). I don't think this will currently work, as I probably still have to set raw mode for the duration of that iter maybe... We'll see.

I'll come back to this PR to add tests after I finish the undici polyfills, which should be tonight.

ThatOneBro avatar Feb 18 '23 22:02 ThatOneBro

prettier errors have been resolved. Thank you.

#36a44e54521594043f1b3c0274f1b948ee66fc5f

github-actions[bot] avatar Mar 18 '23 07:03 github-actions[bot]

❌ @ThatOneBro 29 files with test failures on bun-darwin-x64-baseline:

  • test/bundler/transpiler.test.js
  • test/js/bun/console/console-iterator.test.js
  • test/js/bun/http/serve.test.ts
  • test/js/bun/net/socket.test.ts
  • test/js/bun/resolve/png/test-png-import.test.js
  • test/js/bun/resolve/resolve.test.js
  • test/js/bun/spawn/spawn.test.ts
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/bun/util/escapeHTML.test.js
  • test/js/bun/util/sleepSync.test.ts
  • test/js/deno/crypto/webcrypto.test.ts
  • test/js/deno/encoding/encoding.test.ts
  • test/js/deno/fetch/headers.test.ts
  • test/js/deno/fetch/request.test.ts
  • test/js/deno/fetch/response.test.ts
  • test/js/deno/url/url.test.ts
  • test/js/deno/v8/error.test.ts
  • test/js/node/child_process/child_process-node.test.js
  • test/js/node/disabled-module.test.js
  • test/js/node/fs/fs.test.ts
  • test/js/node/process/process-stdio.test.ts
  • test/js/node/process/process.test.js
  • test/js/node/util/util-promisify.test.js
  • test/js/node/util/util.test.js
  • test/js/third_party/napi_create_external/napi-create-external.test.ts
  • test/js/web/abort/abort.test.ts
  • test/js/web/fetch/body.test.ts
  • test/regression/issue/00631.test.ts
  • test/regression/issue/02368.test.ts

View test output

#36a44e54521594043f1b3c0274f1b948ee66fc5f

github-actions[bot] avatar Mar 18 '23 08:03 github-actions[bot]

needs a small rebase but looks close to mergeable

nice

Jarred-Sumner avatar Mar 22 '23 23:03 Jarred-Sumner

setRawMode was implemented in Bun v0.8.0.

Electroid avatar Oct 17 '23 20:10 Electroid