Releases: spectreconsole/spectre.console
0.57.0
What's Changed
- Make source generator output deterministic (LF, no BOM) by @phil-scott-78 in #2143
- Add new box border styles including beveled, dashed, dotted, heavy, and rounded variants by @phil-scott-78 in #2142
- Should preserve auto links when wrapped in grid by @patriksvensson in #2149
Full Changelog: 0.56.0...0.57.0
0.56.0
What's Changed
- Ensure redirected output works as expected by @patriksvensson in #2098
- Add missing text prompt suffix by @merklegroot in #2102
- Fix Align measure to respect explicitly set width by @GrantTotinov in #2101
- Option to exclude vertical padding for live progress renderer by @james-newell-forge in #2100
- Don't emit ANSI sequence for 0 movement by @merklegroot in #2104
- ConfirmationPrompt: Allow submission without Enter key by @patriksvensson in #2111
- Add two new layout modes for FigletText by @patriksvensson in #2066
- Fix escaping of interpolated arguments in markup by @GrantTotinov in #2118
- Allow validation chaining by @AntekOlszewski in #2116
- Fix grid regression where expansion did not work by @patriksvensson in #2127
- Preserve links in segments by @patriksvensson in #2135
New Contributors
- @merklegroot made their first contribution in #2102
- @GrantTotinov made their first contribution in #2101
- @james-newell-forge made their first contribution in #2100
Full Changelog: 0.55.2...0.56.0
0.55.2
What's Changed
- Support variation selectors, ZWJ sequences and surrogate pairs in length calculation by @fabsenet in #2082
- Add default value to selection prompt and multiselection prompt by @AntekOlszewski in #2079
New Contributors
Full Changelog: 0.55.1...0.55.2
0.55.1
What's Changed
- Add tests to verify public API by @patriksvensson in #2073
- use StringComparer.OrdinalIgnoreCase as default comparer for TextPrompt by @AntekOlszewski in #2077
- Fix markup link rendering regression by @patriksvensson in #2084
- Add VS16 suffix to non-presentation emojis by @patriksvensson in #2087
- Ensure rendered exceptions take up minimal space by @patriksvensson in #2089
- Fix link parsing to terminate properly by @zhuman in #2091
New Contributors
Full Changelog: 0.55.0...0.55.1
0.55.0
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
- Add Polyfill package by @patriksvensson in #1956
- Update dependencies by @patriksvensson in #1959
- Modernization of the code base by @patriksvensson in #1993
- Add source generation for colors, emojis and spinners by @phil-scott-78 in #1995
- Revert commits related to modernization of code by @patriksvensson in #1999
- Add half-block support to Canvas by @patriksvensson in #2002
- Modernize and clean up the code base a bit by @patriksvensson in #2004
- Add benchmarks for rendering by @patriksvensson in #2007
- Add Spectre.Console.Ansi Project by @patriksvensson in #2006
- Separate links from
Styleby @patriksvensson in #2013 - Remove obsoleted members by @patriksvensson in #2017
- chore: Update dotnet monorepo by @renovate[bot] in #2018
- Fix SplitOverflow with fullwidth characters by @bijesh-bits in #2009
- Fix expand respecting fixed table column widths by @bijesh-bits in #2010
- Use TimeProvider for Progress by @patriksvensson in #2021
- chore: Update dependency Microsoft.Bcl.TimeProvider to v10 by @renovate[bot] in #2023
- docs: fix typo SRG → SGR in README files by @bijesh-bits in #1998
- Added column spanning support for table body rows (#24) by @thomastv in #2020
- chore: Update dependency Polyfill to 9.10.0 by @renovate[bot] in #2024
- chore: Update dependency Microsoft.NET.Test.Sdk to 18.3.0 by @renovate[bot] in #2026
- chore: Update dependency Polyfill to 9.11.0 by @renovate[bot] in #2027
- Various optimisations to Markup instantiation & formatting by @benbryant0 in #2008
- Add option to clear TextPrompt after input by @ThePCJakub in #1979
- Progressbar tag support v2 pr by @mitchcapper in #2025
- chore: Update dependency Polyfill to 9.12.0 by @renovate[bot] in #2030
- chore: Update actions/upload-artifact action to v7 by @renovate[bot] in #2031
- chore: Update dependency Polyfill to 9.13.0 by @renovate[bot] in #2032
- Fix crash in SegmentShape.Calculate when lines list is empty by @rodrigomfvn in #2036
- chore: Update dependency Polyfill to 9.15.0 by @renovate[bot] in #2037
- Feature/cancel prompt by @red-stronghold in #2028
- Improve locking performance on .NET 9.0+ by @MarkCiliaVincenti in #1991
- chore: Update dependency Polyfill to 9.17.0 by @renovate[bot] in #2038
- Text prompt editable default by @MapelSiroup in #2016
- chore: Update dependency Polyfill to 9.18.0 by @renovate[bot] in #2039
- chore: Update dependency Microsoft.CodeAnalysis.Analyzers to v5 by @renovate[bot] in #2041
- chore: Update dotnet monorepo by @renovate[bot] in #2040
- chore: Update dotnet monorepo by @renovate[bot] in #2043
- Fix interactive console detection when output is redirected (#1810) by @1PetarVujakovic in #2042
- Add minimal table style by @patriksvensson in #2045
- Fix memory leak bug related to Segment by @patriksvensson in #2046
- Add setting for JSON indentation by @patriksvensson in #2048
- Disable ANSI when stdout or stderr is redirected by @1PetarVujakovic in #2047
- chore: Update dependency Polyfill to 9.20.0 by @renovate[bot] in #2049
- chore: Update dependency Polyfill to 9.21.0 by @renovate[bot] in #2...
0.53.1 (hotfix)
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
- Ensure OpenCli.Sources are not a dependency of the CLI package. by @patriksvensson in d61788d
- Normalizes paths when writing exceptions to the console for tests. by @phil-scott-78 in #1758
- Fixes issue with Panel not applying overflow to children by @phil-scott-78 in #1942
Full Changelog: 0.53.0...0.53.1
0.54.0
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
- Normalizes paths when writing exceptions to the console for tests. by @phil-scott-78 in #1758
- Fixes issue with Panel not applying overflow to children by @phil-scott-78 in #1942
- Remove Spectre.Console.Cli from repository by @patriksvensson in #1928
Full Changelog: 0.53.0...0.54.0
0.53.0
0.52.0
What's Changed
- Add OpenCLI integration to Spectre.Console.Cli by @patriksvensson in #1909
- Fix OPENCLI_VISIBILITY_INTERNAL to DefineConstants concat by @devlead in #1912
Full Changelog: 0.51.1...0.52.0
0.51.1
What's Changed
- Fix IndexOutOfRangeException in ExceptionFormatter by @martincostello in #1800
- TestConsole can now be configured and accessed in CommandAppTester by @magiino in #1803
- Add ShowRowSeparators in Table Widget docs by @bartoginski in #1807
- Add support for required options by @patriksvensson in #1825
- Added documentation for align widget by @Elementttto in #1746
- Fixed link not displayed in markup in Style.cs and added unit test cases by @Elementttto in #1750
- Update System.Memory dependency by @WeihanLi in #1832
- Reduce memory usage for rune width cache. by @Pannoniae in #1756
- Fix resizing of Live views with reduced size. by @belucha in #1840
- Corrects comment for optional text prompt by @aljanabim in #1857
- Update spinners by @FroggieFrog in #1873
- Support J and K for navigating list prompts by @tobias-tengler in #1877
- Fix space triggering selection when items in the selection list have a space. by @mitchdenny in #1881
- Fix bug setting Header by @mattfennerom in #1890
New Contributors
- @magiino made their first contribution in #1803
- @bartoginski made their first contribution in #1807
- @Elementttto made their first contribution in #1746
- @WeihanLi made their first contribution in #1832
- @Pannoniae made their first contribution in #1756
- @belucha made their first contribution in #1840
- @aljanabim made their first contribution in #1857
- @FroggieFrog made their first contribution in #1873
- @tobias-tengler made their first contribution in #1877
- @mitchdenny made their first contribution in #1881
- @mattfennerom made their first contribution in #1890
Full Changelog: 0.50.0...0.51.1