2834 Commits

Author SHA1 Message Date
Nigro Simone
8d493f3b55
feat: add Node.js version 25 to CI workflow (#3556)
* feat: add Node.js version 25 to CI workflow

https://nodejs.org/en/blog/release/v25.0.0

* chore: update CI workflow to exclude Node.js version '23'

Remove Node.js version '23' from CI workflow.
2025-10-22 16:20:07 +02:00
Charmander
917478397b
test: Replace dead row length check with similar shape check (#3532)
These object-mode rows don’t include a `length`. Dead code since 721cf56eb331bd35243c1425095b98cf09adf814 (“Rows are now associative arrays rather than straight arrays.”)?
2025-08-22 01:42:17 +00:00
Prasad
f5c90a5484
docs: fix typo in pool docs (#3530) 2025-08-20 06:48:50 -05:00
dependabot[bot]
65bc3d4884
build(deps-dev): bump node-gyp from 11.2.0 to 11.3.0 (#3526)
Bumps [node-gyp](https://github.com/nodejs/node-gyp) from 11.2.0 to 11.3.0.
- [Release notes](https://github.com/nodejs/node-gyp/releases)
- [Changelog](https://github.com/nodejs/node-gyp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nodejs/node-gyp/compare/v11.2.0...v11.3.0)

---
updated-dependencies:
- dependency-name: node-gyp
  dependency-version: 11.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-08 15:04:02 -05:00
James Vaughan
a6c1084db1
Update bugs and homepage links for pg-pool (#3528) 2025-08-05 13:32:06 -05:00
Mathias Bockwoldt
1b2bedc9c8
feat(pg-connection-string): throw correct error when URL parsing fails
Fixes #3513
2025-07-28 08:48:29 -04:00
Brian C
27a2754787
Deprecations (#3510)
* Make active query a private prop

* Make client.queryQueue private (with deprecation)

* Deprecate some legacy features

* Update packages/pg/lib/client.js

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

---------

Co-authored-by: Brian Carlson <brian.carlson@getcruise.com>
Co-authored-by: Charmander <~@charmander.me>
2025-07-16 21:52:00 -05:00
Barry Hagan
01fadd93d7
fix #3508 - recheck min client count during idle callback (#3509) 2025-07-10 14:30:48 -05:00
Brian C
43b8692019
Add tests for export (#3507)
* Add tests for export

* Fix
2025-07-08 22:40:13 -05:00
Tommy D. Rossi
fab87b28af
Add package.json export to pg-cloudflare (#3506)
* Update package.json

* Update package.json

* Update package.json
2025-07-08 18:08:40 -05:00
Herman J. Radtke III
c8fb1e9261
feat(pg-connection-string): warn if non-standard ssl options are used (#3473)
* feat(pg-connection-string): warn if non-standard ssl options are used

In preparation for v3.0.0, we start warning users to be explicit about
the sslmode they want.

* Update index.js
2025-07-07 17:33:22 -05:00
dependabot[bot]
54e0424991
build(deps-dev): bump eslint-plugin-prettier from 5.2.6 to 5.5.1 (#3502)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.2.6 to 5.5.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.6...v5.5.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-02 11:57:38 -05:00
dependabot[bot]
235d7ad5e2
build(deps-dev): bump node-gyp from 10.2.0 to 11.2.0 (#3501)
Bumps [node-gyp](https://github.com/nodejs/node-gyp) from 10.2.0 to 11.2.0.
- [Release notes](https://github.com/nodejs/node-gyp/releases)
- [Changelog](https://github.com/nodejs/node-gyp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nodejs/node-gyp/compare/v10.2.0...v11.2.0)

---
updated-dependencies:
- dependency-name: node-gyp
  dependency-version: 11.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-02 11:57:28 -05:00
Brian Carlson
8f8e7315e8 Publish
- pg-bundler-test@0.0.2
 - pg-cloudflare@1.2.7
 - pg-cursor@2.15.3
 - pg-esm-test@1.2.3
 - pg-native@3.5.2
 - pg-protocol@1.10.3
 - pg-query-stream@4.10.3
 - pg@8.16.3
pg-bundler-test@0.0.2 pg-cloudflare@1.2.7 pg-cursor@2.15.3 pg-esm-test@1.2.3 pg-native@3.5.2 pg-protocol@1.10.3 pg-query-stream@4.10.3 pg@8.16.3
2025-06-27 09:51:27 -05:00
Brian C
f0d1c4868a
Update package exports to support more formats (#3500) 2025-06-27 09:51:01 -05:00
Nigro Simone
0ad6c9b71e
fix: typos (#3499)
* fix: typos

* fix: typo
2025-06-26 17:28:43 -05:00
James Opstad
54964ecff7
Replace cloudflare export condition in pg-cloudflare with workerd (#3498)
* Replace cloudflare export condition with workerd

* Add note about Cloudflare Vite plugin
2025-06-26 16:42:08 -05:00
Brian Carlson
1a25d12817 Publish
- pg-cursor@2.15.2
 - pg-esm-test@1.2.2
 - pg-protocol@1.10.2
 - pg-query-stream@4.10.2
 - pg@8.16.2
pg-cursor@2.15.2 pg-esm-test@1.2.2 pg-protocol@1.10.2 pg-query-stream@4.10.2 pg@8.16.2
2025-06-19 16:15:21 -05:00
Herman J. Radtke III
e00aac1398
Fixes for binary protocol array handling (#3494)
* fix(pg-protocol): specify number of result column format codes

Fixes a bug when binary format. We must specify both:

- the number of result column format codes
- the result column format codes

The text format case was working by accident. When using text format, the
intention was to set the format code to 0. Instead, we set the number
of result column format codes was set to 0. This is valid because it indicates
that all result columns should use the default format (text).

When using binary format, the intention was to set the format code to 1.
Instead, we set the number of result column format codes to 1.
Importantly, we never set a result column format code. This caused an
error: 'insufficient data left in message'. 

We now always set the number of result column format codes to '1'. The
value of '1' has special meaning:

> or one, in which case the specified format code is applied to all result columns (if any)

We then set a single column format code based on whether the connection
(or query) is set to binary.


Fixes #3487

* fix(pg): use a Buffer when parsing binary

The call to parseArray was not working as expected because the value was
being sent as a string instead of a Buffer. The binary parsers in
pg-types all assume the incoming value is a Buffer.
2025-06-19 15:37:04 -05:00
Brian Carlson
cd877a5761 Publish
- pg-bundler-test@0.0.1
 - pg-cloudflare@1.2.6
 - pg-connection-string@2.9.1
 - pg-cursor@2.15.1
 - pg-esm-test@1.2.1
 - pg-native@3.5.1
 - pg-pool@3.10.1
 - pg-protocol@1.10.1
 - pg-query-stream@4.10.1
 - pg@8.16.1
pg-bundler-test@0.0.1 pg-cloudflare@1.2.6 pg-connection-string@2.9.1 pg-cursor@2.15.1 pg-esm-test@1.2.1 pg-native@3.5.1 pg-pool@3.10.1 pg-protocol@1.10.1 pg-query-stream@4.10.1 pg@8.16.1
2025-06-18 10:46:26 -05:00
Brian C
607efc1b6e
Bump engines since we do not test lower than 16 anymore (#3490) 2025-06-16 22:07:55 -05:00
Joan Miquel Torres
14dc8dd100
Use performance.now() instead of Date.now()... (#3483)
* Use performance.now() instead of Date.now()...

  * Wherever applicable (measuring performance, not time).
  * Failback to support node < 16.0.0 (perf_hook not globally exposed)
  * Failback to Date.now() for node < 8.5.0

  ✔ Tests passed with node > 16.0.0 (22.12.0)
  ✕ Couldn't pass with node prior 16.0.0 but not due to this changes.

https://nodejs.org/docs/latest-v8.x/api/perf_hooks.html#perf_hooks_performance_now
https://w3c.github.io/hr-time/

* Yarn prettier

* More lint fixes.

* Removed polyfill code for node <16

They are no longer supported:

https://github.com/brianc/node-postgres/pull/3483#issuecomment-2967119692
2025-06-14 16:38:51 -05:00
Brian C
8608fb84c8
fix: do not concatenate an array if passed to escapeLiteral. (#3489) 2025-06-14 16:36:32 -05:00
Tommy D. Rossi
114a03e887
Add package.json in exports (#3488) 2025-06-14 16:32:26 -05:00
Brian C
7ab5923fad
Redact input URL string to prevent console printing (#3486) 2025-06-13 22:59:32 -05:00
Henry Cai
6b016b37d4
fix(pg-cloudflare): use conditional export to support bundlers that don't know about cloudflare:sockets (#3482) 2025-06-12 09:31:57 -05:00
Johan Fagerberg
0ada72e608
docs: add maxLifetimeSeconds to Pool docs (#3484)
Wording taken from https://github.com/brianc/node-postgres/issues/3298#issuecomment-2305207256
2025-06-12 09:24:03 -05:00
dependabot[bot]
03642abec1
build(deps-dev): bump semver from 4.3.6 to 7.7.2 (#3477)
Bumps [semver](https://github.com/npm/node-semver) from 4.3.6 to 7.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v4.3.6...v7.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-version: 7.7.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 12:40:05 -05:00
dependabot[bot]
a4888ee028
build(deps-dev): bump eslint-plugin-promise from 6.2.0 to 7.2.1 (#3479)
Bumps [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise) from 6.2.0 to 7.2.1.
- [Release notes](https://github.com/eslint-community/eslint-plugin-promise/releases)
- [Changelog](https://github.com/eslint-community/eslint-plugin-promise/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-community/eslint-plugin-promise/compare/v6.2.0...v7.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-promise
  dependency-version: 7.2.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 12:39:52 -05:00
Herman J. Radtke III
411869df65
pool.end() resolves before the last pool.query() (#3461)
* Pass callback to client.end

* Add test for pool.end method

* fix: remove excessive _pulseQueue call

* fix: context problem

* fix: test resolve should be called when the last client is removed

* fix: wait for pool.end()

Because when you don't pass a callback to .end() it always returns a promise

* fix: handle idle timeout test data race

---------

Co-authored-by: Asadbek Raimov <asadbekraimov642@gmail.com>
2025-05-29 17:12:24 -05:00
Herman J. Radtke III
26ace0ac8f fix(pg-connection-string): remove .nyc_output 2025-05-27 09:32:54 -04:00
Ryan Staples
3e7bd2f681
Change instanceof(Date) to util.types.isDate(Date) (#2862)
* change instanceof to isDate

* use both methods to check for valid Date

* add test for PR 2862

* use only isDate(date) in place of instanceof Date

* Extend compatibility of `isDate` use back to Node 8

* Clean up test

---------

Co-authored-by: Charmander <~@charmander.me>
Reviewed-by: Charmander <~@charmander.me>
2025-05-26 22:37:13 +00:00
Noritaka Kobayashi
9cf2184d09
refactor: remove unused import & fix typos in docs (#3471) 2025-05-25 11:30:11 -05:00
Noritaka Kobayashi
c9353acbc0
chore: fix typos in README (#3470) 2025-05-25 09:56:54 -05:00
Brian C
26fa32c133
Update theme.config.js (#3468) 2025-05-15 19:40:03 -05:00
Lorentz Lasson
a47c480055 fix sslcompat remains 2025-05-14 13:50:38 -04:00
Brian Carlson
abff18d6f9 Publish
- pg-connection-string@2.9.0
 - pg-cursor@2.15.0
 - pg-esm-test@1.2.0
 - pg-native@3.5.0
 - pg-pool@3.10.0
 - pg-protocol@1.10.0
 - pg-query-stream@4.10.0
 - pg@8.16.0
pg-connection-string@2.9.0 pg-cursor@2.15.0 pg-esm-test@1.2.0 pg-native@3.5.0 pg-pool@3.10.0 pg-protocol@1.10.0 pg-query-stream@4.10.0 pg@8.16.0
2025-05-12 11:49:59 -05:00
Brian Carlson
e43d4b7eb6 Update changelog 2025-05-12 11:49:41 -05:00
Herman J. Radtke III
e8fde07227
chore: document keepAliveInitialDelayMillis option (#3460) 2025-05-12 01:15:55 -05:00
Brian C
27f34c6aee
Bump libpq & nan version dep for node24 compat (#3462) 2025-05-12 01:07:01 -05:00
maltewirz
e30b41d481
Update connecting.mdx (#3266)
Changes tested myself and inspired by documention on aws rds signer https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-rds-signer/
2025-05-10 22:23:27 -05:00
Herman J. Radtke III
6be857e9d3 chore(pg-connection-string): use tsx for tests 2025-05-06 06:49:24 -04:00
dependabot[bot]
9bfc967e91
build(deps-dev): bump eslint-config-prettier from 9.1.0 to 10.1.2 (#3453)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.1.0 to 10.1.2.
- [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/v9.1.0...v10.1.2)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 12:33:50 -05:00
dependabot[bot]
79351af32e
build(deps-dev): bump eslint-plugin-prettier from 5.2.5 to 5.2.6 (#3455)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.2.5 to 5.2.6.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.5...v5.2.6)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.2.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 12:33:37 -05:00
dependabot[bot]
52ec1293f2
build(deps-dev): bump @cloudflare/vitest-pool-workers (#3456)
Bumps [@cloudflare/vitest-pool-workers](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-pool-workers) from 0.8.12 to 0.8.23.
- [Release notes](https://github.com/cloudflare/workers-sdk/releases)
- [Changelog](https://github.com/cloudflare/workers-sdk/blob/main/packages/vitest-pool-workers/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/workers-sdk/commits/@cloudflare/vitest-pool-workers@0.8.23/packages/vitest-pool-workers)

---
updated-dependencies:
- dependency-name: "@cloudflare/vitest-pool-workers"
  dependency-version: 0.8.23
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 12:33:24 -05:00
Brian C
2647f7ecaf
Create README.md (#3451) 2025-04-30 20:20:35 -05:00
Brian C
980752ce00
Hard-pin 3rd party dependencies (#3450)
Co-authored-by: Brian Carlson <brian.carlson@getcruise.com>
2025-04-29 13:34:14 -05:00
francesco
264e30f424
docs: require to import (#3448) 2025-04-29 11:06:32 -05:00
Davide Violante
f528433e9d
chore: minor eslint fixes, reenable no-unused vars (#3445) 2025-04-28 11:59:26 -05:00
Davide Violante
93aa1ba2f1
chore: replace var with const in md files (#3446) 2025-04-28 09:54:46 +00:00