PrettyPrompt icon indicating copy to clipboard operation
PrettyPrompt copied to clipboard

update to .net 10

Open hikarisakamoto opened this issue 1 month ago • 0 comments

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

  • ProtectedClipboard now clearly enforces that tests must call ProtectClipboard() before using the clipboard
  • StubClipboard provides 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

hikarisakamoto avatar Nov 25 '25 21:11 hikarisakamoto