Skip to content

Releases: no-problem-dev/swift-statable

2.0.1

Choose a tag to compare

@github-actions github-actions released this 11 Aug 09:17

None

2.0.0

Choose a tag to compare

@github-actions github-actions released this 08 Aug 03:29

Full Changelog: 1.1.0...2.0.0

1.1.0

Choose a tag to compare

@github-actions github-actions released this 19 Jul 09:10

Full Changelog: v1.0.2...1.1.0

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 02 Jan 07:16
fbd75ce

🎉 v1.0.2 リリース

swift-statable v1.0.2 がリリースされました。

📝 変更内容

変更

  • Swift 6.2 対応: Swift 6.2 安定版に対応
    • swift-tools-version: 6.0 → 6.2
    • swift-syntax: 600.0.0 → 602.0.0
    • 依存関係指定を .upToNextMajor に統一

📦 インストール

dependencies: [
    .package(url: "https://github.com/no-problem-dev/swift-statable.git", .upToNextMajor(from: "1.0.2"))
]

🔗 リンク

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 31 Dec 23:01
fc8c7f5

🎉 v1.0.1 リリース

swift-statable v1.0.1 がリリースされました。

📝 変更内容

変更

  • @Statable マクロ: public init() の自動生成を削除
    • @Observable マクロとの相互作用問題を回避するため
    • ユーザーが明示的に public init() {} を定義する必要あり
    • 依存性注入などカスタム初期化が可能に

📦 インストール

dependencies: [
    .package(url: "https://github.com/no-problem-dev/swift-statable.git", .upToNextMajor(from: "1.0.1"))
]

🔗 リンク

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 31 Dec 22:22
c7e361b

🎉 v1.0.0 リリース

swift-statable v1.0.0 がリリースされました。

📝 変更内容

追加

  • @Statable マクロ: 宣言的な状態管理マクロ

    • 単一の非同期値を管理するストアクラスを定義
    • @MainActor @Observable との統合
    • オプションの operations パラメータで操作トラッキングを追加
  • AsyncState: 排他的な非同期状態表現

    • .idle: 初期状態
    • .loading(previous:): ロード中(前回の値を保持可能)
    • .loaded(Value): ロード成功
    • .failed(StateError): ロード失敗
  • AsyncValue: @observable準拠の非同期値ラッパー

    • value, state, isLoading, hasValue, error などのプロパティ
    • set(_:), setError(_:), startLoading(), reset() などの状態遷移メソッド
    • load(_:), loadIfNeeded(_:), reload(_:) などの便利メソッド
  • OperationTracker: 複数操作の並行追跡

    • start(_:), complete(_:), fail(_:with:) で操作ライフサイクル管理
    • isActive(_:), hasActiveOperations, error(for:) で状態確認
    • run(_:task:) で自動的な操作追跡
  • StateError: 構造化されたエラー情報

    • code, message, underlying プロパティ
    • init(from: Error) で標準Errorから変換

ドキュメント

  • README.md(日本語・英語)
  • RELEASE_PROCESS.md

📦 インストール

dependencies: [
    .package(url: "https://github.com/no-problem-dev/swift-statable.git", .upToNextMajor(from: "1.0.0"))
]

🔗 リンク