Pete Bacon Darwin
26f7504531
fix invalid connection string test
...
The : and @ were the wrong way round
2023-05-15 07:29:07 +01:00
Pete Bacon Darwin
18b8ceae17
Add local development helper doc
2023-05-15 07:29:07 +01:00
Conner
249182ea9f
Document client.escapeIdentifier and client.escapeLiteral ( #2954 )
...
* Document client.escapeIdentifier and client.escapeLiteral
Per #1978 it seems that these client APIs are undocumented. Added documentation for these functions along with some examples and relevant links.
* Fix typos in new docs
* Migrate escapeIdentifier and escapeLiteral from Client to PG
These are standalone utility functions, they do not need a client instance to function.
Changes made:
- Refactored escapeIdentifer and escapeLiteral from client class to functions in utils
- Update PG to export escapeIdentifier and escapeLiteral
- Migrated tests for Client.escapeIdentifier and Client.escapeLiteral to tests for utils
- Updated documentation, added a "utilities" page where these helpers are discussed
**note** this is a breaking change. Users who used these functions (previously undocumented) on instances of Client, or via Client.prototype.
* Export escapeIdentifier and escapeLiteral from PG
These are standalone utility functions, they should not depend on a client instance.
Changes made:
- Refactored escapeIdentifer and escapeLiteral from client class to functions in utils
- Re-exported functions on client for backwards compatibility
- Update PG to export escapeIdentifier and escapeLiteral
- Updated tests to validate the newly exported functions from both entry points
- Updated documentation, added a "utilities" page where these helpers are discussed
* Ensure escape functions work via Client.prototype
Updated changes such that escapeIdentifier and escapeLiteral are usable via the client prototype
Updated tests to check for both entry points in client
2023-05-02 07:55:59 -05:00
Felix Rath
d63c761be8
docs(api/result): clarify that result.rowCount can be null ( #2967 )
...
`result.rowCount` is initialized to `null`, but only set to an `int`-value if the returned command tag consists of more than one word, which is not the case in general.
For example, the `LOCK` command will return a command tag of simply the form `LOCK`, and thus `result.rowCount` will stay `null`.
2023-05-01 09:15:55 -05:00
Brian C
0870442776
Fix race condition in release event test for pool ( #2969 )
2023-05-01 09:15:20 -05:00
Jan Piotrowski
b357e1884a
fix(theme.config.js): Replace default meta description and social title ( #2952 )
...
Currently still nextra default.
Those are shown in Slack and other social apps when sharing the website.
2023-04-20 16:03:59 +02:00
Brian C
48f4398fa7
Update README.md ( #2944 )
...
Update href to docs
2023-03-30 11:25:35 -05:00
Samuel Durante
92351b5f3e
docs(client): improve the Client instance example ( #2935 )
2023-03-30 10:49:28 -05:00
Ryan B. Harvey
65ca2458fd
Add release event to Pool API docs ( #2928 )
2023-03-16 11:34:50 -05:00
Brian C
0f76fb3bb7
Update path to documentation in readme ( #2925 )
2023-03-07 13:55:22 -06:00
Brian Carlson
661f870e1c
Update changelog
2023-03-06 15:48:08 -06:00
Brian Carlson
ee302cbcf1
Publish
...
- pg-cursor@2.9.0
- pg-pool@3.6.0
- pg-query-stream@4.4.0
- pg@8.10.0
pg-cursor@2.9.0
pg-pool@3.6.0
pg-query-stream@4.4.0
pg@8.10.0
2023-03-06 14:18:02 -06:00
Ryan B. Harvey
810b125581
Emit a 'release' event when a connection is released back to the pool ( #2845 )
2023-03-06 12:32:13 -06:00
Aram Zegerius
8804e5caaf
Fix typo in URL ( #2913 )
2023-03-06 12:30:37 -06:00
Cody Greene
5703791640
fix: double client.end() hang ( #2717 )
...
* fix: double client.end() hang
fixes https://github.com/brianc/node-postgres/issues/2716
`client.end()` will resolve early if the connection is already dead,
rather than waiting for an "end" event that will never arrive.
* fix: client.end() resolves when socket is fully closed
2023-03-06 12:10:07 -06:00
Brian Carlson
adbe86d4a0
Update changelog
2023-01-27 09:15:30 -06:00
Brian Carlson
20a243e8b3
Publish
...
- pg-cursor@2.8.0
- pg-protocol@1.6.0
- pg-query-stream@4.3.0
- pg@8.9.0
pg-cursor@2.8.0
pg-protocol@1.6.0
pg-query-stream@4.3.0
pg@8.9.0
2023-01-27 09:12:49 -06:00
Brian Carlson
5bdc61a33d
Remove expired sponsors
2023-01-27 09:11:05 -06:00
Brian C
47afe5cded
Attempt to fix timing test flake on older versions of node in CI ( #2902 )
2023-01-23 13:55:38 -08:00
Sehrope Sarkuni
bb8745b215
Fix SASL to bubble up errors, enable SASL tests in CI, and add informative empty SASL password message ( #2901 )
...
* Enable SASL tests in GitHub actions CI
* Add SASL test to ensure that client password is a string
* Fix SASL error handling to emit and bubble up errors
* Add informative error when SASL password is empty string
2023-01-23 10:03:51 -08:00
Ruy Adorno
f82f39c20c
Add support to stream factory ( #2898 )
...
This changeset enables declaring the `stream` config value as a factory
method. Providing a much more flexible control of the socket connection.
Defining a custom `stream` config value allows the postgres driver to
support a larger variety of environments/setups such as proxy servers
and secure socket connections that are used by cloud providers such as
GCP.
Currently, usage of the `stream` config value is only viable for single
connections given that it's only possible to define a single socket
stream instance per new Client/Pool instance. By adding support to a
factory function, it becomes possible to enable usage of custom socket
streams for connection pools.
For reference, see the `mysql2` driver for MySQL (linked below) for
prior art example of this pattern.
Refs: ba15fe2570/lib/connection.js (L63-L65)
Refs: https://cloud.google.com/sql/docs/postgres/connect-overview
Signed-off-by: Ruy Adorno <ruyadorno@google.com>
Signed-off-by: Ruy Adorno <ruyadorno@google.com>
2023-01-23 10:02:39 -08:00
Meron Ogbai
3e34816f6f
Update title ( #2886 )
...
This will change the title of the docs from Next.js Static Site Generator to node-postgres
2022-12-30 22:45:42 -06:00
dependabot[bot]
c6c05f823c
Bump JSONStream from 0.7.4 to 1.3.5 ( #2874 )
...
Bumps [JSONStream](https://github.com/dominictarr/JSONStream ) from 0.7.4 to 1.3.5.
- [Release notes](https://github.com/dominictarr/JSONStream/releases )
- [Commits](https://github.com/dominictarr/JSONStream/commits )
---
updated-dependencies:
- dependency-name: JSONStream
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 22:02:45 -06:00
dependabot[bot]
16118cecdd
Bump eslint-config-prettier from 6.12.0 to 8.5.0 ( #2875 )
...
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier ) from 6.12.0 to 8.5.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases )
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.12.0...v8.5.0 )
---
updated-dependencies:
- dependency-name: eslint-config-prettier
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 22:02:31 -06:00
Brian C
27d612a2ac
Update docs ( #2867 )
...
- fix config warnings
- add search bar
- add google analytics
2022-11-23 21:50:36 -06:00
Brian C
12b9a69776
update docs - clean up interface ( #2863 )
...
* update docs - clean up interface
* Remove node v8.x from test matrix
2022-11-23 15:08:09 -06:00
Charmander
c7dc621d3f
pg-cursor: Fix errors only being sent to half the queue ( #2831 )
...
* pg-cursor: Add failing test for errors on queued reads
* pg-cursor: Fix errors being sent to only half the queue
2022-11-21 11:57:30 -06:00
Frazer Smith
c7133eb67f
ci: remove git credentials after checkout ( #2858 )
2022-11-08 13:24:39 -06:00
Frazer Smith
15b502d4c1
refactor(pg): remove unused imports ( #2854 )
2022-11-05 18:26:42 -07:00
dependabot[bot]
c253eb6696
Bump chai from 4.2.0 to 4.3.6 ( #2851 )
...
Bumps [chai](https://github.com/chaijs/chai ) from 4.2.0 to 4.3.6.
- [Release notes](https://github.com/chaijs/chai/releases )
- [Changelog](https://github.com/chaijs/chai/blob/4.x.x/History.md )
- [Commits](https://github.com/chaijs/chai/compare/4.2.0...v4.3.6 )
---
updated-dependencies:
- dependency-name: chai
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-04 00:30:19 -05:00
dependabot[bot]
0965531cda
Bump typescript from 4.0.3 to 4.8.4 ( #2850 )
...
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 4.0.3 to 4.8.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.3...v4.8.4 )
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-04 00:29:25 -05:00
Ryan B. Harvey
89b4e7f2a2
Fix devcontainer build failure due to env var being interpreted as non-string ( #2844 )
2022-10-28 00:56:53 -05:00
dependabot[bot]
5538df6b44
Bump @typescript-eslint/eslint-plugin from 4.4.0 to 4.33.0 ( #2826 )
...
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin ) from 4.4.0 to 4.33.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases )
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md )
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.33.0/packages/eslint-plugin )
---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-15 12:57:41 -05:00
Knut Olav Løite
406f141a1a
perf: remove superfluous flush message ( #2842 )
2022-10-15 12:57:16 -05:00
dependabot[bot]
c7dc7fd93a
Bump pgpass from 1.0.2 to 1.0.5 ( #2827 )
...
Bumps [pgpass](https://github.com/hoegaarden/pgpass ) from 1.0.2 to 1.0.5.
- [Release notes](https://github.com/hoegaarden/pgpass/releases )
- [Commits](https://github.com/hoegaarden/pgpass/compare/v1.0.2...v1.0.5 )
---
updated-dependencies:
- dependency-name: pgpass
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-15 12:55:47 -05:00
Brian C
1aa08274a5
Migrate docs repo into monorepo ( #2823 )
...
* Move files over
* Finish initial port of content
2022-10-10 12:20:46 -05:00
Alex Anderson
5bcc05d1e9
pg-protocol: fix link to message format docs ( #2835 )
2022-10-06 09:59:11 -07:00
David Matějka
9dfb3dccbf
perf(pg): use native crypto.pbkdf2Sync in sasl auth ( #2815 )
2022-09-27 05:38:28 -05:00
Yue Dai
9e2d7c4ad5
Update pg.connect with pool.connect ( #2822 )
...
pg.connect() has been deprecated.
2022-09-27 05:31:07 -05:00
Matthieu
9a95ee719b
pg-query-stream: Add missing peer dependency on pg ( #2813 )
...
pg-query-stream depends on pg-cursor, which has a peer dependency on pg.
2022-09-19 10:29:53 -07:00
dependabot[bot]
34d173d9e3
Bump coveralls from 3.1.0 to 3.1.1 ( #2801 )
...
Bumps [coveralls](https://github.com/nickmerwin/node-coveralls ) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/nickmerwin/node-coveralls/releases )
- [Commits](https://github.com/nickmerwin/node-coveralls/compare/v3.1.0...3.1.1 )
---
updated-dependencies:
- dependency-name: coveralls
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-17 20:59:43 +02:00
dependabot[bot]
659ac37ba3
Bump eslint-plugin-promise from 3.8.0 to 6.0.1 ( #2802 )
...
Bumps [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise ) from 3.8.0 to 6.0.1.
- [Release notes](https://github.com/xjamundx/eslint-plugin-promise/releases )
- [Changelog](https://github.com/xjamundx/eslint-plugin-promise/blob/development/CHANGELOG.md )
- [Commits](https://github.com/xjamundx/eslint-plugin-promise/commits )
---
updated-dependencies:
- dependency-name: eslint-plugin-promise
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-08 06:31:37 +02:00
Alex
8250af4aed
Minimize GitHub Workflows permissions ( #2798 )
...
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-08-29 12:55:10 -07:00
Brian C
ad6c4a4693
Update README.md ( #2799 )
...
Build status icon was still pointing at travis. We don't use travis anymore: we use github actions.
2022-08-29 13:32:48 -05:00
Brian Carlson
c99fb2c127
Publish
...
- pg-cursor@2.7.4
- pg-pool@3.5.2
- pg-query-stream@4.2.4
- pg@8.8.0
pg-cursor@2.7.4
pg-pool@3.5.2
pg-query-stream@4.2.4
pg@8.8.0
2022-08-23 11:36:18 -05:00
Brian Carlson
8d498959c3
Update changelog
2022-08-23 11:29:35 -05:00
dependabot[bot]
6e386eb294
Bump prettier from 2.1.2 to 2.7.1 ( #2792 )
...
Bumps [prettier](https://github.com/prettier/prettier ) from 2.1.2 to 2.7.1.
- [Release notes](https://github.com/prettier/prettier/releases )
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.7.1 )
---
updated-dependencies:
- dependency-name: prettier
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-22 21:35:18 -05:00
Marcin K
ff85ac2459
chore(): added dependabot ( #2374 )
2022-08-22 19:06:43 -05:00
Brian C
a4ef6ce38c
Fix error handling test ( #2789 )
...
* 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.
* Update sponsors
2022-08-22 19:05:59 -05:00
Brian C
747485d342
Bump min version of pg-native ( #2787 )
...
Fixes 2786
2022-08-22 15:34:07 -05:00