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

Bump yoctocolors-cjs to 2.1.2 for Deno compatibility #1459

Closed
bombillazo opened this issue Jul 4, 2024 · 4 comments
Closed

Bump yoctocolors-cjs to 2.1.2 for Deno compatibility #1459

bombillazo opened this issue Jul 4, 2024 · 4 comments

Comments

@bombillazo
Copy link

Due to the lack of implementation of the tty library in yoctocolors, a patch was pushed to allow graceful error handling for the library with Deno. This package uses the yoctocolors package with the old version that causes inquerer to crash in Deno when using the latest version (since the move to yoctocolors)

@bombillazo
Copy link
Author

bombillazo commented Jul 4, 2024

Also, using yoctocolors will effectively make colors unusable in Deno until this issue in the Deno repo is resolved. The previous color library worked for Deno.

Also, the initial replacement picolors would have probably worked as well, given that it doesn't have this dependency.

@SBoudrias
Copy link
Owner

SBoudrias commented Jul 4, 2024

Do you also have a ticket on yoctocolor repo?

Also first time I hear Inquirer is running on Deno! That's great. Which package are you using?

I'd be interested in landing an integration test with Deno to ensure things work as expected. Let me know if you'd like to help there!

@bombillazo
Copy link
Author

bombillazo commented Jul 5, 2024

Hey, @SBoudrias, sorry for not getting back to you sooner!

I'm using @inquirer/prompts, and it's worked great so far. I haven't had any issues, but now the colors in the terminal don't work when running with Deno since yoctocolors uses a color implementation that Deno does not currently support. It used to work when you were using chalk though.

@SBoudrias
Copy link
Owner

That's unfortunate, but given the population of Node vs Deno users, I think the decision to switch our color library does bring more value to more users. And we see Deno's working on filling the gap with the tty module, so sounds like it's a matter of months maybe? I think that's fair enough from the point of view of this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants