Releases: davdroman/swiftui-text-builder
Releases · davdroman/swiftui-text-builder
4.0.0
Migration Guide
@TextBuilder
has been re-implemented from a result builder to a Swift macro.
Additionally, the repo has been renamed from davdroman/TextBuilder
to davdroman/swiftui-text-builder
. Both forms continue to work in SPM due to GitHub's URL redirection, but I strongly recommend you switch to the new form going forward.
-
Update macro usage:
// Old @TextBuilder var text: Text { ... } // New @TextBuilder func text() -> Text { ... }
-
Replace specialized macros:
// Old @TextBuilderWithSpaces func text() -> Text { ... } // New @TextBuilder(separator: " ") func text() -> Text { ... }
-
Update custom separators:
// Old struct MySeparator: TextBuilderSeparator { static var separator: String? { " | " } } @TextBuilderWith<MySeparator> // New @TextBuilder(separator: " | ")
-
Minimum requirements: Swift 6.0+
What's Changed
- Re-implement
@TextBuilder
as macro by @davdroman in #32 - Rename package to
swiftui-text-builder
by @davdroman in #36 - Bump to Swift 6.0 by @davdroman in #28
- Adopt Swift Testing by @davdroman in #31
- Update dependencies by @davdroman in #27
- Switch to tabs for indentation by @davdroman in #26
- Remove old compiler version check by @davdroman in #29
- Fix warnings by @davdroman in #30
- Add .spi.yml [skip ci] by @davdroman in #34
- Remove benchmarks by @davdroman in #33
- Rewrite README for 4.0.0 release by @davdroman in #35
Full Changelog: 3.0.1...4.0.0
3.0.1
What's Changed
- Update dependencies by @davdroman in #25
- [CI] Bump actions/checkout to v4 by @davdroman in #24
Full Changelog: 3.0.0...3.0.1
3.0.0
What's Changed
- Update dependencies and minimum Swift version to 5.7 by @davdroman in #23
- [CI] Use Xcode 14.3 & Swift 5.8 by @davdroman in #22
Full Changelog: 2.2.0...3.0.0
2.2.0
2.1.1
2.1.0
2.0.0
What's Changed
- #10 Builders now leverage
buildPartialBlock
on Swift 5.7 onward, which improves performance by up to 2x. - #14 API symbols have been revamped and streamlined. Namely:
TextBuilder
→TextBuilderWith
BasicTextBuilder
→TextBuilder
SpacedTextBuilder
→TextBuilderWithSpaces
MultilineTextBuilder
→TextBuilderWithNewlines
- #8 The library now uses
swift-builders
as its foundation (along with testing utils).
Full Changelog: 1.4.0...2.0.0