[Bug] Bun Incompatibility
DrWarpMan opened this issue · comments
Environment
- OS: Linux, Arch
- Node Version: using Bun v0.8.1 (https://bun.sh/)
- Package:
@clack/prompts
,@clack/core
- Package Version: v0.7.0
Describe the bug
When using this library with Bun
, the terminal behaves strangely.
It shifts the "answer" below the prompt, and everything you type gets duplicated as shown on the screenshot:
It's not just a visual bug, after pressing ENTER
the return value of the prompt is undefined
.
To Reproduce
Steps to reproduce the behavior:
- Install
bun
(https://bun.sh/) - Run
bun init
- Put the following code into
index.ts
:
import { text } from "@clack/prompts";
await text({message: "foobar"});
- Run
bun index.ts
- Type anything
Expected behavior
The terminal should not be "shifted", the typed letters shouldn't get duplicated and the return value should be string.
Additional Information
I am not sure if how important this bug is, depending on how much do you want to support Bun, if even. But considering how popular is Bun getting, and how great it is, I would think about it. Also I don't even know if it's a Bun issue or clack issue.
I tried downloading older versions of both Bun and clack, same result.
Nevermind, it's already fixed in the upcoming Bun release.