Skip to content

Releases: uber/mockolo

2.6.1

24 Mar 09:15
ac03c12

Choose a tag to compare

For Build Tools Plugin (artifactbundle)

.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.6.1/mockolo.artifactbundle.zip",
    checksum: "8ed3fd73a7b76b87b3d53cd702e5b977443d4ffd00d50161200e2526fc08e7bf"
),

What's Changed

Full Changelog: 2.6.0...2.6.1

2.6.0

24 Mar 02:53
9c0c92f

Choose a tag to compare

New features

  • Support elseif/else directive by @fummicc1 in #328

    #if DEBUG
    import Foundation
    #elseif FEATURE_X
    import FeatureX
    #else
    import Production
    #endif
    
    /// @mockable
    protocol PresentableListener: AnyObject {
        func run()
        #if DEBUG
        func showDebugMode()
        #elseif FEATURE_X
        func showFeatureXMode()
        #else
        func showReleaseMode()
        #endif
    } 
  • Unify handler injection way between class-based and actor-based mocks. by @fummicc1 in #334

    /// @mockable
    protocol Foo: Actor {
        func baz(arg: String) async -> Int
    }
    
    actor FooMock: Foo {
        ...
        // `nonisolated` is added!
        nonisolated var bazHandler: ((String) async -> Int)? {
            get { bazState.withLock(\.handler) }
            set { bazState.withLock { $0.handler = newValue } }
        }
    
  • Add subscript setter support with handler and call count by @farkasseb in #337

    /// @mockable
    public protocol SendableSubscriptProtocol: Sendable {
        subscript(key: Int) -> String { get set }
    }
    
    public final class SendableSubscriptProtocolMock: SendableSubscriptProtocol, @unchecked Sendable {
        ...
        public var subscriptHandler: (@Sendable (Int) -> String)? {
            get { subscriptState.withLock(\.handler) }
            set { subscriptState.withLock { $0.handler = newValue } }
        }
        
        ...
        // `SetHandler` is new!
        public var subscriptSetHandler: (@Sendable (Int, String) -> ())? {
            get { subscriptSetState.withLock(\.handler) }
            set { subscriptSetState.withLock { $0.handler = newValue } }
        }
    

Fix bugs

  • Fix incorrect handling of MetatypeType (T.Type) by @sidepelican in #333
  • Fix Name Override With Inheritance by @plx in #338

Maintenances

New Contributors

Full Changelog: 2.5.0...2.6.0

For Build Tools Plugin (artifactbundle)

.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.6.0/mockolo.artifactbundle.zip",
    checksum: "47bf9befcb1a92ba801d13018c8e1f110e3bb9fd6b19e4983d53a3a0ad986780"
),

2.5.0

13 Nov 01:51
54a59e1

Choose a tag to compare

New features

Maintenances

New Contributors

Full Changelog: 2.4.0...2.5.0

For Build Tools Plugin (artifactbundle)

.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.5.0/mockolo.artifactbundle.zip",
    checksum: "107825279e5c7c2f8ef021320d8054e0b36fcb9e634d02d2ff1bde6d8b460722"
),

2.4.0

21 May 08:25
41e701f

Choose a tag to compare

New features

  • When associatedtype has constraints, mock class becomes generic by @sidepelican in #294
/// @mockable
protocol Foo {
    associatedtype T: StringProtocol
}

// before
class FooMock: Foo {
    typealias T = StringProtocol // 🤪 StringProtocol is not conforms to StringProtocol. Protocols don't conform to itself.
    init() { }
}

// after
class FooMock<T: StringProtocol>: Foo {
    init() { }
}

Fix bugs

  • Avoid Special Handling of the "Unknown" Type Name by @sidepelican in #299
  • Remove metadata from NominalModel, resulting correct Rx SubjectType in mock's init. by @sidepelican in #292

Maintenances

Full Changelog: 2.3.1...2.4.0

For Build Tools Plugin (artifactbundle)

.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.4.0/mockolo.artifactbundle.zip",
    checksum: "740787a5c532dc1a16e9b6940c7ef844caa1f7c02cb85b740e4f44f49a25dc68"
),

2.3.1

26 Feb 13:56
10c91a2

Choose a tag to compare

What's Changed

  • Fix compile error in Sendable mock with labeled history by @sidepelican in #289

Full Changelog: 2.3.0...2.3.1

For Build Tools Plugin (artifactbundle)

  • full version (linux and macos)
.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.3.1/mockolo.artifactbundle.zip",
    checksum: "f75d3778a3de8e5c540aa0a4480a6e8e2b21f84a759d64a41da96f6f37823ac1"
),
  • lightweight version (macos only)
.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.3.1/mockolo-macos.artifactbundle.zip",
    checksum: "daefaebdb24bf0f0a5f830523330b81850e9e95a3e2fc2011a50054309a55eae"
),

2.3.0

23 Feb 05:12
747cfb9

Choose a tag to compare

New features

  • Avoid duplicated variable under if-macro syntax by @fummicc1 in #279
  • Concurrency safe handler by @sidepelican in #276
    • (computed variable handlers are not concurrency safe yet.)
  • Add labels to history tuple array by @sidepelican in #284

Maintenances

New Contributors

Full Changelog: 2.2.0...2.3.0

For Build Tools Plugin (artifactbundle)

  • full version (linux and macos)
.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.3.0/mockolo.artifactbundle.zip",
    checksum: "526ead91c62daac83c8d7bbad7e75508ed5bbb4f513b72c38e148213b69167c6"
),
  • lightweight version (macos only)
.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.3.0/mockolo-macos.artifactbundle.zip",
    checksum: "a444621a5db5b09fb0829cafd964734ce99770e8800e0d81fe8d9bb6ab880348"
),

2.2.0

30 Nov 04:33
588267d

Choose a tag to compare

What's Changed

Maintenances

New Contributors

Full Changelog: 2.1.1...2.2.0

For Build Tools Plugin (artifactbundle)

  • full version (linux and macos)
.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.2.0/mockolo.artifactbundle.zip",
    checksum: "75ec5806ca70c99f0acd9f527c3892d62fe8a585e74ca4736842a2efab981ef6"
),
  • lightweight version (macos only)
.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.2.0/mockolo-macos.artifactbundle.zip",
    checksum: "26aa998f46cc6e814accf6014571116368fd7f772ce060de63ac8b36069d33fe"
),

2.1.1

23 Apr 08:57
43c7ec5

Choose a tag to compare

What's Changed

Maintenances

New Contributors

Full Changelog: 2.0.1...2.1.1


For Build Tools Plugin

.binaryTarget(
    name: "mockolo",
    url: "https://github.com/uber/mockolo/releases/download/2.1.1/mockolo.artifactbundle.zip",
    checksum: "e3aa6e3aacec6b75ee971d7ba1ed326ff22372a8dc60a581cec742441cdbd9db"
),

2.0.1

23 Jun 05:39
e07a778

Choose a tag to compare

What's Changed

  • Use safeName for history variable name by @sidepelican in #239
  • Drop legacy sequence extensions by @sidepelican in #240
  • [Bugfix] Fix functions with same signature and different generic constraints not getting generated by @ryanaveo in #241
  • Only consider relevant files when collecting import statements. by @rudro in #243

New Contributors

Full Changelog: 2.0.0...2.0.1

2.0.0

18 May 05:19
dc4caa2

Choose a tag to compare

2.0.0 Major Update

mockolo uses SwiftSyntax508.0.0 from this version.
This will solve many installation issues.
Along with this, build support for mockolo itself in lower Xcode versions will be terminated.

Since mockolo built with the latest Xcode will still work for older Swift code, many users will not need to worry about this.

What's Changed

New Contributors

Full Changelog: 1.8.2...2.0.0