* Require latest pg-pool ^2.0.7
to limit variability of next pg’s installations.
* Ignore EPIPE when writing termination message
I don’t know why this wasn’t necessary for tests to pass before…
* Fix disconnection tests for pg-pool 2.0.7
In pg-pool 2.0.7, checked-out clients became responsible for their own 'error' events.
brianc/node-pg-pool#123
* feat: Add dynamic retrieval for client password
Adds option to specify a function for a client password. When the client
is connected, if the value of password is a function then it is invoked
to get the password to use for that connection.
The function must return either a string or a Promise that resolves to
a string. If the function throws or rejects with an error then it will
be bubbled up to the client.
* test: Add testAsync() helper to Suite
Add testAsync() helper function to Suite to simplify running tests that
return a Promise. The test action is executed and if a syncronous error
is thrown then it is immediately considered failed. If the Promise resolves
successfully then the test is considered successful. If the Promise
rejects with an Error then the test is considered failed.
* test: Add tests for dynamic password
* test: Simplify testAsync error handling
* fix: Clean up dynamic password error handling and misc style
* test: Remove extra semicolons
* test: Change testAsync(...) calls to use arrow functions
* fix: Wrap self.password() invocation in an arrow function
* test: Add a comment to testAsync(...)
* Fix deepEqual compare
In node 12 assert.deepEqual against a buffer & array no longer passes if the values are the same. This makes sense. Updated the test to not use deepEqual in this case.
* Fix typo
* Enable eslint:recommended and remove unused eslint plugins
Enables eslint:recommended by disabling the options that would not pass. Also removes
dependencies for included but unused eslint plugins.
* Convert console.error(...) calls to use %s placeholders
* Enable eslint no-console rule
* Add and enable eslint-node-plugin
* Correct typo
* Enable eslint no-unused-vars
* Added the missing connect_timeout and keepalives_idle config parameters
* Implementation and tests for keepAliveInitialDelayMillis and connectionTimeoutMillis [squashed 4]
Adds a try/catch block around the prepareValue(...) invocations in query.prepare(...)
to ensure that any that throw an error are caught and bubbled up to the caller.
The documentation states that you can pass custom type processors to
query objects. See:
https://node-postgres.com/features/queries#types
This didn't actually work. This commit adds an initial implementation
of per-query type-parsing. Caveats:
* It does not work with pg-native. That would require a separate pull
request to pg-native, and a rather significant change to how that
library handles query results.
* Per-query types do not "inherit" from types assigned to the Client,
ala TypeOverrides.