Releases: fatbobman/CoreDataEvolution
0.7.2
Full Changelog: 0.7.1...0.7.2
0.7.1 - Add NSPersistentContainer.makeTest
New API: NSPersistentContainer.makeTest(model:testName:subDirectory:) Provides an isolated on-disk SQLite store for each unit test. Uses own store file, with stale files cleaned up before loading. Avoids deadlocks and phantom data caused by shared /dev/null or named in-memory stores under parallel test execution.
0.7.0
What's New
New API: withContext
All @NSModelActor and @NSMainModelActor actors now gain two new methods via the NSModelActor protocol extension, enabling direct synchronous access to the underlying Core Data context from within the actor's isolation boundary.
// Inspect persistent store state in tests — context only
try await handler.withContext { context in
let items = try context.fetch(Item.fetchRequest())
#expect(items.count == 1)
}
// Also access the container for cross-context verification
try await handler.withContext { context, container in
let verificationContext = container.newBackgroundContext()
let items = try verificationContext.fetch(Item.fetchRequest())
#expect(items.count == 1)
}Both overloads require T: Sendable, preventing managed objects from accidentally escaping the actor's isolation boundary.
Internal Cleanup
• Removed the unreachable enqueue(_ job: consuming ExecutorJob) overload from NSModelObjectContextExecutor. The enqueue(UnownedJob) path covers all supported OS versions (iOS 13+).
Documentation
• Added NSModelActor Protocol API section to README covering modelContext, modelContainer, the subscript accessor, and withContext usage examples.
0.6.0
Highlights
- Added iOS 13+ compatibility while preserving the existing public API.
- Kept modern executor behavior on iOS 17+/macOS 14+ and added a legacy execution path for earlier supported systems.
- Updated documentation to match the new platform support and executor behavior.
- Added acknowledgment for @rnine's compatibility approach inspiration.
Runtime Compatibility
- Minimum platforms are now:
- iOS 13+
- macOS 10.15+
- tvOS 13+
- watchOS 6+
- visionOS 1.0+
NSModelObjectContextExecutornow supports:enqueue(_ job: consuming ExecutorJob)on iOS 17+/macOS 14+enqueue(_ job: UnownedJob)on earlier supported systems
Internal Changes
MainModelActorXis now availability-gated for SwiftData-supported OS versions.- Removed an unnecessary
SwiftDataimport from macro declarations.
Test Infrastructure
- Test Core Data model is now built programmatically (no external
.momddependency). - Removed packaged test model resources from the test target.
Documentation
- Updated README and DocC system requirements.
- Added compatibility notes for executor behavior across OS versions.
- Added acknowledgment for @rnine.
v0.5.3
Changes in v0.5.3
🛠️ Tooling Improvements
- Add Git hooks for automatic code formatting: Pre-commit hook automatically formats Swift code with swift-format
- Migrate to swift-format: Replace .editorconfig and .swiftformat with Apple's official swift-format tool
- Update VSCode debug configuration: Improve compatibility with latest Swift extension
📦 Dependencies
- Update swift-syntax from 600.0.1 to 602.0.0
⚡ Swift 6 Enhancements
- Enable
InternalImportsByDefaultfeature for better module management - Change SwiftData import to
public importfor improved module visibility
🎨 Code Quality
- Reformat entire codebase with swift-format
- Standardize indentation (2 spaces) and code style
- Optimize import statement ordering across all files
Installation: Add the Git hooks by running bash .githooks/install.sh or git config core.hooksPath .githooks in your local clone.
0.5.2
0.5.1
Full Changelog: 0.5.0...0.5.1
0.5.0
Update dependencies and enhance documentation for CoreDataEvolution
- Changed swift-syntax dependency version range in Package.swift
- Improved README.md with additional platform badges and updated section headers
- Added comprehensive documentation for CoreDataEvolution features and usage
- Expanded NSModelActorTests with new test cases for background and main thread actors
Full Changelog: 0.4.3...0.5.0
0.4.3
Update
Full Changelog: 0.4.2...0.4.3