2545 Commits

Author SHA1 Message Date
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
Felix Pusch
d99b5741f8
pg-query-stream: remove through dependency (#2518) 2021-04-13 10:56:37 -05:00
Sven Over
6121bd3bb0
Add ParameterDescription message to pg-protocol (#2464) 2021-04-06 09:01:04 -05:00
Juan M Martínez
3dc79b605c
util in connection not used (#2507) 2021-04-02 22:37:39 +00:00
Kannan Goundan
4b229275cf
pg: Re-export DatabaseError from 'pg-protocol' (#2445)
* pg: Re-export DatabaseError from 'pg-protocol'

Before, users would have to import DatabaseError from 'pg-protocol'.  If
there are multiple versions of 'pg-protocol', you might end up using the
wrong one.

Closes #2378

* Update error-handling-tests.js

* Update query-error-handling-tests.js

Co-authored-by: Brian C <brian.m.carlson@gmail.com>
2021-03-22 13:07:05 -05:00
Emily Marigold Klassen
45fa27ea4a
[pg-protocol] use literals instead of const enum (#2490)
Co-authored-by: Emily Marigold Klassen <forivall@users.noreply.github.com>
2021-03-12 11:01:51 -06:00
Brian C
69af1cc934
Remove dead badge from readme 2021-03-12 08:41:13 -06:00
Brian C
61dfda7439
Update SPONSORS.md 2021-03-12 08:40:22 -06:00
Edward O'Reilly
2a7c614583
Adding pg to peerDependencies (#2471)
* Adding pg to peerDependencies

Yarn2 requires strict imports, I.E. all project dependencies need to exist in that project's package.json.

* pg version should be locked on the major version

Co-authored-by: Charmander <~@charmander.me>

Co-authored-by: Charmander <~@charmander.me>
2021-03-12 08:24:07 -06:00
Emily Marigold Klassen
5a41a56862
Add missing metadata to package.jsons (#2487)
Co-authored-by: Emily Marigold Klassen <forivall@users.noreply.github.com>
2021-03-12 08:23:13 -06:00
Sehrope Sarkuni
25f658f227
Fix README to separate sponsors onto separate lines (#2459)
Splits sponsor listings onto multiple lines by putting them in list elements.

Also removes hidden inline png that does not render on the README.
2021-01-29 10:55:05 -06:00
dependabot[bot]
4cb73ebc2c
Bump ini from 1.3.5 to 1.3.8 (#2430)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-26 21:37:23 -06:00
kaue
b4f61ad4c0
update license copyright year (#2450)
updates license copyright year to 2021
2021-01-26 21:36:51 -06:00
Jakob Krigovsky
4bc55834b9
Fix typo (#2442)
6be3b9022f83efc721596cc41165afaa07bfceb0 added support for the `sslmode` parameter, not `ssl-mode`.
2021-01-23 21:53:46 +00:00
Jumpaku
fae2c98870
Fix typo (#2444) 2021-01-19 23:24:44 +00:00
Andy Edwards
3f3f1a77c3
docs(README.md): add link to documentation repo (#2434)
since it's currently the only way to look up documentation for old versions
2020-12-30 04:20:46 -06:00
Brian C
daeafe82b4
Make tests pass in github codespaces (#2437)
* Make tests pass in github codespaces

There were a few tests which didn't specify a host or port which wasn't working well inside the codespaces docker environment.  Added host & port where required.  Also noticed one test wasn't actually _testing_, it was just `console.log`-ing its output, so I added proper assertions there.  Finally set `PGTESTNOSSL: true` in the codespaces environment until I can get the postgres docker container configured w/ SSL...which I will do l8r.

* lint
2020-12-30 04:20:20 -06:00
Sehrope Sarkuni
a109e8c6d2
Add more SASL validation and fix tests (#2436)
* Add sha256 SASL helper

* Rename internal createHMAC(...) to hmacSha256(...)

* Add parseAttributePairs(...) helper for SASL

* Tighten arg checks in SASL xorBuffers(...)

* Add SASL nonce check for printable chars

* Add SASL server salt and server signature base64 validation

* Add check for non-empty SASL server nonce

* Rename SASL helper to parseServerFirstMessage(...)

* Add parameter validation to SASL continueSession(...)

* Split out SASL final message parsing into parseServerFinalMessage(...)

* Fix SCRAM tests

Removes custom assert.throws(...) so that the real one from the assert package is used and
fixes the SCRAM tests to reflect the updated error messages and actual checking of errors.

Previously the custom assert.throws(...) was ignoring the error signature validation.
2020-12-30 04:19:27 -06:00
Jakob Krigovsky
afb3bf3d43
Document sslmode connection string parameter (#2421) 2020-12-03 09:44:28 -06:00
Brian M. Carlson
54b87523e2 Update changelog for pg-query-stream
Document the conversion to typescript as a semver major change. Closes #2412.
2020-11-30 11:01:54 -06:00
Brian M. Carlson
fa4549af4f Publish
- pg-cursor@2.5.2
 - pg-query-stream@4.0.0
pg-cursor@2.5.2 pg-query-stream@4.0.0
2020-11-30 10:58:10 -06:00
Brian M. Carlson
5de36c7f7f Update sponsors & readme 2020-11-30 10:57:40 -06:00
Brian C
4fde8b78f1
Fix double readyForQuery (#2420)
This is fixing a double readyForQuery message being sent from the backend (because we were calling sync after an error, which I already fixed in the main driver).  Also closes #2333
2020-11-30 09:25:01 -06:00
Jakob Krigovsky
c6aa29ade9
Fix typo (#2422)
Co-authored-by: Wolfgang Walther <wolfgangwalther@users.noreply.github.com>
2020-11-27 21:44:37 +00:00
Brian M. Carlson
0b9bb349dc Publish
- pg-cursor@2.5.1
 - pg-query-stream@3.4.2
 - pg@8.5.1
pg-cursor@2.5.1 pg-query-stream@3.4.2 pg@8.5.1
2020-11-13 08:59:48 -06:00
Brian C
ebe412cf24
Support "true" as string for ssl (#2407)
Fixes 2406
2020-11-11 10:41:20 -06:00
Brian M. Carlson
4d203aedee Publish
- pg-query-stream@3.4.1
pg-query-stream@3.4.1
2020-11-10 16:04:19 -06:00
Brian M. Carlson
3d0f68aa7b Update keyword to force patch apply 2020-11-10 16:04:12 -06:00
Brian C
897d774509
Run build before publish (#2409) 2020-11-10 16:01:44 -06:00
Brian M. Carlson
ec1dcab966 Publish
- pg-cursor@2.5.0
 - pg-protocol@1.4.0
 - pg-query-stream@3.4.0
 - pg@8.5.0
pg-cursor@2.5.0 pg-protocol@1.4.0 pg-query-stream@3.4.0 pg@8.5.0
2020-11-10 11:01:03 -06:00