Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Bun Incompatibility #159

Closed
DrWarpMan opened this issue Sep 2, 2023 · 1 comment
Closed

[Bug] Bun Incompatibility #159

DrWarpMan opened this issue Sep 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@DrWarpMan
Copy link

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:
image
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.

@DrWarpMan DrWarpMan added the bug Something isn't working label Sep 2, 2023
@DrWarpMan
Copy link
Author

Nevermind, it's already fixed in the upcoming Bun release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant