Releases: Matejkob/swift-spyable
Releases · Matejkob/swift-spyable
v0.8.0
What's Changed
- Support
Sendable
conformed protocol by @yoshiki-tsukada in #133
Full Changelog: 0.7.0...0.8.0
v0.7.0
Changelog for v0.7.0
🚀 What's New
This release introduces access level inheritance and customization, a highly anticipated feature that significantly enhances the flexibility and usability of swift-spyable
. Alongside access level improvements, we've added support for Swift 6.0, fixed critical bugs, and improved CI workflows and documentation.
🌟 Key Features
Access Level Inheritance
- Generated spies now automatically inherit the access level of their annotated protocols (
public
,internal
,fileprivate
, orprivate
). - For
private
protocols, the spies are generated withfileprivate
access to comply with Swift's access control rules.
Custom Access Level Overrides
- Introduced the
accessLevel
argument in the@Spyable
macro to allow overriding the inherited access level on a per-spy basis.- Example:
@Spyable(accessLevel: .fileprivate)
generates spies with explicitfileprivate
access.
- Example:
- Supported values:
.public
,.package
,.internal
,.fileprivate
, and.private
.
🛠 Other Changes and Fixes
- Support for Generic Functions (#71): Resolved issues with generating spies for protocols containing generic functions. Big thank you to @dafurman!
♥️ - Swift 6.0 Support: Ensured compatibility with Swift 6.0.
Full Changelog: [Compare v0.6.1...v0.7.0](0.6.1...0.7.0)
Thank you for using swift-spyable
! As always, feel free to open issues or contribute to the project to help it grow. 😊
0.6.1
What's Changed
- Improve Mermaid diagram visibility for light and dark modes by @Matejkob in #103
- Consolidate CI Workflows into a Single Unified Workflow by @Matejkob in #104
- Update GitHub Format Action to create a PR with swift-format changes by @Matejkob in #105
- Test format action by @Matejkob in #106
- Remove if since previews step will exit if there are no changes by @Matejkob in #107
- Add git push to run swift format step by @Matejkob in #108
- Set origin when pushing by @Matejkob in #109
- Apply swift-format changes by @github-actions in #112
- Update CI badge by @Matejkob in #113
- Update codecov by @Matejkob in #114
- Add new job–Swift Macro Compatibility Check by @Matejkob in #116
- Create .editorconfig by @Matejkob in #117
- Update package manifest by @Matejkob in #119
- Use swift-syntax-600 pre release branch by @Matejkob in #118
- Update ci.yml by @Matejkob in #120
- Update ci.yml by @Matejkob in #121
- Update ci.yml by @Matejkob in #122
New Contributors
- @github-actions made their first contribution in #112
Full Changelog: 0.6.0...0.6.1
0.6.0
What's Changed
- Add more unit tests to existential and opaque types by @Matejkob in #94
- Add unit test to variable decl with existenital type by @Matejkob in #96
- Support returning existential types in functions by @Matejkob in #97
- Support forced unwrapped type as function return type by @Matejkob in #99
- Change swift-syntax URL to swiftlang org by @Matejkob in #100
- Update README by @Matejkob in #102
- Support variable declaration with forced unwrapped type by @Matejkob in #101
Full Changelog: 0.5.0...0.6.0
0.5.0
What's Changed
- Fix to allow existential type to function arguments by @yoshiki-tsukada in #93
New Contributors
- @yoshiki-tsukada made their first contribution in #93
0.4.0
v0.3.0
What's Changed
- Fix #35 - Support nonescaping closure parameters by @dafurman in #69
- Refactor unit tests by @Matejkob in #78
- Fix codecov badge by @Matejkob in #82
- Fix to search for 'Spyable' in AttributeListSyntax when checking behindPreprocessorFlag. by @TTOzzi in #83
- Update issue templates by @Matejkob in #86
- Improve handling of
behindPreprocessorFlag
argument in@Spyable
attribute by @Matejkob in #85
New Contributors
Full Changelog: 0.2.1...0.3.0
v0.2.1
What's Changed
- Emit
(any Error)?
instead ofError?
by @arennow in #70 - Improve Closure Factory unit tests by @Matejkob in #75
- Add handling inout parameter by @Matejkob in #76
- Fix leading spacing on property and function declaration expansion by @dafurman in #49
- Refactor most of the unit tests by @Matejkob in #77
New Contributors
Full Changelog: 0.2.0...0.2.1
v0.2.0
What's New in Version 0.2.0
Features
- Restricting Spyable Usage
- Introducing the ability to limit the usage of Spyable's generated code to specific targets, addressing the concern of unwanted use in production code.
- You can now use the
behindPreprocessorFlag
parameter in the@Spyable
annotation to wrap the macro expansion in a preprocessor macro, such as#if DEBUG
, restricting its use where the specified flag is not defined.Example generated code:@Spyable(behindPreprocessorFlag: "DEBUG") protocol MyService { func fetchData() async }
#if DEBUG class MyServiceSpy: MyService { // ... spy implementation } #endif
- This provides more control over where Spyable's generated code can be used, allowing you to, for instance, limit it to test targets only.
Bug Fixes
- Deprecation Warnings
- Fixed deprecation warnings contributed by @dafurman.
- Other various fixes and refactorings to enhance code quality.
New Contributors
- Welcome to our new contributors:
- @dafurman, who made their first contribution in PR #48.
- @ankithTao, who made their first contribution in PR #66.
For a detailed list of changes, please check the Full Changelog.