diff --git a/CHANGELOG.md b/CHANGELOG.md index c37110e..d0a68e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,61 @@ All notable changes to Flow will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.0] - 2025-10-27 + +### Features + +#### Task Naming Support + +- **Added task naming for `.run` effects**: Leverages Swift 6.2's SE-0469 task naming capability + - New optional `name` parameter in `.run(name:operation:)` for improved debugging and profiling + - Task names appear in Xcode debugger, Instruments, and swift-inspect + - Fully backward compatible—existing code works unchanged + - Names are preserved through all configuration methods (`.catch`, `.cancellable`, `.priority`) + + ```swift + // Named task for better debugging + return .run(name: "🔄 Fetch user profile") { state in + let profile = try await api.fetchProfile() + state.profile = profile + } + + // Dynamic naming with context + return .run(name: "Load user \(userId)") { state in + let user = try await api.fetchUser(userId) + state.user = user + } + ``` + +**Benefits:** +- Tasks are easily identifiable in development tools +- Better observability during debugging and profiling +- Human-readable task names in thread lists and performance traces + +**Requirements:** +- Swift 6.2+ (for Task naming API support) + +### Documentation + +- **Improved README.md**: Enhanced "Result-Returning Actions" section with clearer explanations + - Explicitly mentions that `ActionResult` type can be freely defined per Feature + - Provides better context for code examples + - Clarifies how ChildFeature, ParentView, and callbacks work together + - Emphasizes dependency tracking within the view tree + +### Tests + +- Added 6 comprehensive tests for task naming feature: + - Basic task naming functionality + - Backward compatibility verification (name = nil) + - Name preservation through `.catch`, `.cancellable`, `.priority` + - Name preservation through complete configuration chaining +- All 299 tests pass (293 existing + 6 new) + +### Internal + +- Fixed SwiftLint `function_parameter_count` violation in `Store.executeRunTask` + ## [1.0.1] - 2025-10-27 ### Documentation diff --git a/README.md b/README.md index afcd5e4..a8f6084 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ Add Flow to your `Package.swift`: ```swift dependencies: [ - .package(url: "https://github.com/ViewFeature/Flow.git", from: "1.0.0") + .package(url: "https://github.com/ViewFeature/Flow.git", from: "1.1.0") ], targets: [ .target( @@ -276,7 +276,7 @@ targets: [ - Select **File → Add Package Dependencies** - Enter the URL: `https://github.com/ViewFeature/Flow.git` -- Select version: `1.0.0` or later +- Select version: `1.1.0` or later **Recommended**: Add `-default-isolation MainActor` to your target's **Build Settings → Other Swift Flags**. diff --git a/README_jp.md b/README_jp.md index d82b05e..ef17fb7 100644 --- a/README_jp.md +++ b/README_jp.md @@ -256,7 +256,7 @@ func handle() -> ActionHandler { ```swift dependencies: [ - .package(url: "https://github.com/ViewFeature/Flow.git", from: "1.0.0") + .package(url: "https://github.com/ViewFeature/Flow.git", from: "1.1.0") ], targets: [ .target( @@ -275,7 +275,7 @@ targets: [ - **File → Add Package Dependencies**を選択 - 以下のURLを入力:`https://github.com/ViewFeature/Flow.git` -- バージョンを選択:`1.0.0`以降 +- バージョンを選択:`1.1.0`以降 **推奨**: ターゲットの**Build Settings → Other Swift Flags**に`-default-isolation MainActor`を追加してください。