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

Move Terminal from node-core-library to the terminal package. #3176

Merged
merged 18 commits into from
Feb 17, 2024

Conversation

iclanton
Copy link
Member

@iclanton iclanton commented Jan 20, 2022

Summary

This change moves Terminal and related APIs from @rushstack/node-core-library to @rushstack/terminal and changes the way colors are generated. Instead of Colors.colorName returning a structure describing how to generate the color, it will now simply return a string with the ASCII color codes.

Details

This is a breaking change to the Terminal API. Support is included for the old IColorableSequence objects, but this is not included in the types.

Part of #3147

Specific API changes:

  • Terminal, ITerminal, ITerminalProvider, and the terminal provider implementations were removed from @rushstack/node-core-library and moved to @rushstack/terminal with API changes
  • Colors and IColorableSequence were removed from @rushstack/node-core-library; instead use the new Colorize API from @rushstack/terminal
  • ITerminalWritableOptions from @rushstack/terminal was renamed to ITerminalStreamWritableOptions
  • TerminalWritable was removed from @rushstack/node-core-library; instead use the new TerminalStreamWritable API from @rushstack/terminal

How it was tested

Tests were moved and expanded, projects in the repo were updated to use the new APIs.

apps/heft/src/utilities/ToolPackageResolver.ts Outdated Show resolved Hide resolved
apps/rush-lib/src/cli/SelectionParameterSet.ts Outdated Show resolved Hide resolved
apps/rush-lib/src/logic/Git.ts Outdated Show resolved Hide resolved
common/reviews/api/typings-generator.api.md Show resolved Hide resolved
libraries/heft-config-file/src/ConfigurationFile.ts Outdated Show resolved Hide resolved
libraries/terminal/src/PrintUtilities.ts Outdated Show resolved Hide resolved
libraries/terminal/src/Terminal.ts Show resolved Hide resolved
@iclanton iclanton force-pushed the move-terminal branch 4 times, most recently from 5b73b44 to 6d80a9f Compare January 21, 2022 03:32
@iclanton iclanton force-pushed the move-terminal branch 2 times, most recently from ba1c9a1 to 5b2f93a Compare February 7, 2022 23:58
@iclanton iclanton force-pushed the move-terminal branch 2 times, most recently from d3e2173 to 510f117 Compare October 8, 2023 23:55
@iclanton iclanton merged commit e91545e into microsoft:main Feb 17, 2024
5 checks passed
@iclanton iclanton deleted the move-terminal branch February 17, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants