Skip to content

0.9.0

Choose a tag to compare

@nikolainobadi nikolainobadi released this 15 Oct 17:32
· 3 commits to main since this release

NnFileKit 0.9.0 adds Sendable requirements to its file system abstractions and synchronized state to its test doubles. This release includes breaking changes to deployment targets and public APIs.

Breaking changes and migration

  • Deployment targets: The package previously declared no explicit platform minimums; it now requires macOS 15 or iOS 18. Raise consuming projects’ deployment targets accordingly.
  • Custom conformers: Directory and FileSystem now inherit Sendable. Update custom implementations to satisfy Swift’s Sendable requirements, including protecting mutable state where needed.
  • Test doubles: MockDirectory and MockFileSystem changed from classes to Sendable structs. Replace class-only usage, such as identity comparisons and weak references, with assertions on exposed state. Copies share synchronized mutable state, so recorded calls and state changes remain visible through every copy; create a new mock when you need independent state.
  • File manager injection: DefaultFileSystem(fileManager:) has been removed. Replace calls using the default manager with DefaultFileSystem(), which uses FileManager.default. If you depend on a custom file manager, provide a custom FileSystem implementation.

Concurrency support

Values typed as any Directory or any FileSystem can now cross concurrency boundaries. CopiedDirectory and CopiedFile also conform to Sendable, allowing recorded copy operations to be passed across those boundaries.