Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: coenttb/swift-builders

Tags

0.1.0

Toggle 0.1.0's commit message
Release 0.1.0: DictionaryBuilder and ArrayBuilder Modernization

- **DictionaryBuilder**: Complete result builder for type-safe dictionary construction
  - Support for tuple syntax: ("key", "value")
  - KeyValuePair helper type for better readability
  - Dictionary merging and conditional construction
  - Full control flow support (if/else, loops, optionals)
  - "Last writer wins" key conflict resolution

- **ArrayBuilder Modernization**: Updated to use modern buildPartialBlock methods
  - Hybrid approach combining buildPartialBlock efficiency with buildExpression type safety
  - Better performance and consistency with other builders
  - Full backward compatibility maintained

- Comprehensive README updates with DictionaryBuilder examples
- Real-world Dynamic Configuration System example
- Updated architecture documentation
- Production-ready usage patterns

- 112 comprehensive tests covering all builders
- Full test coverage for DictionaryBuilder functionality
- All existing functionality verified and preserved

Complete result builder ecosystem:
- ArrayBuilder (modernized)
- DictionaryBuilder (new)
- SetBuilder
- StringBuilder
- MarkdownBuilder

This release significantly expands the swift-builders capabilities while maintaining full backward compatibility and improving overall architecture consistency.

0.0.1

Toggle 0.0.1's commit message
Initial release: Swift Result Builders for collections and strings

Implements comprehensive result builders for Swift including:
- ArrayBuilder: Type-safe array construction with control flow support
- SetBuilder: Set construction with duplicate handling and array support
- StringBuilder: String building with newline joining
- MarkdownBuilder: Markdown document construction with formatting options

Features:
- Full result builder protocol support (conditionals, loops, optionals)
- Performance optimized implementations
- Comprehensive test coverage
- Swift Package Manager integration with individual library products
- Clean API with proper disambiguation
- Minimal dependencies (no Foundation imports)

Package provides both unified "Builders" library and individual component libraries for selective importing.

This provides a foundation for declarative collection and string building in Swift applications.