2574 Commits

Author SHA1 Message Date
Brian Carlson
e9d0f166af Update sponsors 2022-08-22 18:59:58 -05:00
Brian Carlson
8bd43a5d81 Fix error handling test
#2569 introduced a bug in the test. The test never passed but because travis-ci lovingly broke the integration we had a long time ago the tests weren't run in CI until I merged.  So, this fixes the tests & does a better job cleaning up the query in an errored state.
2022-08-22 18:54:37 -05:00
Brian C
747485d342
Bump min version of pg-native (#2787)
Fixes 2786
2022-08-22 15:34:07 -05:00
Alex Zlotnik
8032fbad43
Catch errors client throws in pool (#2569)
* Catch errors client throws in pool

* Add a test

This test _should be_ right
2022-08-22 15:33:51 -05:00
Martin Kubliniak
3e53d06cd8
Support lock_timeout (#2779) 2022-08-10 16:15:06 -05:00
Peter Rust
68160a29bd
Fix #2556 by keeping callback errors from interfering with cleanup (#2753)
* Fix #2556 (handleRowDescription of null) by keeping callback errors from interfering with cleanup

* Added regression test for #2556
2022-06-20 08:25:12 -05:00
Brian C
28ac2a17bc
Add test for how to set search path (#2700)
Also refactor a few tests a bit to slowly clean up some of the old style.
2022-05-12 22:00:00 -05:00
ChrisWritable
3ca56027d3
Immediately unref() maxLifetimeSeconds Timeout object to prevent blocking allowExitOnIdle (#2721) 2022-05-12 19:05:02 -05:00
Brian Carlson
c7743646cd Update sponsors 2022-05-12 19:04:21 -05:00
dependabot[bot]
ec06473c16
Bump minimist from 1.2.5 to 1.2.6 (#2727)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-11 23:41:19 -05:00
dependabot[bot]
b812ec1e65
Bump async from 0.9.0 to 2.6.4 (#2736)
Bumps [async](https://github.com/caolan/async) from 0.9.0 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/0.9.0...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-11 23:41:05 -05:00
Brian C
4b4d97b8f3
Remove stream-tester (#2743)
* Remove stream-tester

* Use random port for network-partition tests

* Use random port for connection timeout test

* Bump CI version
2022-05-10 14:49:22 -05:00
Lars Hvam
f5e87ac0b1
pg: update README, remove dead badge (#2719) 2022-04-01 11:31:45 -05:00
dependabot[bot]
21ccd4f1b6
Bump pathval from 1.1.0 to 1.1.1 (#2702)
Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/chaijs/pathval/releases)
- [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: pathval
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-15 14:52:06 -06:00
Brian Carlson
4fa7ee891a Publish
- pg-cursor@2.7.3
 - pg-pool@3.5.1
 - pg-query-stream@4.2.3
 - pg@8.7.3
pg-cursor@2.7.3 pg-pool@3.5.1 pg-query-stream@4.2.3 pg@8.7.3
2022-02-04 10:28:01 -06:00
Brian Carlson
9a61e9ac58 Format with prettier 2022-02-04 10:27:51 -06:00
Brian Carlson
edf1a864d6 Fix changelog 2022-02-04 10:22:23 -06:00
Brian Carlson
6849cc6868 Publish
- pg-cursor@2.7.2
 - pg-pool@3.5.0
 - pg-query-stream@4.2.2
 - pg@8.7.2
pg-cursor@2.7.2 pg-pool@3.5.0 pg-query-stream@4.2.2 pg@8.7.2
2022-02-04 10:21:57 -06:00
Brian Carlson
e4115854cb Update changelog 2022-02-04 10:20:51 -06:00
ChrisWritable
8392918d7b
Add connection lifetime limit option and tests (#2698)
Co-authored-by: ChrisG0x20 <position0x45@hotmail.com>
2022-01-28 17:17:48 -06:00
Matthieu
5508c0ee6b
fix: Prevent closing the portal twice (#2609)
Fixes brianc/node-postgres#2119
2022-01-28 12:59:45 -06:00
dependabot[bot]
998f573244
Bump trim-off-newlines from 1.0.1 to 1.0.3 (#2695)
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](https://github.com/stevemao/trim-off-newlines/compare/v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 17:34:36 -06:00
dependabot[bot]
f3ff3e2d1f
Bump node-fetch from 2.6.1 to 2.6.7 (#2694)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 17:34:10 -06:00
darkgl0w
a09412c603
chore (ci): trigger a CI run on PR events (#2681) 2022-01-26 17:20:11 -06:00
Andrew Lam
1f7b8cb6fa
Fix markdown for n8n.io sponsor link (#2685) 2022-01-16 14:40:34 -06:00
darkgl0w
392a7f4a66
chore (ci): add macOS and Windows to the CI OS matrix (#2657)
* chore (ci): add macOS and Windows to the CI OS matrix

* chore (ci): fix macOS runner name
2021-12-17 00:21:35 -06:00
Steffen Weidenhaus
2c3adf25f9
Update README.md (#2671)
Change `name` to `now` for time column
2021-12-17 00:15:26 -06:00
dependabot[bot]
97eea2d7a4
Bump path-parse from 1.0.6 to 1.0.7 (#2595)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-19 09:38:43 -06:00
dependabot[bot]
b0bd1c32f1
Bump tar from 4.4.15 to 4.4.19 (#2604)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.15 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.15...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-17 11:02:04 -06:00
Brian C
3aba3794cf
Use github actions for CI (#2654)
This is the initial port to github actions.  Still pending are the SSL and client SSL cert tests which are currently being skipped. But perfect is the enemy of the good here, and having no CI because travis-ci keeps not working is unacceptable.
2021-11-17 10:02:22 -06:00
dependabot[bot]
947ccee346
Bump tar from 4.4.13 to 4.4.15 (#2592)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.15)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05 00:59:44 +00:00
Brian C
98cd59e3e7
Return promise on cursor end (#2589)
* Return promise on cursor end

* Remove redudant if
2021-07-29 17:17:15 -05:00
Brian M. Carlson
92b4d37926 Publish
- pg-cursor@2.7.1
 - pg-pool@3.4.1
 - pg-query-stream@4.2.1
 - pg@8.7.1
pg-cursor@2.7.1 pg-pool@3.4.1 pg-query-stream@4.2.1 pg@8.7.1
2021-07-27 17:33:19 -05:00
Brian C
86d31a6fad
Only call client.ref if it exists
* Only call client.ref if it exists. Fixes #2582

* Make test requiring port less flakey

* Bump port range

Fixes #2582
Fixes #2584
2021-07-27 17:27:05 -05:00
Brian M. Carlson
f3b0ee4c09 Publish
- pg-cursor@2.7.0
 - pg-pool@3.4.0
 - pg-query-stream@4.2.0
 - pg@8.7.0
pg-cursor@2.7.0 pg-pool@3.4.0 pg-query-stream@4.2.0 pg@8.7.0
2021-07-27 12:41:17 -05:00
Brian C
779803fbce
Add ref/unref noop to native client (#2581)
* Add ref/unref noop to native client

* Use promise.catch in test

* Make partition test not flake on old node

* Fix test flake on old node
2021-07-27 12:23:30 -05:00
dependabot[bot]
0da7882f45
Bump y18n from 4.0.0 to 4.0.1 (#2506)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-27 11:42:04 -05:00
dependabot[bot]
83aae778e8
Bump ssri from 6.0.1 to 6.0.2 (#2531)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-27 11:37:10 -05:00
dependabot[bot]
d8ce457e83
Bump handlebars from 4.7.6 to 4.7.7 (#2538)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-27 11:36:35 -05:00
Brian M. Carlson
f824d74afe Update changelog 2021-07-27 11:35:55 -05:00
Brian Crowell
684cd09bce
Allow Node to exit if the pool is idle (#2568)
Based on the suggestion from #2078. This adds ref/unref methods to the
Connection and Client classes and then uses them to allow the process to
exit if all of the connections in the pool are idle. This behavior is
controlled by the allowExitOnIdle flag to the Pool constructor; it defaults
to the old behavior.
2021-07-27 11:29:07 -05:00
Bluenix
aedaa59afe
Add support for using promises in Cursor methods (#2554)
* Add similar promise variables to read() and close() as seen in query()

* Add testing for promise specific usage

* Simplify tests as no real callbacks are involved

Removes usage of `done()` since we can end the test when we exit the function

Co-Authored-By: Charmander <~@charmander.me>

* Switch to let over var

Co-authored-by: Charmander <~@charmander.me>
2021-07-27 09:40:32 -05:00
Greg Brown
9d2c977ce9
Use _isFull instead of duplicating clients check (#2539)
Noticed that options.max is compared against client count directly, but there's a method wrapping it. I can't see any reason to duplicate it? And using _isFull means I can override that for the adaptive pooling idea I'm exploring :)
2021-06-22 09:55:21 -05:00
Bluenix
a04003164b
Turn Cursor into an ES6 class (#2553)
* Turn Cursor into an ES6 class

* Fix incorrect syntax in Cursor.end()

* Remove extraneous empty line

* Revert es6 change for end()

* Revert back to defining the end() method inside the class

* Use hanging indent to satisfy Prettier
2021-06-22 09:52:10 -05:00
dependabot[bot]
d6ed9e756e
Bump lodash from 4.17.20 to 4.17.21 (#2540)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-15 11:27:01 -05:00
Charmander
7667e7c9e7
Fix and enable pool verify option test (#2528)
by not double-releasing.

Reviewed-by: Sehrope Sarkuni <sehrope@jackdb.com>
2021-05-27 23:37:07 +00:00
Charmander
8f0db306d9
Remove broken test (#2529)
It’s missing `co.wrap`, so it doesn’t actually run (Mocha does nothing with the paused generator). The test group that follows it, “using an ended pool”, covers the same thing anyway.
2021-04-27 15:34:08 -05:00
Brian M. Carlson
d459479382 Publish
- pg-connection-string@2.5.0
 - pg-cursor@2.6.0
 - pg-pool@3.3.0
 - pg-protocol@1.5.0
 - pg-query-stream@4.1.0
 - pg@8.6.0
pg-connection-string@2.5.0 pg-cursor@2.6.0 pg-pool@3.3.0 pg-protocol@1.5.0 pg-query-stream@4.1.0 pg@8.6.0
2021-04-13 11:02:40 -05:00
Brian M. Carlson
3115be6890 Update changelog 2021-04-13 11:02:10 -05:00
Erona
8faf8a0937
fix(pg-cursor): EventEmitter memory leak (#2501) 2021-04-13 10:57:37 -05:00