Skip to content

v7.17.1 - stream issue in Node.js < v8 #2068

Closed

Description

@vitaly-t

In v7.17.1, with pg-query-stream 3.0.0, I am getting error under Node.js < v8

TypeError: stream.destroy is not a function

For example, I am testing it under Node.js v7.10.1

@brianc It seems that after changing from method close to method destroy on the stream, we lost compatibility with Node.js v7 and earlier.

Activity

  1. changed the title [-]v7.17.1 stream compatibility with Node.js < 8[/-] [+]v7.17.1 - stream stopped working in Node.js < v8[/+] on Jan 10, 2020
  2. changed the title [-]v7.17.1 - stream stopped working in Node.js < v8[/-] [+]v7.17.1 - stream issue in Node.js < v8[/+] on Jan 11, 2020
  3. brianc commented on Jan 11, 2020

    @brianc
    Owner

    Ah thanks for the heads up, I'll include a note about that in the changelog. 💃 Since it's semver major I'm fine w/ it dropping support for node < 8. I'm planning on dropping support for node < 10 in a few days w/ [email protected] too! 👏

  4. vitaly-t commented on Jan 11, 2020

    @vitaly-t
    ContributorAuthor

    @brianc Is there any technological limitation that Node.js v8 is causing? i.e. what will be the justification for not supporting Node.js v8?

  5. brianc commented on Jan 11, 2020

    @brianc
    Owner

    Mostly that node 8 is end of life...I think following along w/ the node LTS release cycle is a pretty manageable way to figure out which versions of node to target for support from pg. I'd like modernize the codebase of pg & use newer features of v8 that don't exist in older versions of node (async/await for example!). I think for folks running 2-3 year old verions of node they'll need to stay pinned to older versions of pg.

  6. vitaly-t commented on Jan 11, 2020

    @vitaly-t
    ContributorAuthor

    @brianc The reality is such, many companies are stuck with older versions of Node.js in production, and dropping support for the sake of chasing Node.js release cycle will lock out a huge user base, without good reason. Therefore, I would advise against that, and not to drop older Node.js unless there is a good reason for it.

    If you want to bring in async/await, it went official since Node.js 7.6.0, which is what I am supporting in pg-promise as the minimum version. And there wasn't any big change in Node.js that would be worth dropping older Node.js for.

    I believe that supporting at least Node.js v8 is very much worthwhile at this point.

  7. brianc commented on Jan 11, 2020

    @brianc
    Owner

    Hmm let's continue the discussion over at #2062 - the plan for a long while has been to drop support for earlier versions of node. I could be persuaded to keep node 8 in the test matrix & continue to support it...but that'd be as far back as I think is reasonable to go.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions