Skip to content

Conversation

@couchdeveloper
Copy link
Owner

@couchdeveloper couchdeveloper commented Dec 7, 2025

Introduces UserDefaultsStoreMock for side-effect-free testing and SwiftUI previews. AppSettingValues now supports configurable store injection via SwiftUI environment, enabling isolated testing without touching UserDefaults.standard.

Changes:

  • Add UserDefaultsStoreMock with OSAllocatedUnfairLock for thread-safety (iOS 17+)
  • Add @Entry userDefaultsStore environment value for store injection
  • Add .userDefaultsStore() view modifier for mock store configuration
  • Relax Attribute+Publisher constraints to support broader store types
  • Add observer() function to __Settings_Container protocol
  • Make AppSettingValues configurable via @MainActor-isolated store
  • Add comprehensive examples and documentation

Breaking Changes: None

Other Changes:

  • Add automated release workflow with PR label enforcement

Introduces UserDefaultsStoreMock for side-effect-free testing and SwiftUI previews.
AppSettingValues now supports configurable store injection via SwiftUI environment,
enabling isolated testing without touching UserDefaults.standard.

Changes:
- Add UserDefaultsStoreMock with OSAllocatedUnfairLock for thread-safety (iOS 17+)
- Add @entry userDefaultsStore environment value for store injection
- Add .userDefaultsStore() view modifier for mock store configuration
- Relax Attribute+Publisher constraints to support broader store types
- Add observer() function to __Settings_Container protocol
- Make AppSettingValues configurable via @MainActor-isolated store
- Add comprehensive examples and documentation

Breaking Changes: None

Other Changes:
- Add automated release workflow with PR label enforcement
@couchdeveloper couchdeveloper added the enhancement New feature or request label Dec 7, 2025
@couchdeveloper couchdeveloper merged commit 54d469a into main Dec 7, 2025
1 of 2 checks passed
@couchdeveloper couchdeveloper deleted the applyUserDefaultsMock branch December 7, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants