2255 Commits

Author SHA1 Message Date
Brian M. Carlson
492fbdbb65 Merge branch 'juneidysoo-master' 2019-12-18 13:17:49 -06:00
Brian M. Carlson
e20d0128fc Merge branch 'master' of https://github.com/juneidysoo/node-pg-cursor into juneidysoo-master 2019-12-18 13:16:55 -06:00
Brian C
e34c6021ef
Merge pull request #32 from hetul/fix-closing-finished-connections
Fix closing a finished cursor without supplying a callback
2019-12-18 12:38:30 -06:00
dependabot[bot]
8f819a0e8d Bump js-yaml from 3.12.0 to 3.13.1 (#137)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-18 10:08:42 -06:00
Johannes Würbach
236db3813d Handle client errors in pool.query (#131)
If an error not related to the query occurs, the client is emitting an
error event.

Forward this event to the callback.
2019-12-18 10:08:30 -06:00
Brian M. Carlson
ebb81dbfa6 Publish
- pg@7.15.0
pg@7.15.0
2019-12-17 10:35:38 -06:00
Brian M. Carlson
7feaafd771 Update changelog 2019-12-17 10:34:09 -06:00
Brian C
1b5f3e33c4
Monorepo (#2014)
* First crack at monorepo

* Update test command

* Update path to script

* Remove node 6 from CI
2019-12-17 08:32:08 -08:00
Charmander
2b59209cf3 Warn when functions intended as constructors are called without new (#2021)
* Warn when pg.Pool() isn’t called as a constructor

in preparation for #1541. `eval` is a bit awkward, but it’s more accurate than an `instanceof` check and will work on platforms new enough to support pg 8 (i.e. only not Node 4).

* Warn when Query() isn’t called as a constructor
2019-12-17 08:02:38 -08:00
Hetul Patel
124c89b173 fix lint issues 2019-12-13 15:30:40 -08:00
Charmander
c1f954b7a6 Remove unreachable branch in parseE (#2020)
The message is created with a fixed name.

56b7c4168d5aa084b2821279ee88d437a2b7636d, released in pg 2.4.0, was when this became applicable and the type of a `notice` event’s argument changed to an Error.
2019-12-12 08:15:53 -08:00
Adam Nielsen
b03a3bd76d Clear connection timeout on error (#2015)
Cancel the connection timeout upon stream error, to avoid getting a stream error followed later by a connection error.
2019-12-12 08:15:19 -08:00
Charmander
8f56b8c2fd Add PostgreSQL 10 to CI (#1947)
* Exit with error code when create-test-tables fails

* Add PostgreSQL 10 to CI

and change to Ubuntu 18.04 so building OpenSSL isn’t necessary, and move old PostgreSQL version tests to the latest Node LTS.

* Add Node 13 to CI

* Preserve create-test-tables’s compatibility with PostgreSQL <9.4
2019-11-20 17:38:40 -06:00
Brian M. Carlson
30f67bb246 Bump version v7.14.0 2019-11-20 10:14:48 -06:00
Brian M. Carlson
b05ea526b8 Update changelog 2019-11-20 10:14:04 -06:00
Brian C
510a273ce4
Revert "Support additional tls.connect() options (#1996)" (#2010)
This reverts commit bf029c827049ca16add0a862d40f4e60dfd9e602.
2019-11-20 10:12:02 -06:00
Brian M. Carlson
c10a96c54d Bump version v7.13.0 2019-11-19 10:44:31 -06:00
Brian M. Carlson
eac3e4dcaf Update changelog 2019-11-19 10:44:23 -06:00
Jim Geurts
bf029c8270 Support additional tls.connect() options (#1996)
* Support additional tls.connect() options

* Pass-through all ssl options to tls.connect()

* Fix lint error

* Remove tls.checkServerIdentity explicit option
2019-11-19 10:10:19 -06:00
Brian C
ced31dd911
Update SPONSORS.md 2019-11-19 10:10:09 -06:00
dependabot[bot]
c8c41c5b65 Bump lodash from 4.17.11 to 4.17.13 (#136)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.13.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.13)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-19 10:02:08 -06:00
Justin Merz
06fbe19923 Skip TLS SNI if host is IP address (#1890)
* skip TLS SNI if host is IP address (do not set servername option in tls.connect)

* Format code
2019-11-11 15:18:52 -03:00
Sehrope Sarkuni
cd66c0b261 Add explicit files list to package.json (#1951) 2019-11-11 15:11:24 -03:00
Charmander
caa6517999 Fix disconnection tests for pg-pool 2.0.7 (#1946)
* 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
2019-11-11 15:10:18 -03:00
Brian M. Carlson
9ced05e8aa Bump version 2019-10-30 14:08:45 -05:00
Brian C
08072a90b8
Pass options to cursor (#65)
* Bump version of pg-cursor

This includes fixes in pg-cursor@2.0.1.  I've relaxed semver a touch so I don't have to release a new version here just for patch changes to pg-cursor.

* Pass options to pg-cursor

fixes #55
2019-10-30 14:08:11 -05:00
dependabot[bot]
05b4c573d2 Bump eslint from 4.4.0 to 4.18.2 (#63)
Bumps [eslint](https://github.com/eslint/eslint) from 4.4.0 to 4.18.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v4.4.0...v4.18.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-30 13:03:26 -05:00
Brian C
3e59f28df4
Bump version of pg-cursor (#64)
This includes fixes in pg-cursor@2.0.1.  I've relaxed semver a touch so I don't have to release a new version here just for patch changes to pg-cursor.
2019-10-30 13:03:09 -05:00
Brian M. Carlson
37906091e1 Bump version 2019-10-30 12:55:38 -05:00
Brian C
5055b3a244
Merge pull request #58 from brianc/bmc/add-test-and-deprecate-method
Add additional pool test & deprecate .end
2019-10-30 12:55:02 -05:00
Brian M. Carlson
cedce4bded Fix lint & enable all tests 2019-10-30 12:52:06 -05:00
Brian M. Carlson
507c7eaca4 Merge branch 'master' into bmc/add-test-and-deprecate-method 2019-10-30 12:47:14 -05:00
Brian C
d0e67a93ff
Merge pull request #59 from brianc/bmc/fix-named-portal
Fix named portal not closing
2019-10-30 12:46:13 -05:00
Brian M. Carlson
bd86514c72 Add another test 2019-10-30 11:43:17 -05:00
Brian M. Carlson
389d5d8c14 Fix named portal being left open
When code was added to use a random named portal instead of the empty portal to support redshift we didn't update the close messages approprately.  This could result in postgres keeping locks on tables for modification if streaming and table modification was both done within a transaction.  This update fixes the issue by always issuing a close command on the named portal when query is finished.

fixes #56
2019-10-30 11:33:52 -05:00
Brian C
a84db5ffd7
Add async iterator tests (#62) 2019-10-28 12:46:49 -05:00
dependabot[bot]
a756ee30e4 Bump debug from 2.6.8 to 2.6.9 (#61)
Bumps [debug](https://github.com/visionmedia/debug) from 2.6.8 to 2.6.9.
- [Release notes](https://github.com/visionmedia/debug/releases)
- [Changelog](https://github.com/visionmedia/debug/blob/2.6.9/CHANGELOG.md)
- [Commits](https://github.com/visionmedia/debug/compare/2.6.8...2.6.9)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-28 12:10:49 -05:00
dependabot[bot]
fb52c52304 Bump js-yaml from 3.9.1 to 3.13.1 (#60)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.9.1 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.9.1...3.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-28 12:02:44 -05:00
Mandy Real
e153e3f5fd fixed typo cumbersom (#49) 2019-10-28 12:00:09 -05:00
Brian C
c95a650a73
Upgrade dependencies (#59)
* Upgrade dependencies

- There was a security vuln with mocha, so upgraded mocha.
- Upgraded versions of node we're going to check in travis
- Switched to yarn from npm
- Removed --no-exit as that's standard mocha behavior now

* Enable postgres on newer version of travis
2019-10-28 11:58:35 -05:00
Brian M. Carlson
d3aee3dfc8 Add additional pool test & deprecate .end
There are no tests covering cursor.end().  It's also a weird method to have on the cursor as it terminates the connection to postgres internally.  I don't recall why I added this method in the first place but its not correct to close a connection to postgres by calling .end on a cursor...seems like a pretty big footgun.  If you have a pooled client and you call `cursor.end` it'll close the client internally and likely confuse the pool.  Plus it's just weird to be able to close a connection by calling .end on a query or cursor.  So...I'm deprecating that method.
2019-10-28 11:45:20 -05:00
Brian C
ff09b3f21d
Merge branch 'master' into fix-closing-finished-connections 2019-10-25 18:19:19 -05:00
Brian C
6d47026083
Merge pull request #57 from brianc/bmc/lint-changes
Fix for pg@7.x
2019-10-25 18:17:44 -05:00
Brian M. Carlson
be0321299b Update lint, fix for pg@7.x 2019-10-25 18:11:53 -05:00
Brian M. Carlson
4164686c4b meh 2019-10-25 18:03:07 -05:00
Brian M. Carlson
414fac6a05 Apply prettier to code, change lint rules 2019-10-25 12:14:27 -05:00
Ravi van Rooijen
fde5ec586e Use arrow character in readme 2019-10-13 19:53:56 -07:00
Yuri Astrakhan
2d2a87392c Minor cleanup - inline throwOnRelease() (#129)
The throwOnRelease() function does not appear to be exposed anywhere,
and it does not appear to make any sense to have it as a standalone func,
as it ovecomplicates things and makes function call as non-returning.  Inlined it.
2019-09-03 22:45:45 -07:00
Brian M. Carlson
60d8df659c Bump version v7.12.1 2019-08-09 16:02:25 -05:00
Vitaly Tomilov
05d20a6a6d Update package.json (#1937)
Fixes #1936
2019-08-09 16:00:47 -05:00