bun icon indicating copy to clipboard operation
bun copied to clipboard

stdout.columns is NaN

Open h110m opened this issue 2 years ago • 2 comments

What version of Bun is running?

0.4.1

What platform is your computer?

Microsoft Windows NT 10.0.22621.0 x64

What steps can reproduce the bug?

Just import the readline package and try to use readline.cursorTo(process.stdout, 0, process.stdout.collumns);

What is the expected behavior?

It should move the cursor to the given x and y coordinates

What do you see instead?

310 |   class NodeError extends Base {
311 |     [kIsNodeError] = true;
312 |     code;
313 |     constructor(msg, opts) {
314 |
315 |       super(msg, opts);
         ^
error: The value "NaN" is invalid for argument 'y'. Reason: not specified
 code: "ERR_INVALID_ARG_VALUE"

      at new NodeError (node:readline:315:6)
      at new ERR_INVALID_ARG_VALUE (node:readline:342:4)
      at cursorTo (node:readline:1102:28)

h110m avatar Jan 12 '23 14:01 h110m

Yeah looks like we still need to implement process.stdout.columns here. We should fix this soon

ThatOneBro avatar Jan 12 '23 17:01 ThatOneBro

@ThatOneBro process.stdout.clearLine also seems to not be implemented

h110m avatar Jan 13 '23 07:01 h110m

Is this issue still available, I would like to work on it??

Ekott2006 avatar Jun 08 '23 07:06 Ekott2006

Implemented in 728c8fdcdb4e9276a7bd0721bad3b5d0cbed67fa and will be available in the next release, v0.7, or now if you run: bun upgrade --canary

Electroid avatar Jul 18 '23 05:07 Electroid