Skip to content

spectrum-ts v12.1.0

Choose a tag to compare

@photon-action-bot photon-action-bot released this 19 Jul 22:34

Breaking Changes

  • Platform IDs now use lowercase snake_case everywhere. Update checks like "iMessage", "Slack", "Terminal", and "WhatsApp Business" to "imessage", "slack", "terminal", and "whatsapp_business".
  • Custom definePlatform() IDs must also be lowercase snake_case, like "my_platform". IDs with uppercase letters, spaces, hyphens, leading/trailing underscores, or double underscores now throw.
  • @spectrum-ts/imessage-local now exports localIMessage instead of imessage, with platform ID "local_imessage".

New Features

  • Cloud iMessage and local iMessage can now be registered in the same Spectrum() app. Use message.platform to distinguish "imessage" from "local_imessage".

Bug Fixes

  • Spectrum() now rejects duplicate providers for the same platform before initialization, so ambiguous provider setups fail early with a clear error.
  • Cloud token renewal is now shared and coalesced across providers, avoiding overlapping refreshes and making retry behavior more consistent.

Improvement

  • Provider lookup and docs now consistently use canonical platform IDs, while helper lookup still accepts legacy spellings where it can. ✨

Version: 12.1.0