# Changelog

All notable changes to this project 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).
## [0.0.1] – 2026-05-28

### Fixed
- **Dependency Conflicts:** Removed `expo-modules-core` from `peerDependencies` to prevent package manager conflicts and resolve `expo-doctor` catch-22 warnings in user projects.

### Added
- **Initial Release:** USB serial communication over OTG for Android Expo apps, wrapping the `usb-serial-for-android` library.
- **Expo Config Plugin:** Sets up the Android manifest feature/intent filters and automatically adds the JitPack repository.
- **Modern JSI Architecture (New Arch):** Upgraded native module bindings to leverage JSI directly, replacing the legacy async React Native bridge.
- **JSI Memory-Mapped Data:** Replaced Base64 string payload transfers with zero-copy, direct memory-mapped `Uint8Array` JSI pipes mapping directly to Kotlin `ByteArray`.
- **Expo SharedObjects:** Introduced the `UsbSerialConnection` class (extending Expo's `SharedObject`), encapsulating the port lifecycle and maintaining direct native instance pointers on the JS thread.
- **Synchronous Instance Methods:** Configured `write`, `disconnect`, `setDtr`, `setRts`, and `isConnected` as synchronous JSI-bound instance methods directly on `UsbSerialConnection`.
- **Dual-Pipe Write Options (Spec A):** Added both synchronous `write()` (direct JSI execution for low-latency bursts) and asynchronous `writeAsync()` (non-blocking thread pool execution to prevent JS thread/UI freezes).
- **GC Port Deallocator (Spec B):** Overrode the native JSI `sharedObjectReleased()` hook to automatically release hardware ports and terminate coroutines when connection JS references are garbage collected.
- **TypeScript & Testing:** Updated typing definitions and Jest mocks for SharedObjects and TypedArray data streams, backed by a comprehensive unit test suite.
- **JSI Instance Event Isolation:** Eliminated global event broadcasts. Transitioned `addDataListener` and `addErrorListener` to direct connection class instance methods (`connection.addDataListener(...)`), routing streaming reads and hardware errors isolated to their specific device references.

