zwave-js / node-zwave-js

Z-Wave driver written entirely in JavaScript/TypeScript
https://zwave-js.github.io/node-zwave-js/
MIT License
755 stars 613 forks source link

refactor: asynchronous serialization and parsing #7377

Closed AlCalzone closed 3 weeks ago

AlCalzone commented 3 weeks ago

With this PR, parsing and serializing CCs, as well as serializing messages is now done asynchronously. For this purpose, new async variants parseAsync, fromAsync, serializeAsync and mergePartialCCsAsync have been added. For backwards compatibility, the synchronous versions of .parse(), .from(), .serialize(), .mergePartialCCs() will be kept around until the next major release, after which the ...Async versions will take their place.

This change allows using asynchronous APIs while parsing and serializing, e.g. the portable WebCrypto API as a replacement for node:crypto.

AlCalzone commented 3 weeks ago

@zwave-js-bot automerge