-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Use of Buffer.alloc() breaks Node 4.x compatibility #1373
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
Comments
All the tests are passing on travis for node https://travis-ci.org/brianc/node-postgres/jobs/254701876 Should I increase the engines compatibility in |
Looks like I can bump the engines up to What do you think? |
According to the travis output the tests are running on Node v4.8.4, but that just tells me the tests don't expose this problem... as I said, Buffer.alloc() wasn't introduced until Node 5.0 (according to the API documentation at least). If the driver is going to continue using 5.x APIs, the minimum engine requirement needs to be at least 5.x; if 4.x support is to be continued, that 5.x API call will need to be addressed. |
They were backported in Node 4.5.0. |
Ah, nice; OK, then 4.5.x should be a viable semver spec for the Node "engines" entry. |
The package.json "engines" entry claims compatibility with Node >= 4.0.0, but around pg/lib/connection.js:290:26 there is a call to Buffer.alloc(), an API not introduced until Node 5.0.0. This causes the driver to throw when using Node < 5.x.
The text was updated successfully, but these errors were encountered: