Skip to content

refactor: import BLE binding contract types from incyclist-services - #474

Merged
gdoumen merged 3 commits into
mainfrom
feat/import-ble-types-from-services
Oct 14, 2026
Merged

gdoumen merged 3 commits into
mainfrom
feat/import-ble-types-from-services

Conversation

@gdoumen

@gdoumen gdoumen commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

src/bindings/ble/types.ts hand-copied the BLE binding contract from incyclist-devices, so a change there (the widened BleProperty) was invisible here until CI broke. The types that have an exact upstream equivalent are now imported (type-only) from incyclist-services.

What changed

  • Imported and re-exported from incyclist-services: BleInterfaceState, BleProperty, BleCharacteristic, BleRawCharacteristic, BleService, DiscoverResult (exact shape parity checked against devices).
  • Kept local on purpose, each with a comment saying why: BleBinding (devices' version also requires a _bindings member this binding does not have), BleRawPeripheral (identical except advertisement is typed here, any upstream), BleAdvertisement and BleServiceData (no upstream equivalent; devices only has a different BleRawAdvertisement).
  • Type-only change, no behaviour change.

Notes

Depends on incyclist/services#643 being merged and released; until incyclist-services is bumped here the type-check will fail on the missing exports.

Test plan

  • src/bindings/ble tests and the full jest suite pass
  • Whole-project tsc passes against a local build of the services branch
  • Re-run after bumping incyclist-services

BleInterfaceState, BleProperty, BleCharacteristic, BleRawCharacteristic, BleService and DiscoverResult were hand-copied from incyclist-devices and drifted silently when devices widened BleProperty. Import them (type-only) from incyclist-services instead. BleBinding, BleRawPeripheral, BleAdvertisement and BleServiceData stay local on purpose, with a comment saying why. Needs an incyclist-services release that re-exports these types.
@sonarqubecloud

Copy link
Copy Markdown

@gdoumen
gdoumen marked this pull request as ready for review October 14, 2026 16:09
@gdoumen
gdoumen merged commit d56ec07 into main Oct 14, 2026
3 checks passed
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