Releases: Matejkob/swift-spyable
Releases · Matejkob/swift-spyable
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.
v0.1.3
v0.1.2
New Contributors
- @coffmark made their first contribution in #13
- @daveverwer made their first contribution in #32
- @raphaelguye made their first contribution in #37
Full Changelog: 0.1.1...0.1.2
v0.1.1
v0.1.0
Key Features:
- Automatic Spy Generation: Annotate your protocol with
@Spyable
, and the macro will automatically generate a corresponding spy class that implements the protocol. - Interaction Tracking: The generated spy class can record all interactions with its methods and properties, providing a comprehensive log for precise assertions in your tests.
Migration from Sourcery:
To facilitate a smooth transition from Sourcery's Mocks & Stubs to Spyable, the initial version of Spyable generates spies for protocols in line with the AutoMockable template. This should allow most projects using Sourcery with the basic AutoMockable template to switch over to Spyable within minutes.
Full Changelog: https://github.com/Matejkob/swift-spyable/commits/0.1.0