21 Commits

Author SHA1 Message Date
Davide Violante
f528433e9d
chore: minor eslint fixes, reenable no-unused vars (#3445) 2025-04-28 11:59:26 -05:00
Alex Anderson
9b510373a6
eslint: enable recommended ruleset (#3263) 2025-04-12 08:17:33 +00:00
Alex Anderson
83a0e3e90e
eslint: enable rule: @typescript-eslint/no-unused-vars (#3247)
When enabling this rule, it's recommended to also *disable* the standard `no-unused-vars` rule.  Although `no-unused-vars` is not currently enabled, it seems helpful to explicitly disable it here.

See: https://typescript-eslint.io/rules/no-unused-vars/

Co-authored-by: alxndrsn <alxndrsn>
2024-06-18 15:55:17 -05:00
Alex Anderson
91de4b9453
Cursor: avoid closing connection twice if error received after destroy() (#2836)
* Cursor: avoid closing connection twice if error received after destroy()

Includes test case from @nathanjcochran

* Resolve lint violations

* revert fix to check tests fail without it

* Re-introdce fix

This reverts commit 5f5d42a071e40f8851035dba182642937dd35664.

---------

Co-authored-by: alxndrsn <alxndrsn>
2024-03-15 12:26:25 -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
Matthieu
5508c0ee6b
fix: Prevent closing the portal twice (#2609)
Fixes brianc/node-postgres#2119
2022-01-28 12:59:45 -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
Felix Pusch
d99b5741f8
pg-query-stream: remove through dependency (#2518) 2021-04-13 10:56:37 -05: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
Marcin K
78a14a164d
feat(): pg-query-stream typescript (#2376)
* feat(): start converting pg-query stream

* feat(): solution project, initial version of typescript-pg-query stream

* chore(): mocha with typescript

* fix(): eslint ignore query stream dist

* refactor(pg-query-stream): convert test to ts

* chore(): fixed type errors

* chore(): fix helper usage

* chore(): use ts-node compatibile with node v8

* fix(): addd es extension

* chore(): remove emitClose and added compilation for async iterators

* chore(): condition for asyc iteration test

* chore(): rename class to match ts-defs

* chore(): tests to import from src instead of dist

* chore(): remove prettier from peer deps:

* chore(): update lock file
2020-11-03 11:17:49 -06:00
Aravindan Ve
54048235c5
fix: use types configured on pg client in pg-query-stream 2020-07-10 11:43:32 +05:30
Brian M. Carlson
8404434279 Upgrade mocha 2020-05-13 11:49:37 -05:00
Brian M. Carlson
8591d94fcc Re-upgrade to prettier@2.x 2020-04-10 11:31:03 -05:00
Brian M. Carlson
6353affeca Downgrade to prettier@1.x to support node@8.x 2020-04-10 11:15:42 -05:00
Brian M. Carlson
c13cf81ee8 Lint pg & turn off semicolons 2020-04-10 10:47:57 -05:00
Brian M. Carlson
cb928ded2a Prettier pg-query-stream 2020-04-10 10:34:34 -05:00
Kyle Lilly
c2f4b284b1
Implement handleEmptyQuery for pg-query-stream. (#2106) 2020-02-19 12:12:46 -06:00
Brian C
0895460046
pg-query-stream@3.0 release (#2059)
* Fix one unintentional possible breaking change & update readme

* Update changelog more

* Update CHANGELOG.md

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

Co-authored-by: Charmander <~@charmander.me>
2020-01-09 23:33:40 -06:00
Brian C
8eca181d20
Fix pg-query-stream implementation (#2051)
* Fix pg-query-stream

There were some subtle behaviors with the stream being implemented incorrectly & not working as expected with async iteration.  I've modified the code based on #2050 and comments in #2035 to have better test coverage of async iterables and update the internals significantly to more closely match the readable stream interface.

Note: this is a __breaking__ (semver major) change to this package as the close event behavior is changed slightly, and `highWaterMark` is no longer supported.  It shouldn't impact most usage, but breaking regardless.

* Remove a bunch of additional code

* Add test for destroy + error propagation

* Add failing test for destroying unsubmitted stream

* Do not throw an uncatchable error when closing an unused cursor
2019-12-29 23:08:09 -06:00
Brian M. Carlson
6b7b8d19f5 Do not run tests in parallel 2019-12-20 15:03:43 -06:00
Brian M. Carlson
db1b95e5f3 Add 'packages/pg-query-stream/' from commit '9ced05e8aab65f3fdf1a67add87bfc9035e487e8'
git-subtree-dir: packages/pg-query-stream
git-subtree-mainline: cccf84e14b3281b753e1baab7bc194aaac5024a8
git-subtree-split: 9ced05e8aab65f3fdf1a67add87bfc9035e487e8
2019-12-20 12:00:58 -06:00