Release Notes
Release Version 1.0.4 on 2026-08-16
👀 Overview
Version 1.0.4 brings improvements such like type safety for Collection and String handling, enhanced test coverage, and strengthened CI/CD infrastructure with code coverage reporting.
➕ Installation
dependencies: [
.package(url: "https://github.com/gchriswill/OrSwift.git", from: "1.0.4")
]✨ Features & Improvements
Type System Enhancements
- Refined Collection Support: The
.orEmptycomputed property for collections now requires conformance toExpressibleByArrayLiteral, providing better type safety and cleaner semantics for common collection types. - Improved String Handling: The
.orEmptyproperty for optional strings now requires types to conform to bothStringProtocolandRangeReplaceableCollection, ensuring broader compatibility with string-like types includingStringandSubstring. - Better Documentation: Updated constraints documentation to clearly specify supported types and their requirements.
Substring Support
- Enhanced support for handling optional
Substringvalues with proper type constraints and error handling. - Tests updated to verify proper behavior with substring-based scenarios.
Code Quality & Documentation
- Refined documentation comments for Optional extensions with improved clarity on supported types and constraints.
- Updated section markers in code organization (e.g.,
// MARK: - Adoption) for better code navigation. - Improved
Orclass documentation emphasizing its role as a static namespace. - Corrected and consolidated examples in documentation blocks.
Testing
- Expanded Test Coverage: Added comprehensive tests for custom collection types conforming to
ExpressibleByArrayLiteral. - Test Improvements:
- Replaced generic
XCTAssertTrueassertions with more specificXCTAssertEqualfor precise behavior verification. - Updated assertions to use
XCTAssertFalsewhere applicable for better clarity. - Enhanced tests to ensure maximum coverage and proper type handling.
- Replaced generic
- CI Test Execution: Tests now run in parallel mode for faster feedback during CI/CD.
CI/CD & Code Coverage
- Codecov Integration: Integrated code coverage reporting with Codecov for continuous monitoring of test coverage metrics.
- Workflow Improvements:
- Enhanced xctest bundle detection logic for more reliable CI execution on different Swift versions.
- Implemented proper CI workflow permissions following least-privilege principles.
- Added dynamic xctest binary discovery for cross-platform compatibility.
- Coverage Markers: Refined LCOV coverage exclusion annotations for better accuracy of coverage reports.
🐛 Bug Fixes
- Fixed tests related to optional
Substringerror handling. - Corrected Or class instantiation test coverage (promoted internal test coverage).
- Resolved xctest bundle discovery issues in CI workflows.
📚 Documentation Updates
- Updated README.md with refined Supported Types section reflecting new constraints.
- Clarified that
Dictionarysupport is now available through the dedicatedExpressibleByDictionaryLiteralextension pattern. - Improved API documentation with better example usage and supported type lists.
🔄 Refactoring
- Simplified
.orEmptyimplementation for collections usingExpressibleByArrayLiteralprotocol. - Modernized initialization documentation for the
Ornamespace class. - Removed redundant code paths while maintaining full backward compatibility.
⚠️ Breaking Changes
None - This is a fully backward-compatible release.
📦 Dependencies
No changes to dependencies. The package remains dependency-free.
🧪 Test Coverage
- Total test suite expanded with 80+ test cases covering:
- All basic type defaults (
.orEmpty,.orZero,.orTrue,.orFalse) - Collection types with
ExpressibleByArrayLiteral - String and
Substringhandling - Custom type fallback via
.or(_:)andOr.this(optional:default:) - Edge cases and type-specific behaviors
- All basic type defaults (
🎯 Known Limitations
- The
.orEmptyproperty for collections is optimized for types conforming toExpressibleByArrayLiteral. Custom collection types outside this pattern may require using.or(_:)for explicit default values. StringProtocolimplementations that don't conform toRangeReplaceableCollectionshould use.or(_:)for custom fallback handling.
🙏 Contributors
Special thanks to all contributors and the Copilot Autofix powered by AI for code quality improvements and testing enhancements.
Special thanks to @gchriswill for all his great contributions since the very begining.
Previous Releases
1.0.3
Initial public release with core features:
.orEmptyfor String and Collection types.orZerofor Numeric types.orTrueand.orFalsefor Boolean types.or(_:)generic fallback methodOr.this(optional:default:)static helper
IMPORTANT NOTES 📢📢📢
As of August 5th, 2026, @gchriswill’s development contributions to this repository will be limited due to new employment. You can view his full commit history here: https://github.com/gchriswill/OrSwift/commits/main/?author=gchriswill. His last recorded contribution was made on July 25th, 2026.
Or in Swift project will continue to grow and be maintained by the open‑source community. While @gchriswill will remain involved as a limited administrator, his reduced development activity will not impact future development or maintenance cycles.
We wish @gchriswill the very best and look forward to seeing the great things he will accomplish at 🍎.
Full Changelog: 1.0.3...1.0.4