feat: TestTerminalContext lifecycle, CancelKeyPress, baseline compliance#21
Merged
Conversation
- Fix .envrc to use PATH_add bin syntax - Disable banned-symbols and banned-api-analyzers checks (this IS the terminal library) - Disable dev-cli-capabilities check (JSON trailing comma from TimeWarp.Nuru) - Add #region Purpose to all dev-cli files - Remove orphaned CPM packages from Directory.Packages.props Part of task 019
- TimeWarp.Amuru 1.0.0-beta.19 -> 1.0.0-beta.21 - TimeWarp.Jaribu 1.0.0-beta.9 -> 1.0.0-beta.12 - TimeWarp.Nuru 3.0.0-beta.54 -> 3.0.0-beta.63 - Microsoft.CodeAnalysis.NetAnalyzers 10.0.103 -> 10.0.201 - Microsoft.CodeAnalysis.CSharp.CodeStyle 5.0.0 -> 5.3.0
This IS the terminal library that wraps System.Console, so we cannot ban Console usage here. The banned checks are disabled via .editorconfig. - Remove BannedSymbols.txt - Remove BannedApiAnalyzers package reference - Keep .editorconfig settings that disable banned checks Part of task 019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TestTerminalContextto use explicit lifecycle APIs (SetCurrent,ClearCurrent) and addedUse(TestTerminal)for scoped restorationCancelKeyPressevent toITerminalfor graceful Ctrl+C handling.envrc, added#region Purpose, updated packages, disabled banned checks for terminal library)Changes
TestTerminalContext Refactor
CurrentsetterSetCurrent(TestTerminal)andClearCurrent()methodsUse(TestTerminal)returningIDisposablefor scoped usageCancelKeyPress Event
CancelKeyPressevent toITerminalinterfaceTimeWarpTerminal(delegates toConsole.CancelKeyPress)TestTerminalwithSimulateCancelKeyPress()for testingBaseline Compliance
.envrcto usePATH_add binsyntax#region Purposeto all dev-cli files.editorconfigto disable banned checks (this IS the terminal library)Validation
ganda repo audit- All checks passdotnet build source/timewarp-terminal/timewarp-terminal.csproj- Succeedsdotnet run tests/test-terminal-context-01-integration.cs- 7 tests passdotnet run tests/cancel-key-press-01-basic.cs- All tests passCommits Since Last Merge (24)