Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

refactor(deps)!: Remove duplexify dependency + Revamp Stream Implementation #2041

Open

Description

@danielbankhead

Now that we've resolved the following:

We should remove duplexify. In all cases where it is used today, native Node.js Stream options, namely Transform, make more sense.

Today Duplexify streams are passed around to too many functions and have lots of random ‘side effects’ to keep track of; leading issues that are difficult to debug. A refactor using native Node.js streams and pipelines will make things much more straightforward and would shrink the overall codebase. For example, we can trust the 'close' event more in native streams than in the duplexify implementation; namely in the cases of requests (duplexify streams 'close' before a 'response' is received).

This is a breaking change as duplexify.Duplexify is exposed as a return type in some public APIs.

As an additional note, in the future we can move to the Web Streams API for web compatibility - moving to Node.js Streams first will make this step much easier as the Readable, Writable, and Transform implementations are similar.

Activity

  1. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    priority: p3Desirable enhancement or fix. May not be included in next release.
    next major: breaking changethis is a change that we should wait to bundle into the next major version
    on Aug 12, 2022
  2. removed
    priority: p3Desirable enhancement or fix. May not be included in next release.
    on Jul 13, 2023
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

    api: storageIssues related to the googleapis/nodejs-storage API.next major: breaking changethis is a change that we should wait to bundle into the next major versiontype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.web

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions