Repository navigation
v2.0.0
NnShellKit 2.0.0 Release Notes
Breaking Changes
- MockShell: The
shouldThrowErrorinitializer parameter has been renamed toshouldThrowErrorOnFinalwith different behavior - it now only throws when the results array is exhausted, not for every command.
New Features
- Timeout Support: NnShell now supports configurable timeouts to prevent commands from hanging indefinitely
- Enhanced MockShell: New command-specific result mapping using MockCommand for more precise test control
- CI/CD: Added GitHub Actions workflow for automated testing
Bug Fixes
- Fixed shell output truncation issue by reading process output asynchronously
Migration Guide
If you're using MockShell with the shouldThrowError parameter:
// Before
let mock = MockShell(results: ["output"], shouldThrowError: true)
// After - for throwing when results exhausted
let mock = MockShell(results: ["output"], shouldThrowErrorOnFinal: true)
// After - for command-specific error handling
let mock = MockShell(commands: [
MockCommand(command: "failing-cmd", result: .failure(code: 1, output: "error"))
])