Repository navigation
0.9.0
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:
DirectoryandFileSystemnow inheritSendable. Update custom implementations to satisfy Swift’sSendablerequirements, including protecting mutable state where needed. - Test doubles:
MockDirectoryandMockFileSystemchanged from classes toSendablestructs. 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 withDefaultFileSystem(), which usesFileManager.default. If you depend on a custom file manager, provide a customFileSystemimplementation.
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.