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

node:tty -> N.WriteStream.prototype.hasColors is not a function #24616

Closed
pomdtr opened this issue Jul 17, 2024 · 0 comments · Fixed by #24619
Closed

node:tty -> N.WriteStream.prototype.hasColors is not a function #24616

pomdtr opened this issue Jul 17, 2024 · 0 comments · Fixed by #24619
Labels
bug Something isn't working correctly node compat

Comments

@pomdtr
Copy link

pomdtr commented Jul 17, 2024

Version: Deno 1.45.2

Triggered by this line: https://github.com/privatenumber/cleye/blob/9d7bab90a8b12332fcdf67327308a05bfdbc7aa2/src/render-help/renderers.ts#L20

I'm surprised it does not work since the deno docs list it in the available api: https://docs.deno.com/api/node/tty/~/WriteStream.prototype.hasColors#function_WriteStream_prototype_hasColors_0

@marvinhagemeister marvinhagemeister added bug Something isn't working correctly node compat labels Jul 17, 2024
bartlomieju pushed a commit that referenced this issue Jul 22, 2024
This PR adds support for
[`tty.WriteStream.prototype.hasColors()`](https://nodejs.org/api/tty.html#writestreamhascolorscount-env)
and
[`tty.WriteStream.prototype.getColorDepth()`](https://nodejs.org/api/tty.html#writestreamgetcolordepthenv).

I couldn't find any usage on GitHub which passes parameters to it.
Therefore I've skipped adding support for the `env` parameter to keep
our snapshot size small.

Based on denoland/deno_terminal#3

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

Successfully merging a pull request may close this issue.

2 participants