brianc / node-pg-types

Type parsing for node-postgres
270 stars 55 forks source link

Restore int8 binary parser #69

Closed charmander closed 6 years ago

charmander commented 6 years ago

Removed in https://github.com/brianc/node-postgres/commit/fb5520bb8a22438a4885aef9c9ef95edfa9d73e7; reimplemented here without native add-ons.

An exact-version dependency on a package with two easy-to-audit files:

$ npm info pg-int8 dist
{ integrity: 'sha512-5SojTTxi9rTObWGqfcsPd/+uyU4ctsmChLhqQVTzzc9ltDsWni1TJuYwX/lJMDFdGgd9lVgkXcDyQvRIgI5elw==',
  shasum: 'd93de9931d87b24be674febc0fdaac6d52701de5',
  tarball: 'https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.0.tgz' }
$ wget https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.0.tgz
⋮
$ tar tf pg-int8-1.0.0.tgz 
package/package.json
package/index.js
package/LICENSE
package/README.md

See also https://github.com/brianc/node-postgres/issues/1492#issuecomment-344131130.

brianc commented 6 years ago

thanks @charmander! Looks like the compatibility broke in pg-int8 for older versions of node. Do you want to back-port it to be v0.12 compat or do you want to semver major bump this library? I'm personally fine either way.

charmander commented 6 years ago

I’ll backport it – there shouldn’t be any performance change.

brianc commented 6 years ago

Awesome! Thanks! Merging now & pushing a new minor version.

brianc commented 6 years ago

pushed pg-types@1.13.0