Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vitaly-t opened this issue Jan 10, 2020 · 5 comments
Closed

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

vitaly-t opened this issue Jan 10, 2020 · 5 comments

Comments

@vitaly-t
Copy link
Contributor

vitaly-t commented Jan 10, 2020

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.

@vitaly-t vitaly-t changed the title v7.17.1 stream compatibility with Node.js < 8 v7.17.1 - stream stopped working in Node.js < v8 Jan 10, 2020
@vitaly-t vitaly-t changed the title v7.17.1 - stream stopped working in Node.js < v8 v7.17.1 - stream issue in Node.js < v8 Jan 11, 2020
@brianc
Copy link
Owner

brianc commented Jan 11, 2020

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/ pg@8.0 too! 👏

@vitaly-t
Copy link
Contributor Author

@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?

@brianc
Copy link
Owner

brianc commented Jan 11, 2020

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.

@vitaly-t
Copy link
Contributor Author

vitaly-t commented Jan 11, 2020

@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.

@brianc
Copy link
Owner

brianc commented Jan 11, 2020

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants