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

tty: expose hasColors and getColorDepth #54415

Closed
wants to merge 1 commit into from

Conversation

avivkeller
Copy link
Member

This PR introduces the direct exposure of hasColors and getColorDepth under the tty module. In addition, it documentation-deprecates their previous locations.

This work builds on #40240, an older draft that has been inactive for several years. Given the interest in that original PR, I decided to complete it and submit this one.

Fixes #40236.

Exposes `hasColors` and `getColorDepth` under `tty`.

Documentation-only deprecates `tty.WriteStream.prototype.getColorDepth`
and `tty.WriteStream.prototype.hasColors`.

Co-Authored-By: Yaksh Bariya <[email protected]>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tty Issues and PRs related to the tty subsystem. util Issues and PRs related to the built-in util module. labels Aug 16, 2024
@avivkeller avivkeller added notable-change PRs with changes that should be highlighted in changelogs. deprecations Issues and PRs related to deprecations. labels Aug 16, 2024
Copy link
Contributor

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @redyetidev.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

@avivkeller
Copy link
Member Author

CC @nodejs/tty

@avivkeller avivkeller closed this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecations Issues and PRs related to deprecations. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. tty Issues and PRs related to the tty subsystem. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

import {getColorDepth} from 'tty'
2 participants