Skip to content

feat: add observation extension #178

Merged
piercifani merged 5 commits intodevelopfrom
stream-until
Feb 14, 2026
Merged

feat: add observation extension #178
piercifani merged 5 commits intodevelopfrom
stream-until

Conversation

@piercifani
Copy link
Contributor

Introduce Observation+Ext.swift to extend Observable objects with a stream method for keyPath-driven value observation using AsyncStream. This feature enables observing changes in observable objects more
conveniently, particularly in asynchronous contexts.

Additionally, AsyncStream is extended to include an until method, allowing iteration to continue until a specified value is encountered, improving testing capabilities.

With these changes, new unit tests are created in ObservationTests.swift to ensure that the observable streams function correctly.

Also, update Package.swift to support macOS version 14, ensuring broader adoption and compatibility with recent macOS features.

Introduce `Observation+Ext.swift` to extend `Observable` objects with a
`stream` method for keyPath-driven value observation using `AsyncStream`.
This feature enables observing changes in observable objects more
conveniently, particularly in asynchronous contexts.

Additionally, `AsyncStream` is extended to include an `until` method,
allowing iteration to continue until a specified value is encountered,
improving testing capabilities.

With these changes, new unit tests are created in `ObservationTests.swift` to
ensure that the observable streams function correctly.

Also, update `Package.swift` to support macOS version 14, ensuring broader
adoption and compatibility with recent macOS features.
@piercifani piercifani merged commit 6e9510f into develop Feb 14, 2026
3 checks passed
@piercifani piercifani deleted the stream-until branch February 14, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant