Electron v10.1.3

feat

Electron v10.1.3 is now supported.

New Codecs API

refactorBREAKING

The codecs API has been refactored.

The old API received the entire message and a callback to push any amount of messages up the pipeline.

  1. export type LEDSettings = {
  2. glowTime: number
  3. enable: number
  4. }
  5. export class LEDCodec extends Codec {
  6. filter(message: Message): boolean
  7. encode(
  8. message: Message<LEDSettings>,
  9. push: PushCallback<Message<Buffer>>) {
  10. }: void
  11. decode(
  12. message: Message<Buffer>,
  13. push: PushCallback<Message<LEDSettings | null>>,
  14. ): void
  15. }

The new API reduces the functionality to only transform a payload to and from a Buffer.

The Pipelines API still has the capability to have the forking behaviour that was available here if need be, but this vastly simplifies the usual use case.

  1. export type LEDSettings = {
  2. glowTime: number
  3. enable: number
  4. }
  5. export class LEDCodec extends Codec {
  6. filter(message: Message): boolean
  7. encode(payload: LEDSettings): Buffer
  8. encode(payload: Buffer): LEDSettings
  9. }

Line Chart Thickness

feat

Line charts now support lines thicker than 1px.

Device Manager Proxy refactor

refactorBREAKING

The device manager proxy has had some of it's methods refactored to match the signature of the real device manager.

Cancellation Tokens

featBREAKING

Instead of timeouts, CancellationTokens are now used across the entire ElectricUI API surface.

They allow for hard deadlines for tasks, as well as user based cancellation at any point in the lifecycle.

  1. const cancellationToken = new CancellationToken()
  2. cancellationToken.deadline(10_000)
  3. setTimeout(() => cancellationToken.cancel(), 5_000)