Releases: krzysztofzablocki/Sourcery
Releases · krzysztofzablocki/Sourcery
0.9.0
New Features
- Added support for file paths in
config
parameter - Added
isDeinitializer
property for methods - Improved config file validation and error reporting
- Various improvements for
AutoMockable
template:- support methods with reserved keywords name
- support methods that throws
- improved generated declarations names
Bug fixes
- Fixed single file generation not skipping writing the file when there is no generated content
Internal changes
- Updated dependencies for Swift 4
- Update internal ruby dependencies
0.8.0
New Features
- Added support in
AutoHashable
for static variables,[Hashable]
array and[Hashable: Hashable]
dictionary - Added
definedInType
property forMethod
andVariable
- Added
extensions
filter for stencil template - Added include support in Swift templates
- Swift templates now can throw errors. You can also throw just string literals.
- Added support for TypeName in string filters (except filters from StencilSwiftKit).
Bug fixes
- Fixed linker issue when using Swift templates
- Updated
AutoMockable
to exclude generated code collisions - Fixed parsing of default values for variables that also have a body (e.g. for
didSet
) - Fixed line number display when an error occur while parsing a Swift template
- Fixed
rsync
issue onSourceryRuntime.framework
when using Swift templates - Fixed
auto:inline
for nested types (this concerns the first time the code is inserted)
Internal changes
- Fix link for template in docs
- Fix running Sourcery in the example app
- Add step to update internal boilerplate code during the release
0.7.2
Internal changes
- Add Version.swift to represent CLI tool version
0.7.1
Bug fixes
- Fixed regression in parsing templates from config file
- Removed meaningless
isMutating
property forVariable
Internal changes
- Improvements in release script
- Updated boilerplate code to reflect latest changes
0.7.0
New Features
- Added
inout
flag forMethodParameter
- Added parsing
mutating
andfinal
attributes with convenienceisMutating
andisFinal
properties - Added support for
include
Stencil tag - Added support for excluded paths
Bug fixes
- Fixed inserting generated code inline automatically at wrong position
- Fixed regression in AutoEquatable & AutoHashable template with private computed variables
Internal changes
- Internal release procedure improvements
- Improved
TemplatesTests
scheme running - Fixed swiftlint warnings (version 0.19.0)
0.6.1
New Features
- Paths in config file are now relative to config file path by default, absolute paths should start with
/
- Improved logging and error reporting, added
--quiet
CLI option, added runtime errors for using invalid types inimplementing
andinheriting
- Added support for includes in EJS templates (for example:
<%- include('myTemplate.js') %>
) - Add the
lowerFirst
filter for Stencil templates. - Added
isRequired
property forMethod
- Improved parsing of closure types
- Check if Current Project Version match version in podspec in release task
- Improved swift templates performance
- Added
// sourcery:file
annotation for source code
Bug fixes
- Fixed detecting computed properties
- Fixed typo in
isConvenienceInitialiser
property - Fixed creating cache folder when cache is disabled
- Fixed parsing multiple enum cases annotations
- Fixed parsing inline annotations when there is an access level or attribute
- Fixed parsing
required
attribute - Fixed typo in
guides/Writing templates.md
Internal changes
- Improved
AutoMockable.stencil
to support protocols withinit
methods - Improved
AutoCases.stencil
to uselet
instead of computedvar
- Updated StencilSwiftKit to 1.0.2 which includes Stencil 0.9.0
- Adding docset to release archive
- Add tests for bundled stencil templates
- Moved to CocoaPods 1.2.1
- Made Array.parallelMap's block non-escaping
0.6.0
New Features
- Added support for inline code generation without requiring explicit
// sourcery:inline
comments in the source files. To use, usesourcery:inline:auto
in a template:// sourcery:inline:auto:MyType.TemplateName
- Added
isMutable
property forVariable
- Added support for scanning multiple targets
- Added access level filters and disabled filtering private declarations
- Added support for inline comments for annotations with
/*
and*/
- Added annotations for enum case associated values and method parameters
- Added
isConvenienceInitializer
property forMethod
- Added
defaultValue
for variables and method parameters - Added docs generated with jazzy
- Sourcery now will not create empty files and will remove existing generated files with empty content if CLI flag
prune
is set totrue
(false
by default) - Sourcery now will remove inline annotation comments from generated code.
- Added
rethrows
property toMethod
- Allow duplicated annotations to be agregated into array
- Added ejs-style tags to control whitespaces and new lines in swift templates
- Added CLI option to provide path to config file
Bug Fixes
- Inserting multiple inline code block in one file
- Suppress warnings when compiling swift templates
- Accessing protocols in Swift templates
- Crash that would happen sometimes when parsing typealiases
Internal changes
- Replaced
TypeReflectionBox
andGenerationContext
types with commonTemplateContext
.
0.5.9
New Features
- Added flag to check if
TypeName
is dictionary - Added support for multiple sources and templates paths, sources, templates and output paths now should be provided with
--sources
,--templates
and--output
options - Added support for YAML file configuration
- Added generation of non-swift files using
sourcery:file
annotation
Bug Fixes
- Fixed observing swift and js templates
- Fixed parsing generic array types
- Fixed using dictionary in annotations
0.5.8
New Features
- Added parsing array types
- Added support for JavaScript templates (using EJS)
Bug Fixes
- Fixed escaping variables with reserved names
- Fixed duplicated methods and variables in
allMethods
andallVariables
- Fixed trimming attributes in type names
0.5.7
Bug Fixes
- Cache initial file contents, including the inline generated ranges so that they are always up to date