Skip to content

Releases: vapor/leaf

Added userInfo context, config, test

25 Mar 16:19
409ad1c
Compare
Choose a tag to compare
Pre-release
This patch was authored by @tib and released by @tanner0101.
  • Added the ability to config userInfo on app.leaf.
  • The userInfo dictionary is now accessible for custom leaf tags
  • See testContextUserInfo for more info

Tags config, files protocol, and context passing

06 Mar 00:58
c3941cf
Compare
Choose a tag to compare
This patch was authored and released by @tanner0101.

Adds new Leaf configuration options, including custom tags, to application.

app.leaf.tags["foo"] = FooTag()
app.leaf.files = TestFiles()
app.leaf.configuration.rootDirectory = "/"

Adds support for passing Request and Application to LeafKit's userInfo storage.

struct FooTag: LeafTag {
    func render(_ context: LeafContext) throws -> LeafData {
        context.request // Request?
        context.application // Application?
        ...
    }
}

These will be set automatically when using app.view or req.view.

Release Candidate 1

02 Mar 16:58
45791d3
Compare
Choose a tag to compare
Release Candidate 1 Pre-release
Pre-release

Updates to Swift 5.2.

Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.

Make app.leaf.cache settable

27 Feb 17:10
65ab718
Compare
Choose a tag to compare
Pre-release

LeafCache is now settable (#155, fixes #154).

app.leaf.cache.isEnabled = false

This patch was authored and released by @tanner0101.

Allow Optional values when encoding

27 Feb 10:49
8df2c56
Compare
Choose a tag to compare
Pre-release

Removes force unwrapping in the LeafEncoder allowing for types to be Optional.

This patch was authored by @namolnad and released by @loganwright.

Beta 3 Update

26 Feb 23:33
537a44c
Compare
Choose a tag to compare
Beta 3 Update Pre-release
Pre-release
This patch was authored and released by @gwynne.
  • Update to match new Vapor requirements for OS
  • Require current Vapor beta version
  • Leaf's major beta version has been bumped due to the new OS requirement (a breaking change), even though there are no changes to Leaf itself

Leaf 4.0.0 Beta 2

09 Dec 20:38
7f7f19a
Compare
Choose a tag to compare
Leaf 4.0.0 Beta 2 Pre-release
Pre-release
  • Updated to latest LeafKit and Vapor beta 2 releases (#149)

Configuration changes:

import Leaf
import Vapor

// beta.1
app.use(LeafProvider())

// beta.2
app.views.use(.leaf)

Rendering changes:

// beta.2
app.get("test-file") { req in
    req.view.render(#file, ["foo": "bar"])
}

Leaf 4.0.0 Beta 1

15 Nov 20:06
11ab61c
Compare
Choose a tag to compare
Leaf 4.0.0 Beta 1 Pre-release
Pre-release
Merge pull request #144 from vapor/tn-beta-1

beta 1

Leaf 4.0.0 Alpha 1.2

10 Oct 17:04
546b770
Compare
Choose a tag to compare
Leaf 4.0.0 Alpha 1.2 Pre-release
Pre-release
  • Fixed an issue with NIOThreadPool service being unavailable (#141)

Leaf 4.0.0 Alpha 1.1

22 Aug 20:11
Compare
Choose a tag to compare
Leaf 4.0.0 Alpha 1.1 Pre-release
Pre-release

Fixed:

  • Use tagged LeafKit version.