Skip to content

Releases: vezel-dev/cathode

v0.4.69

15 Dec 05:11
v0.4.69
Compare
Choose a tag to compare
v0.4.69 Pre-release
Pre-release
  • Improvements and refactoring to I/O APIs.
    • Fixed System.IO.TerminalReader to use a read buffer size of 4096 rather than the system page size since the size has visible effects for users.
    • Added TerminalIn and TerminalOut properties to System.VirtualTerminal, enabling direct access to the terminal even when the standard I/O handles are redirected.
    • Renamed StdIn, StdOut, and StdErr properties on System.VirtualTerminal to StandardIn, StandardOut, and StandardError respectively.
    • Renamed IsRedirected property on System.IO.TerminalReader and System.IO.TerminalWriter to IsInteractive and inverted its meaning.
    • Added IsValid property on System.IO.TerminalHandle.
    • Added System.SystemVirtualTerminal.SizePollingInterval property to control resize polling interval (defaults to TimeSpan.FromMilliseconds(100)).
    • Added Reader property on System.IO.TerminalReader and Writer property on System.IO.TerminalWriter; these provide convenient TextReader/TextWriter wrappers.
    • Added System.SystemVirtualTerminal.DangerousRestoreSettings method.
    • Removed System.Terminal.System static property in favor of System.SystemVirtualTerminal.Instance.
    • Renamed some events to follow .NET naming conventions for events.
  • Improvements to control sequence construction.
    • Added many more control sequences to System.Text.Control.ControlBuilder, System.Text.Control.ControlSequences, and System.Text.Control.ControlConstants.
    • Changed SetTitle to take ReadOnlySpan<char> instead of string.
    • Added a reallocateThreshold parameter to System.Text.Control.ControlBuilder.Clear() (defaults to 4096).
  • 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.
  • 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.
  • 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 classic Main 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 the ImplicitUsings MSBuild property.
  • Removed TermInfo NuGet dependency as it is not currently used.

v0.3.78

30 Nov 12:29
v0.3.78
Compare
Choose a tag to compare
v0.3.78 Pre-release
Pre-release
  • 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, and System.IO.TerminalWriter are now extensible.
    • Added System.IO.TerminalReader.InputRead and System.IO.TerminalWriter.OutputWritten events.
    • Removed System.TerminalExtensions and moved its methods to System.IO.TerminalReader and System.IO.TerminalWriter.
    • System.IO.TerminalInputStream and System.IO.TerminalOutputStream now share a common System.IO.TerminalStream base class and are user-constructible.
    • Added new System.VirtualTerminal base class and System.SystemVirtualTerminal singleton implementation for standard I/O.
      • The System.Terminal static class is now just a thin convenience wrapper around System.SystemVirtualTerminal.
    • System.IO.TerminalHandle.Encoding has been removed in favor of System.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 a System.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).
    • 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.
  • 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.
    • 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.
  • Signal handling changes.
    • Added support for SIGHUP/CTRL_CLOSE_EVENT and SIGTERM/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 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 as ConsoleLifetime is no longer tied to System.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.

v0.2.0

03 Apr 23:45
v0.2.0
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release
  • Added System.Terminal.Resize event.

v0.1.0

21 Mar 20:33
v0.1.0
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release
  • Initial release of System.Terminal.