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

import {getColorDepth} from 'tty' #40236

Closed
arcanis opened this issue Sep 27, 2021 · 3 comments · May be fixed by #40240
Closed

import {getColorDepth} from 'tty' #40236

arcanis opened this issue Sep 27, 2021 · 3 comments · May be fixed by #40240
Labels
feature request Issues that request new features to be added to Node.js. stale tty Issues and PRs related to the tty subsystem.

Comments

@arcanis
Copy link
Contributor

arcanis commented Sep 27, 2021

Is your feature request related to a problem? Please describe.
The getColorDepth and hasColors functions are currently attached to the tty.WriteStream prototype, even though they seem fairly standalone (their result depends on the env, not the stream). As a result, accessing them "legally" (without extracting them from the prototype) isn't possible when process.stdout & co aren't proper ttys.

Describe the solution you'd like
It would be useful to be able to just import getColorDepth & friends from tty.

@Mesteery Mesteery added tty Issues and PRs related to the tty subsystem. feature request Issues that request new features to be added to Node.js. labels Sep 28, 2021
@thunder-coding
Copy link
Contributor

thunder-coding commented Sep 28, 2021

If we consider making getColorDepth and hasColors directly a part of the tty module, I feel it will potentially make sense to depreciate tty.WriteStream.getColorDepth and tty.WriteStream.hasColors

EDIT: There is a reason why this cannot be achieved for now as meantioned in the PR

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2022

There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.

For more information on how the project manages feature requests, please consult the feature request management document.

@github-actions github-actions bot added the stale label Apr 4, 2022
@targos targos moved this to Pending Triage in Node.js feature requests Apr 4, 2022
@targos targos moved this from Pending Triage to Stale in Node.js feature requests Apr 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2022

There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.

For more information on how the project manages feature requests, please consult the feature request management document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. stale tty Issues and PRs related to the tty subsystem.
Projects
None yet
3 participants