Releases: vezel-dev/cathode
Releases · vezel-dev/cathode
v0.4.69
- Improvements and refactoring to I/O APIs.
- Fixed
System.IO.TerminalReader
to use a read buffer size of4096
rather than the system page size since the size has visible effects for users. - Added
TerminalIn
andTerminalOut
properties toSystem.VirtualTerminal
, enabling direct access to the terminal even when the standard I/O handles are redirected. - Renamed
StdIn
,StdOut
, andStdErr
properties onSystem.VirtualTerminal
toStandardIn
,StandardOut
, andStandardError
respectively. - Renamed
IsRedirected
property onSystem.IO.TerminalReader
andSystem.IO.TerminalWriter
toIsInteractive
and inverted its meaning. - Added
IsValid
property onSystem.IO.TerminalHandle
. - Added
System.SystemVirtualTerminal.SizePollingInterval
property to control resize polling interval (defaults toTimeSpan.FromMilliseconds(100)
). - Added
Reader
property onSystem.IO.TerminalReader
andWriter
property onSystem.IO.TerminalWriter
; these provide convenientTextReader
/TextWriter
wrappers. - Added
System.SystemVirtualTerminal.DangerousRestoreSettings
method. - Removed
System.Terminal.System
static property in favor ofSystem.SystemVirtualTerminal.Instance
. - Renamed some events to follow .NET naming conventions for events.
- Fixed
- Improvements to control sequence construction.
- Added many more control sequences to
System.Text.Control.ControlBuilder
,System.Text.Control.ControlSequences
, andSystem.Text.Control.ControlConstants
. - Changed
SetTitle
to takeReadOnlySpan<char>
instead ofstring
. - Added a
reallocateThreshold
parameter toSystem.Text.Control.ControlBuilder.Clear()
(defaults to4096
).
- Added many more control sequences to
- Various platform-specific driver improvements.
- Fixed regression in
SIGCONT
handling causing terminal settings to be incorrectly overwritten by System.Native. - Fixed Windows console input misbehaving in some cases when Ctrl-C was pressed.
- Fixed
IsRawMode
being set incorrectly when changing the mode threw an exception. - More thoroughly set Unix
termios
state and Windows console modes.- All known bits and modes are now set to sensible values as needed.
- Explicitly switch to cooked mode on initialization rather than trusting the shell.
- Use the same output lock for standard output and standard error.
- Use the new direct terminal access properties when changing terminal settings.
- Improved P/Invoke-related exception messages throughout driver code.
- Make drivers behave properly when any I/O handles are invalid.
- Fixed regression in
- Added a new
System.Diagnostics.TerminalProcess
API.- This API wraps
System.Diagnostics.Process
and bans the use of it. - This new API handles terminal settings for non-redirected child processes correctly.
- Non-redirected child processes can only be created in cooked mode.
- Processes can be created easily with the new
System.Diagnostics.TerminalProcessBuilder
class.
- This API wraps
- Added a new System.Terminal.Hosting package.
- Provides APIs that help ensure that terminal settings are correctly restored when your program exits.
- You implement the new
System.Hosting.IProgram
interface rather than writing a classicMain
entry point. - Backed by a source generator that generates the real
Main
entry point for you.
- System.Terminal packages now add
Using
items based on theImplicitUsings
MSBuild property. - Removed TermInfo NuGet dependency as it is not currently used.
v0.3.78
- The project is now only compatible with the
net6.0
TFM. - The project is now fully trimmable.
- Refactored I/O APIs to make them more understandable and extensible.
System.IO.TerminalHandle
,System.IO.TerminalReader
, andSystem.IO.TerminalWriter
are now extensible.- Added
System.IO.TerminalReader.InputRead
andSystem.IO.TerminalWriter.OutputWritten
events. - Removed
System.TerminalExtensions
and moved its methods toSystem.IO.TerminalReader
andSystem.IO.TerminalWriter
. System.IO.TerminalInputStream
andSystem.IO.TerminalOutputStream
now share a commonSystem.IO.TerminalStream
base class and are user-constructible.- Added new
System.VirtualTerminal
base class andSystem.SystemVirtualTerminal
singleton implementation for standard I/O.- The
System.Terminal
static class is now just a thin convenience wrapper aroundSystem.SystemVirtualTerminal
.
- The
System.IO.TerminalHandle.Encoding
has been removed in favor ofSystem.Terminal.Encoding
.
- Decoupled control sequence construction from the terminal I/O layer.
- Added
System.Text.Control.ControlBuilder
for constructing complex strings with embedded control sequences.- Supports fluent builder syntax.
- Exposes the result as a
System.ReadOnlySpan<char>
without allocating aSystem.String
instance. - Can be cleared and reused.
- Added
System.Text.Control.ControlSequences
static class.- Contains convenience methods for one-off control sequence construction.
- Allocates a
System.String
instance on every call.
- Added
System.Text.Control.ControlConstants
class with various useful constants (ESC
,CSI
,OSC
,ST
, etc). - Added new control sequences.
- ConEmu-style progress reporting (
OSC 9 ; 4
). - Focus gain/loss events (
CSI ? 1004
).
- ConEmu-style progress reporting (
- Moved enums related to control sequences to the
System.Text.Control
namespace. System.Terminal
no longer tracks terminal state based on escape sequences.- This was always fragile and inaccurate if the user bypassed the predefined methods.
- Removed
System.TerminalScreen
as a result.
- Added
- Various platform-specific driver improvements.
- Windows console input improvements.
- Unicode text is now read correctly.
- Ctrl-C and Ctrl-Z are now handled correctly.
- Polling is now used for the
System.Terminal.Resize
event on all platforms.- Unix platforms still use
SIGWINCH
in addition to polling.
- Unix platforms still use
- Terminal size retrieval now falls back to the
LINES
/COLUMNS
environment variables. - Unix terminal drivers now try to set
termios
settings on all 3 standard I/O descriptors.- This mirrors the Windows driver and makes the drivers more robust if some (but not all) descriptors are redirected.
- Switched to CsWin32 for Windows P/Invoke generation.
- Dropped Vanara.PInvoke.Kernel32 dependency as a result.
- Windows console input improvements.
- Signal handling changes.
- Added support for
SIGHUP
/CTRL_CLOSE_EVENT
andSIGTERM
/CTRL_SHUTDOWN_EVENT
. - Switched to
PosixSignalRegistration
for signal handling.- Dropped Mono.Posix.NETStandard dependency as a result.
- Removed
System.Terminal.GenerateSuspendSignal
(SIGTSTP
) as there was not a clear use case.
- Added support for
- Added
System.Text.MonospaceWidth
API for measuring rune/string width.- Currently based on the Wcwidth package.
- Updated types in Terminal.Extensions for .NET 6.
- Enabled reloading of user secrets in the default builder.
- Removed
TerminalLifetime
asConsoleLifetime
is no longer tied toSystem.Console
.
- Added descriptions to banned symbols (
System.Console
,System.Diagnostics.ConsoleTraceListener
, etc). - Changed assembly names (package names are unaltered).
Terminal.dll
->System.Terminal.dll
.Terminal.Extensions.dll
->Microsoft.Extensions.Terminal.dll
.
- Switched to Nerdbank.GitVersioning for patch-level version number generation.