🍃 An expressive, performant, and extensible templating language built for Swift.
Bump Package.swift by @gwynne in #230
This package should have gotten a release after the previous update to its
Package.swift
, but it was overlooked. This one further updates the versions and should resolve version issues with the Leaf provider.
Full Changelog: https://github.com/vapor/leaf/compare/4.2.4...4.3.0
Swift Algorithms was used in Leaf but never explicitly declared as a dependency on the target. That resulted in compiler errors in some scenarios. The dependency is now correctly declared.
This PR addresses issue https://github.com/vapor/leaf/issues/215 and server as an alternative of PR https://github.com/vapor/leaf/pull/216, that somehow got stuck in it's efforts of being merged in.
I've done 2 things to discover the issue and confirm the fix
Adds Swift Algorithms as an explicit dependency as we depend on it
Types which use superEncoder(forKey:)
in their Codable
conformance (such as Fluent models) can now safely be provided to Leaf views as context objects. In general, handling of context encoding is significantly improved.
LeafError
now conforms to AbortError
and DebuggableError
for improved error UI/UX.
This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version as announced
This change allows Leaf to be used within iOS environments. Without it we get the following error:
The package product 'Vapor' requires minimum platform version 13.0 for the iOS platform, but this target supports 9.0
UnkeyedContainer throw fatal error in case of encoding collection with one or more nil values. This change removes force unwrap of the input data and skip any nil value in a collection.
Resolves #197
Exports the new UnsafeUnescapedLeafTag
so it's easy to use for anyone importing Leaf
This removes the log message that states that the application is starting the Leaf Renderer with caching enabled. Because the userInfo
is unique per request we can't cache the renderer
so it needs to be created for each request (which is fine as everything else is stored in the request's storage). However this means that we get the log for each request.
Additionally the log might not be true if the application is configured to disable caching. Resolves #192