Centralize logic for md5 hashing of passwords for authentication. Adds
a new function postgresMd5PasswordHash(user, password, salt) to utils
and updates client.js and tests to use it.
* Work on converting lib to standard
* Finish updating lib
* Finish linting lib
* Format test files
* Add .eslintrc with standard format
* Supply full path to eslint bin
* Move lint command to package.json
* Add eslint as dev dependency
This is a small change and is _kinda_ backwards compatible since the old behavior was to throw an error, but if someone was relying on anything with `.map` working as values it would break them, so it's in a major semver bump.
Clients are not reusable. This changes the client to raise errors whenever you try to reconnect a client that's already been used. They're cheap to create: just instantiate a new one (or use the pool) 😉.
Closes#1352
* Add client connectionString tests (#1310)
* Remove redundant tests
* Add client connectionString test
Add test to ensure { connectionString } is respected as an argument to the client constructor
* Add test for connection string property
Also fixed some legacy require statements.
* Normalize native error properties
Map native error properties to the same property names we use for errors from the JS driver.
Fixes#972Fixes#938
* Remove redundant tests
* Add client connectionString test
Add test to ensure { connectionString } is respected as an argument to the client constructor
* Add test for connection string property
Also fixed some legacy require statements.
* Remove unsupported Node versions 0.10 and 0.12 from CI
* Replace deprecated Buffer constructor with .from/.alloc
* Remove Promise polyfill
* Make use of Object.assign
* Remove checks for versions of Node earlier than 4
* Remove Buffer#indexOf fallback for Node 0.10
* Going red: using a config object creates two pools when missing some params
It should only create a pool in a consistent way, even if some params
are not provided in the first place.
* Delay the pool name generation to make it consistent between calls
* Don't fallback to empty object as config is already defined