PrettyPrompt
PrettyPrompt copied to clipboard
update to .net 10
Title
Update to .NET 10 and latest NuGet packages, with clipboard protection improvements
Description
This PR updates the project to .NET 10, updates NuGet packages, and clarifies the clipboard protection logic in tests.
Changes Made
1. Updated to .NET 10
- Changed all projects to target .NET 10
- Updated GitHub workflows to use .NET 10
2. Updated NuGet packages
- Updated all packages to their latest versions
3. Improved clipboard protection in tests
ProtectedClipboardnow clearly enforces that tests must callProtectClipboard()before using the clipboardStubClipboardprovides an in-memory clipboard for tests (doesn't touch the real clipboard)- Both classes check that they're being used safely
Why These Changes?
- Prevents bugs: The clipboard checks catch mistakes if tests try to use the clipboard wrong
- Test safety: Tests use a fake clipboard instead of the real one, so they don't mess up the user's clipboard
- Thread safety: Multiple tests can run at the same time without clipboard issues (kept in intermittent failed tests in my machine, might not be an issue if test run separately or in a slower machine)
- .NET 10: Keeps the project on the latest .NET version