All Versions
69
Latest Version
Avg Release Cycle
69 days
Latest Release
-

Changelog History
Page 6

  • v0.5.3 Changes

    🆕 New Features

    • ➕ Added support for method return types with throws and rethrows
    • ➕ Added a new filter replace. Usage: {{ name|replace:"substring","replacement" }} - replaces occurrences of substring with replacement in name (case sensitive)
    • 👌 Improved support for inferring types of variables with initial values
    • Sourcery is now bundling a set of example templates, you can access them in Templates folder.
    • 🐎 We now use parallel parsing and cache source artifacts. This leads to massive performance improvements:
    • e.g. on big codebase of over 300 swift files: ``` Sourcery 0.5.2 Processing time 8.69941002130508 seconds

    Sourcery 0.5.3 First time 4.69904798269272 seconds Subsequent time: 0.882099032402039 seconds

    
    ### 🐛 Bug Fixes
    - 🛠 Method `accessLevel` was not exposed as string so not accessible properly via templates, fixed that.
    - 🛠 Fixes on Swift Templates
    
  • v0.5.2 Changes

    🆕 New Features

    • ➕ Added support for ImplicitlyUnwrappedOptional
    • actualTypeName property of Method.Parameter, Variable, Enum.Case.AssociatedValue, TupleType.Element now returns typeName if type is not a type alias
    • Enum now contains type information for its raw value type. rawType now return Type object, rawTypeName returns its TypeName
    • ➕ Added annotated filter to filter by annotations
    • ➕ Added negative filters counterparts
    • ➕ Added support for attributes, i.e. @escaping
    • 👍 Experimental support for Swift Templates

    • 👍 Swift Templates are now supported

    <% for type in types.classes { %>
        extension <%= type.name %>: Equatable {}
    
        <% if type.annotations["showComment"] != nil { %> // <%= type.name %> has Annotations <% } %>
    
            func == (lhs: <%= type.name %>, rhs: <%= type.name %>) -> Bool {
        <% for variable in type.variables { %> if lhs.<%= variable.name %> != rhs.<%= variable.name %> { return false }
            <% } %>
            return true
        }
    <% } %>
    
  • v0.5.1

  • v0.5.0 Changes

    • You can now pass arbitrary values to templates with --args argument.
    • ➕ Added open access level
    • Type inherits and implements now allow you to access full type information, not just name
    • Type allVariables will now include all variables, including those inherited from supertype and known protocols.
    • Type allMethods will now include all methods, including those inherited from supertype and known protocols.
    • AssociatedValue exposes unwrappedTypeName, isOptional
    • 🆕 New Available stencil filters:
      • static, instance, computed, stored for Variables
      • enum, class, struct, protocol for Types
      • class, initializer, static, instance for Methods
      • count for Arrays, this is used when chaining arrays with filters where Stencil wouldn't allow us to do .count, e.g. {{ variables|instance|count }}
    • Now you can avoid inferring unknown protocols as enum raw types by adding conformance in extension (instead of enum Foo: Equatable {} do enum Foo {}; extension Foo: Equatable {})

    Internal changes

    • 🔨 Refactor code around typenames
  • v0.4.9 Changes

    🆕 New Features

    • Watch mode now works with folders, reacting to source-code changes and adding templates/source files.
    • When using watch mode, status info will be displayed in the generated code so that you don't need to look at console at all.
    • You can now access types of enum's associated values
    • You can now access type's methods and initializers
  • v0.4.8 Changes

    🆕 New Features

    • You can now access supertype of a class
    • Associated values will now automatically use idx as name if no name is provided

    🐛 Bug Fixes

    • 🛠 Fix dealing with multibyte characters
    • types.implementing and types.based should include protocols that are based on other protocols

    Internal changes

    • 👀 TDD Development is now easier thanks to Diffable results, no longer we need to scan wall of text on failures, instead we see exactly what's different.
  • v0.4.7 Changes

    🆕 New Features

    • ➕ Added contains, hasPrefix, hasPrefix filters

    🐛 Bug Fixes

    • AccessLevel is now stored as string
  • v0.4.6 Changes

    🐛 Bug Fixes

    • ↪ Typealiases parsing could cause crash, implemented a workaround for that until we can find a little more reliable solution
  • v0.4.5 Changes

    🆕 New Features

    • 📦 Swift Package Manager support.
  • v0.4.4 Changes

    🆕 New Features

    • 👍 Enum cases also have annotation support

    Internal changes

    • 👌 Improved handling of global and local typealiases.