Skip to content

Releases: spectreconsole/spectre.console

0.55.0

03 Apr 12:58

Choose a tag to compare

0.55.0 Pre-release
Pre-release

This release brings new features, performance improvements, bug fixes, and some important architectural changes.

Caution

There are breaking changes in this release, so make sure you review the release notes and try things out before upgrading in production.

New Spectre.Console.Ansi Library

One of the biggest changes in this release is the introduction of
Spectre.Console.Ansi,
a new standalone library for writing ANSI escape
sequences to the terminal without taking a full dependency on Spectre.Console.

This makes it easy to add ANSI support to lightweight tools and libraries where
pulling in the full Spectre.Console package would be overkill. Spectre.Console
itself now depends on this library internally.

We've also added some nice convenience methods for the .NET Console class:

using Spectre.Console.Ansi;

Console.Markup("[yellow]Hello[/] ");
Console.MarkupLine("[blue]World[/]");
  
Console.Ansi(writer => writer
    .BeginLink("https://spectreconsole.net", linkId: 123)
    .Decoration(Decoration.Bold | Decoration.Italic)
    .Foreground(Color.Yellow)
    .Write("Spectre Console")
    .ResetStyle()
    .EndLink());

Style Is Now a Struct

Style has been converted from a class to a struct, and link/URL information
has been extracted into a separate Link type. This improves allocation
performance, especially in rendering-heavy scenarios, but is a breaking change
for code that relies on reference semantics.

Progress Improvements

The Progress widget received a lot of love in this release. It now uses
TimeProvider instead of the wall clock, making it significantly easier to
write deterministic tests. ProgressTask has a new Tag property for attaching
arbitrary metadata, and you can now override the global hide-when-completed
behavior on individual tasks. Tasks can also be removed from the progress
context entirely.

Speed calculations have been improved with configurable max sampling age and
sample count, giving you more control over how responsive or smooth the speed
readout is. Speed calculations for stopped tasks have been fixed, and
indeterminate tasks no longer show a meaningless time estimate.

Prompt Enhancements

Prompts now accept a CancellationToken, making it possible to cancel a waiting
prompt programmatically. TextPrompt default values can now be edited by the
user instead of being accepted or rejected as a whole. There is also a new
option to clear the prompt line after the user provides input.

Tables and Rendering

Table body rows now support column spans, and a new minimal border style has
been added for a cleaner look. The Canvas widget gained half-block support,
which enables double the vertical resolution when rendering graphics. JsonText
now has a configurable indentation depth. Various performance improvements have
also been made to Markup instantiation and formatting.

Bug Fixes

A memory leak related to Segment has been fixed, along with
Segment.SplitLines ignoring multiple consecutive line breaks. A crash in
SegmentShape.Calculate when the lines list was empty has been resolved.
Interactive console detection when output is redirected now works correctly,
and table expand now properly respects fixed column widths. Truncation and
overflow handling for fullwidth characters has been corrected, and locking
performance on .NET 9.0+ has been improved.

Breaking Changes

This release contains several breaking changes. Please review the following
before upgrading.

Style is now a struct. Code relying on reference semantics such as null
checks or reference equality will need to be updated. Related to this, link
and URL information has moved from Style to a new Link type, so any code
that reads or writes links through Style will need to be adjusted.

Several previously obsoleted members have been removed. The Alignment property
on Calendar, Table, and Grid, as well as the Render extension method,
no longer exist. AnsiConsoleFactory has been made static and internal, so code
that instantiated this class directly will need an alternative approach.

Finally, ANSI output is now disabled when stdout or stderr is redirected. This
is a behavior change: output that previously included ANSI escape codes when
piped or redirected will now be plain text.

What's Changed

Read more

0.53.1 (hotfix)

25 Nov 20:52

Choose a tag to compare

0.53.1 (hotfix) Pre-release
Pre-release

This is a hotfix release for 0.53.0, which accidentally included OpenCli.Sources as a dependency, instead of being included in the package.

As a bonus, a fix for panels was also included in this release 😄

What's Changed

Full Changelog: 0.53.0...0.53.1

0.54.0

12 Nov 23:54

Choose a tag to compare

0.54.0 Pre-release
Pre-release

Version 0.54.0 of Spectre.Console has been released!

Spectre.Console.Cli has a new home!

We've decided to move Spectre.Console.Cli to its own repository, where we will prepare it for a 1.0 release. This means that the Spectre.Console.Cli NuGet packages will no longer be versioned together with Spectre.Console. They will now have a preview version such as 1.0.0-alpha-0.x.

There should be no issues staying on version 0.53.0 of Spectre.Console.Cli until we release a stable version if you prefer not to use a pre-release dependency.

New unit testing package for Spectre.Console.Cli

There is now a new testing package for Spectre.Console.Cli called Spectre.Console.Cli.Testing. This is where you will find the CommandAppTester from now on.

You can find more information about unit testing in the documentation.

What's Changed

Full Changelog: 0.53.0...0.54.0

0.53.0

12 Nov 21:27

Choose a tag to compare

0.53.0 Pre-release
Pre-release

What's Changed

  • Add top-level CancellationToken support to Spectre.Console.Cli by @0xced in #1911
  • Update the Spectre.Console.Cli documentation with CancellationToken by @0xced in #1920

Full Changelog: 0.52.0...0.53.0

0.52.0

10 Oct 19:02

Choose a tag to compare

0.52.0 Pre-release
Pre-release

What's Changed

Full Changelog: 0.51.1...0.52.0

0.51.1

06 Sep 22:53

Choose a tag to compare

0.51.1 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 0.50.0...0.51.1

0.50.0

08 Apr 16:14

Choose a tag to compare

0.50.0 Pre-release
Pre-release

What's Changed

General

Console

CLI

  • Remove redundant explain settings ctor by @gitfool in #1534
  • Trim trailing comma in settings by @devlead in #1550
  • Consider -? as an alias to -h by @kzu in #1552
  • Trimming of TestConsole output by CommandAppTester is user configurable. by @FrankRay78 in #1739
  • Include resource files for additional cultures in HelpProvider. by @Tolitech in #1717
  • Conditionally trim trailing periods of argument and option descriptions by @TheTonttu in #1740
  • Changed IConfigurator to return IConfigurator instead of void by @byte2pixel in #1762
  • Add parsed unknown flag to remaining arguments for a branch with a default command by @FrankRay78 in #1660
  • Correctly show application version; execution of command with version option by @FrankRay78 in #1663
  • Help output correctly decides when to show the version option by @FrankRay78 in #1664

New Contributors

Full Changelog: 0.49.1...0.50.0

0.49.0

23 Apr 13:13

Choose a tag to compare

0.49.0 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 0.48.0...0.49.0

0.48.0

22 Nov 20:53

Choose a tag to compare

0.48.0 Pre-release
Pre-release

Version 0.48 of Spectre.Console has been released!

Several rendering issues have been addressed, such as fixing problems related to rendering inside status causing corrupt output, avoiding exceptions on Rows with no children, as well as addressing rendering bugs in TextPath.

New features have been added, such as the ability to show separators between table rows. Other notable additions include progress bar header and footer support, customizable (and localizable) help providers, and the option to style text and confirmation prompts.

New Contributors

What's Changed

Rendering

CLI

Documentation & Samples

Other stuff

0.47.0

19 May 15:53
018f4eb

Choose a tag to compare

0.47.0 Pre-release
Pre-release

What's Changed

Command line updates

  • Add possibility to set description and/or data for the default command by @0xced in #1091
  • Add support for converting command parameters into FileInfo and DirectoryInfo by @0xced in #1145
  • Add support for arrays in [DefaultValue] attributes by @0xced in #1164
  • Add ability to pass example args using params syntax by @seclerp in #1166
  • Alias for branches by @ilyahryapko in #1131
  • Command line improvements by @FrankRay78 in #1103

Documentation updates

New Contributors

Full Changelog: 0.46.0...0.47.0