hildjj / node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.
MIT License
362 stars 74 forks source link

Improved performance after fix for Nodejs 10 Buffer deprecations #75

Closed BurtHarris closed 6 years ago

BurtHarris commented 6 years ago

The deprecation fixes can be optimized by using Buffer.allocUnsafe() instead of Buffer.alloc().

Updates package.json required Node.js version to 5.10.0 (as that's needed for Buffer.alloc() etc.

Also adds a minor test case I used to convince myself that #74 wasn't really a problem.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 99.803% when pulling e76c779e023fb0c92cd8e7f187be0cce3b0a3a3f on BurtHarris:fix74 into 968e25d12590c810757c51a0f99b72b8588ea6ce on hildjj:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 99.803% when pulling e76c779e023fb0c92cd8e7f187be0cce3b0a3a3f on BurtHarris:fix74 into 968e25d12590c810757c51a0f99b72b8588ea6ce on hildjj:master.

hildjj commented 6 years ago

I'll take this PR after Node v10 has made it a hair further through the ecosystem and I turn off v4 support. A couple of weeks at most.

BurtHarris commented 6 years ago

Cool, thanks.

hildjj commented 6 years ago

Trying the "rebase and merge" feature; this needs to be behind 3e6371e.

hildjj commented 6 years ago

@BurtHarris I just realized you're not on the contributors list. Can you send me another PR adding yourself to package.json please?