All Versions
69
Latest Version
Avg Release Cycle
69 days
Latest Release
-
Changelog History
Page 6
Changelog History
Page 6
-
v0.5.3 Changes
๐ New Features
- โ Added support for method return types with
throws
andrethrows
- โ Added a new filter
replace
. Usage:{{ name|replace:"substring","replacement" }}
- replaces occurrences ofsubstring
withreplacement
inname
(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
- โ Added support for method return types with
-
v0.5.2 Changes
๐ New Features
- โ Added support for
ImplicitlyUnwrappedOptional
actualTypeName
property ofMethod.Parameter
,Variable
,Enum.Case.AssociatedValue
,TupleType.Element
now returnstypeName
if type is not a type aliasEnum
now contains type information for its raw value type.rawType
now returnType
object,rawTypeName
returns itsTypeName
- โ 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 } <% } %>
- โ Added support for
-
v0.5.1
-
v0.5.0 Changes
- You can now pass arbitrary values to templates with
--args
argument. - โ Added
open
access level - Type
inherits
andimplements
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 Variablesenum
,class
,struct
,protocol
for Typesclass
,initializer
,static
,instance
for Methodscount
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 {}
doenum Foo {}; extension Foo: Equatable {}
)
Internal changes
- ๐จ Refactor code around typenames
- You can now pass arbitrary values to templates with
-
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
andinitializers
-
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
andtypes.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.
- You can now access
-
v0.4.7 Changes
๐ New Features
- โ Added
contains
,hasPrefix
,hasPrefix
filters
๐ Bug Fixes
- AccessLevel is now stored as string
- โ Added
-
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.