From 88bec575a5215399da59e7dc98e6d3b9369f2f0a Mon Sep 17 00:00:00 2001 From: David Jennes Date: Tue, 25 Sep 2018 03:01:14 +0200 Subject: [PATCH 1/4] Compile with Swift 4.2 if possible t t t --- Package.swift | 10 +++++----- Package@swift-4.2.swift | 23 +++++++++++++++++++++++ Stencil.podspec.json | 2 +- 3 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 Package@swift-4.2.swift diff --git a/Package.swift b/Package.swift index a0b49da..2dd6977 100644 --- a/Package.swift +++ b/Package.swift @@ -1,22 +1,22 @@ -// swift-tools-version:4.0 +// swift-tools-version:4.1 import PackageDescription let package = Package( name: "Stencil", products: [ - .library(name: "Stencil", targets: ["Stencil"]), + .library(name: "Stencil", targets: ["Stencil"]) ], dependencies: [ .package(url: "https://github.com/kylef/PathKit.git", from: "0.9.0"), - .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.0"), + .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.0") ], targets: [ .target(name: "Stencil", dependencies: [ - "PathKit", + "PathKit" ], path: "Sources"), .testTarget(name: "StencilTests", dependencies: [ "Stencil", - "Spectre", + "Spectre" ]) ] ) diff --git a/Package@swift-4.2.swift b/Package@swift-4.2.swift new file mode 100644 index 0000000..b8312ca --- /dev/null +++ b/Package@swift-4.2.swift @@ -0,0 +1,23 @@ +// swift-tools-version:4.2 +import PackageDescription + +let package = Package( + name: "Stencil", + products: [ + .library(name: "Stencil", targets: ["Stencil"]) + ], + dependencies: [ + .package(url: "https://github.com/kylef/PathKit.git", from: "0.9.0"), + .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.0") + ], + targets: [ + .target(name: "Stencil", dependencies: [ + "PathKit" + ], path: "Sources"), + .testTarget(name: "StencilTests", dependencies: [ + "Stencil", + "Spectre" + ]) + ], + swiftLanguageVersions: [.v4, .v4_2] +) diff --git a/Stencil.podspec.json b/Stencil.podspec.json index a0dde4c..d9d7c70 100644 --- a/Stencil.podspec.json +++ b/Stencil.podspec.json @@ -24,7 +24,7 @@ "tvos": "9.0" }, "cocoapods_version": "1.4.0", - "swift_version": "4.1", + "swift_version": "4.2", "requires_arc": true, "dependencies": { "PathKit": [ From 535a8061d91185ce99b76dae39ada60265639065 Mon Sep 17 00:00:00 2001 From: David Jennes Date: Tue, 25 Sep 2018 03:05:19 +0200 Subject: [PATCH 2/4] Match old Changelog section names t --- CHANGELOG.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9645027..cb0e1cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,7 @@ ## Master -### Bug Fixes - -- Now accessing undefined keys in NSObject does not cause runtime crash and instead renders empty string. - [Ilya Puchka](https://github.com/ilyapuchka) - [#234](https://github.com/stencilproject/Stencil/pull/234) -- `for` tag: When iterating over a dictionary the keys will now always be sorted (in an ascending order) to ensure consistent output generation. - [David Jennes](https://github.com/djbe) - [#240](https://github.com/stencilproject/Stencil/pull/240) - -### Breaking Changes +### Breaking - Now requires Swift 4.1 or newer. [Yonas Kolb](https://github.com/yonaskolb) @@ -23,7 +14,7 @@ [Ilya Puchka](https://github.com/ilyapuchka) [#160](https://github.com/stencilproject/Stencil/pull/160) -### New Features +### Enhancements - Now you can conditionally render variables with `{{ variable if condition }}`, which is a shorthand for `{% if condition %}{{ variable }}{% endif %}`. You can also use `else` like `{{ variable1 if condition else variable2 }}`, which is a shorthand for `{% if condition %}{{ variable1 }}{% else %}{{ variable2 }}{% endif %}` [Ilya Puchka](https://github.com/ilyapuchka) @@ -32,6 +23,18 @@ [Ilya Puchka](https://github.com/ilyapuchka) [#245](https://github.com/stencilproject/Stencil/pull/245) +### Bug Fixes + +- Fixed the performance issues introduced in Stencil 0.12 with the error log improvements. + [Ilya Puchka](https://github.com/ilyapuchka) + [#230](https://github.com/stencilproject/Stencil/pull/230) +- Now accessing undefined keys in NSObject does not cause runtime crash and instead renders empty string. + [Ilya Puchka](https://github.com/ilyapuchka) + [#234](https://github.com/stencilproject/Stencil/pull/234) +- `for` tag: When iterating over a dictionary the keys will now always be sorted (in an ascending order) to ensure consistent output generation. + [David Jennes](https://github.com/djbe) + [#240](https://github.com/stencilproject/Stencil/pull/240) + ### Internal Changes - Updated the codebase to use Swift 4 features. From 27608432367759b2614ecdb663579884c658409d Mon Sep 17 00:00:00 2001 From: David Jennes Date: Tue, 25 Sep 2018 03:17:44 +0200 Subject: [PATCH 3/4] Update some old refs --- LICENSE | 3 +-- docs/_templates/sidebar_intro.html | 2 +- docs/installation.rst | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/LICENSE b/LICENSE index a8c6d13..8aa8286 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014, Kyle Fuller +Copyright (c) 2018, Kyle Fuller All rights reserved. Redistribution and use in source and binary forms, with or without @@ -21,4 +21,3 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/docs/_templates/sidebar_intro.html b/docs/_templates/sidebar_intro.html index 6e5f6d2..d5bd29f 100644 --- a/docs/_templates/sidebar_intro.html +++ b/docs/_templates/sidebar_intro.html @@ -2,7 +2,7 @@

diff --git a/docs/installation.rst b/docs/installation.rst index bc3fad6..f3a58a5 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -14,7 +14,7 @@ dependencies inside ``Package.swift``. let package = Package( name: "MyApplication", dependencies: [ - .Package(url: "https://github.com/kylef/Stencil.git", majorVersion: 0, minor: 8), + .Package(url: "https://github.com/stencilproject/Stencil.git", majorVersion: 0, minor: 12), ] ) @@ -37,7 +37,7 @@ Carthage .. code-block:: text - github "kylef/Stencil" ~> 0.8.0 + github "stencilproject/Stencil" ~> 0.12.1 2) Checkout your dependencies, generate the Stencil Xcode project, and then use Carthage to build Stencil: From 42e415a9bf26e897ddcd0350b42dbddfe0d2d3fd Mon Sep 17 00:00:00 2001 From: David Jennes Date: Tue, 25 Sep 2018 03:18:14 +0200 Subject: [PATCH 4/4] Version 0.13.0 --- CHANGELOG.md | 2 +- Stencil.podspec.json | 4 ++-- docs/conf.py | 4 ++-- docs/installation.rst | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0e1cc..ff5407f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Stencil Changelog -## Master +## 0.13.0 ### Breaking diff --git a/Stencil.podspec.json b/Stencil.podspec.json index d9d7c70..54ecd20 100644 --- a/Stencil.podspec.json +++ b/Stencil.podspec.json @@ -1,6 +1,6 @@ { "name": "Stencil", - "version": "0.12.1", + "version": "0.13.0", "summary": "Stencil is a simple and powerful template language for Swift.", "homepage": "https://stencil.fuller.li", "license": { @@ -13,7 +13,7 @@ "social_media_url": "https://twitter.com/kylefuller", "source": { "git": "https://github.com/stencilproject/Stencil.git", - "tag": "0.12.1" + "tag": "0.13.0" }, "source_files": [ "Sources/*.swift" diff --git a/docs/conf.py b/docs/conf.py index 4d69c8d..bf3e798 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,9 +58,9 @@ author = 'Kyle Fuller' # built documents. # # The short X.Y version. -version = '0.12.1' +version = '0.13.0' # The full version, including alpha/beta/rc tags. -release = '0.12.1' +release = '0.13.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/installation.rst b/docs/installation.rst index f3a58a5..1457752 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -14,7 +14,7 @@ dependencies inside ``Package.swift``. let package = Package( name: "MyApplication", dependencies: [ - .Package(url: "https://github.com/stencilproject/Stencil.git", majorVersion: 0, minor: 12), + .Package(url: "https://github.com/stencilproject/Stencil.git", majorVersion: 0, minor: 13), ] ) @@ -26,7 +26,7 @@ If you're using CocoaPods, you can add Stencil to your ``Podfile`` and then run .. code-block:: ruby - pod 'Stencil', '~> 0.8.0' + pod 'Stencil', '~> 0.13.0' Carthage -------- @@ -37,7 +37,7 @@ Carthage .. code-block:: text - github "stencilproject/Stencil" ~> 0.12.1 + github "stencilproject/Stencil" ~> 0.13.0 2) Checkout your dependencies, generate the Stencil Xcode project, and then use Carthage to build Stencil: