Skip to content

v0.2.0

Compare
Choose a tag to compare
@Matejkob Matejkob released this 22 Nov 08:13
· 49 commits to main since this release

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.