Skip to content

Releases: fatbobman/CoreDataEvolution

0.7.2

27 Feb 09:52

Choose a tag to compare

Full Changelog: 0.7.1...0.7.2

0.7.1 - Add NSPersistentContainer.makeTest

27 Feb 09:15

Choose a tag to compare

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

27 Feb 08:30

Choose a tag to compare

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 ​Executor​Job) overload from NSModel​Object​Context​Executor. The enqueue(​Unowned​Job) path covers all supported OS versions (iOS 13+).

Documentation

• Added NSModelActor Protocol API section to README covering model​Context, model​Container, the subscript accessor, and with​Context usage examples.

0.6.0

24 Feb 01:05

Choose a tag to compare

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+
  • NSModelObjectContextExecutor now supports:
    • enqueue(_ job: consuming ExecutorJob) on iOS 17+/macOS 14+
    • enqueue(_ job: UnownedJob) on earlier supported systems

Internal Changes

  • MainModelActorX is now availability-gated for SwiftData-supported OS versions.
  • Removed an unnecessary SwiftData import from macro declarations.

Test Infrastructure

  • Test Core Data model is now built programmatically (no external .momd dependency).
  • 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

17 Jan 01:07

Choose a tag to compare

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 InternalImportsByDefault feature for better module management
  • Change SwiftData import to public import for 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

08 Jan 01:32

Choose a tag to compare

update swift-syntax to 6.3

0.5.1

04 Jun 12:03

Choose a tag to compare

Full Changelog: 0.5.0...0.5.1

0.5.0

04 Jun 06:15

Choose a tag to compare

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

07 May 07:25

Choose a tag to compare

Update

Full Changelog: 0.4.2...0.4.3

0.4.2

21 Nov 01:10

Choose a tag to compare

switch performAndWait to perform , avoid deadlock in some case
Thanks @theospears by #1