Skip to content

Latest commit

 

History

History
419 lines (315 loc) · 16.7 KB

CHANGELOG.md

File metadata and controls

419 lines (315 loc) · 16.7 KB

StencilSwiftKit CHANGELOG


Stable Branch

Breaking Changes

None

New Features

None

Bug Fixes

None

Internal Changes

None

2.10.1

Internal Changes

  • Pin Komondor to 1.1.3, to avoid issues with SPM for other packages depending on this package.
    redryerye #162

2.10.0

Breaking Changes

  • With the Stencil update, we're deprecating our StencilSwiftTemplate template class which contained a workaround that's no longer needed. It will also no longer be set by default by the stencilSwiftEnvironment builder.
    David Jennes #159
  • With the Stencil update, we're deprecating our removeNewlines filter, as this can now be achieved by the built-in Stencil syntax.
    David Jennes #159

New Features

  • Updated to Stencil 0.15.0, which contains many improvements, chief amongst them is whitespace behaviour control.
    David Jennes #159
  • Added an import tag for reusing macro's in multiple templates from a common imported file.
    David Jennes #111
  • The swiftIdentifier now supports a valid mode, where it will do the bare minimum to get a valid identifier. I.e. it will not change the case of characters at all (compared to normal mode).
    David Jennes #160

Internal Changes

2.9.0

New Features

Internal Changes

2.8.0

New Features

Bug Fixes

  • Fix crash with the lowerFirstWord filter when running on empty strings.
    @fortmarek #127

Internal Changes

2.7.2

Bug Fixes

  • Parameters: ensure the flatten function correctly handles a flag with a false value.
    David Jennes #108

Internal Changes

2.7.1

Bug Fixes

2.7.0

New Features

Internal Changes

  • Improved the documentation of string filters a bit for a better overview of the inputs & outputs.
    David Jennes #102
  • Updated to latest Xcode (10.0).
    David Jennes #103

2.6.0

New Features

  • The set tag can now directly accept an expression as value, see the documentation for an explanation on how this differs with the normal set/endset pair.
    David Jennes #87
  • Updated Stencil to the latest version (0.12.1).
    David Jennes #95 #99

Bug fixes

Internal Changes

2.5.0

New Features

Internal Changes

2.4.0

New Features

2.3.0

New Features

  • Added Parameters.flatten(dictionary:) method to do the opposite of Parameters.parse(items:) and turn a dictionary into the list of parameters to pass from the command line.
    Olivier Halligon #70

Bug Fixes

2.2.0

New Features

  • Accept LosslessStringConvertible input for strings filters.
    Antondomashnev #65
  • StencilContext.enrich now also accept a Dictionary for specifying parameters (in preparation for supporting Config files in SwiftGen).
    Olivier Halligon #66

Internal Changes

2.1.0

New Features

  • Added the basename and dirname string filters for getting a filename, or parent folder (respectively), out of a path.
    David Jennes #60
  • Modify the swiftIdentifier string filter to accept an optional "pretty" mode, to also apply the snakeToCamelCase filter and other manipulations if needed for a "prettier" but still valid identifier.
    David Jennes #61

Internal Changes

2.0.1

2.0.0

Due to the removal of legacy code, there are a few breaking changes in this new version that affect both template writers as well as developers. We've provided a migration guide to help you through these changes, which you can find here: Migration Guide for 2.0

Breaking Changes

  • The ParametersError enum has been replaced by the Parameters.Error nested type.
    Olivier Halligon #37
  • The FilterError enum has been replaced by the Filters.Error nested type.
    Olivier Halligon #37
  • The filters in StringFilters and NumFilters are now located under Filters.Strings and Filters.Numbers.
    Olivier Halligon #40
  • Removed the join filter, as it's now integrated in Stencil proper.
    David Jennes #10
  • Refactored the snakeToCamelCase filter to now accept an (optional) boolean parameter to control the noPrefix behaviour.
    David Jennes #41
  • Rename the stringToSwiftIdentifier function to swiftIdentifier to better match the other method names.
    David Jennes #46

New Features

  • Added the contains, replace, hasPrefix, hasSuffix, lowerFirstLetter filters for strings.
    Antondomashnev #54
  • Added the removeNewlines filter to remove newlines (and spaces) from a string.
    David Jennes #47 #48

Bug Fixes

  • Fix snakeToCamelCase parameters information in README.
    Liquidsoul #45

1.0.2

New Features

Bug Fixes

  • The context enrich function won't overwrite existing values in the env and param variables.
    David Jennes #29

Internal Changes

Deprecations

  • The ParametersError enum has been replaced by the Parameters.Error nested type. ParametersError still works (it is now typealias) but will be removed in the next major release.
    Olivier Halligon
  • The FilterError enum has been replaced by the Filters.Error nested type. FilterError still works (it is now typealias) but will be removed in the next major release.
    Olivier Halligon

1.0.1

Internal Changes

1.0.0

New Features

  • Added support for Swift Package Manager.
    Krzysztof Zabłocki #15
  • Added MapNode to apply a map operator to an array. You can now use {% map someArray into result using item %} to do the equivalent of the result = someArray.map { item in … } Swift code.
    David Jennes #11
  • Add a "parameters parser" able to transform parameters passed as a set of strings (a=1 b.x=2 b.y=3 c=4 c=5) — typically provided as the command line arguments of a CLI — into a Dictionary suitable for Stencil contexts.
    David Jennes #8
  • Add a StencilContext.enrich function to enrich Stencil contexts with param and env dictionaries.
    The param dictionary typically contains parameters parsed via the parameters parser above.
    The env dictionary contains all the environment variables. You can thus access them in your templates using env.USER, env.LANG, env.PRODUCT_MODULE_NAME, etc.
    #19

Internal Changes

  • Renamed SwiftTemplate to StencilSwiftTemplate.
    David Jennes #14
  • Refactor stencil swift extensions registration for easier use with an existing Extension.
    David Jennes #16
  • Refactor stencil node tests to not use templates and output files.
    David Jennes #17

Pre-1.0.0

See SwitftGen's own CHANGELOG pre SwiftGen 4.2 version, before the refactoring that led us to split the code in frameworks