Skip to content

Change implementation of the Concatenator to make it look like more a stream #83

Description

@julienw

The Concatenator works by keeping all chunks in an array, and concatenating them all when the stream is ended. Then we keep and return this result when transferContents is called. The result is also cleared when the stream is destroy.

Node v14 now autodestroys stream by default when it ends.
The easy option is to force autoDestroy to true in the constructor.
A better option could be to output the result at the end like a stream, simply pushing the result of the concatenation. Possibly we would need to use objectMode for this too, so that node handles this result as one object instead of a big chunk. This would make the object more true to how streams work, and in the end more compatible with this mechanism in the long run.

┆Issue is synchronized with this Jira Task

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Severity

    None yet

    Jira

    None yet

    Estimate

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions