Skip to content

v8.0.0

Compare
Choose a tag to compare
@JordanMartinez JordanMartinez released this 19 Jul 18:36
· 5 commits to master since this release
1e15a3f

Breaking changes:

  • Update node-buffer to v9.0.0 (#48 by @JordanMartinez)

  • Reimplement event handlers using eventNameH-style API (#49 by @JordanMartinez)

    Previously, one would write something like the following, and be unable to remove
    the resulting listener.

    Stream.onData stream \buffer -> do
      ...

    Now, one writes such a thing via on (or a similar function) from node-event-emitter:

    -- if the listener should be removed later, use `on`.
    removeListener <- stream # on dataH \buffer -> do
      ...
    -- if it doesn't need to be removed, use `on_`.
    stream # on_ dataH \buffer -> do
      ...
  • Renamed functions to better adhere to naming consistency (#50 by @JordanMartinez)

    All functions that take an optional callback are now
    named using the following schema:

    • no callback: functionName
    • with callback: functionName'

    Thus, the following were renamed:

    • write was renamed to write'
    • writeString was renamed to writeString'
    • end was renamed to end'
    • destroyWithError was renamed to destroy'

    write, writeString, and end now refer to their non-callback versions.

New features:

  • Added event handlers for Writeable streams (#49 by @JordanMartinez)

  • Added missing APIs (#51, #53 by @JordanMartinez)

    • readable, readableEnded, readableFlowing, readableHighWaterMark, readableLength
    • pipe'
    • writeable, writeableEnded, writeableCorked, errored, writeableFinished, writeableHighWaterMark, writeableLength, writeableNeedDrain
    • closed, destroyed
    • allowHalfOpen
    • pipeline
    • readableFromString, readableFromBuffer
    • newPassThrough
  • Integrated node-streams-aff into library (#52 by @JordanMartinez)

    Convenience APIs added for readable streams in "paused" mode:

    • readSome
    • readAll
    • readN

    Convenience APIs for writeable streams:

    • write
    • end

    Convenience APIs for converting Strings from/to Array Buffer

    • toStringUTF8
    • fromStringUTF8

    The only APIs from the library not added were newReadable and push.

  • Added convenience API for converting Readable to String or Buffer (#53 by @JordanMartinez)

    • readableToStringUtf8
    • readableToString
    • readableToBuffers

Bugfixes:

Other improvements: