Skip to content

Releases: Matejkob/swift-spyable

v0.8.0

24 Dec 13:33
f6b90c8
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.7.0...0.8.0

v0.7.0

03 Dec 21:13
c81a4c3
Compare
Choose a tag to compare

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, or private).
  • For private protocols, the spies are generated with fileprivate 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 explicit fileprivate access.
  • 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

27 Sep 19:31
9401500
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @github-actions made their first contribution in #112

Full Changelog: 0.6.0...0.6.1

0.6.0

28 Jun 06:07
Compare
Choose a tag to compare

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

24 Jun 15:35
8c8e265
Compare
Choose a tag to compare

What's Changed

New Contributors

0.4.0

05 Mar 19:33
76717f8
Compare
Choose a tag to compare

What's Changed

  • Allow swift-syntax to target 5.10.0 in #88

Full Changelog: 0.3.0...0.4.0

v0.3.0

06 Feb 21:25
Compare
Choose a tag to compare

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

31 Dec 18:54
Compare
Choose a tag to compare

What's Changed

  • Emit (any Error)? instead of Error? 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

22 Nov 08:13
Compare
Choose a tag to compare

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.
      @Spyable(behindPreprocessorFlag: "DEBUG")
      protocol MyService {
          func fetchData() async
      }
      Example generated code:
      #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

For a detailed list of changes, please check the Full Changelog.

v0.1.3

19 Oct 12:17
1b30cec
Compare
Choose a tag to compare

Infrastructure update.