53 Commits

Author SHA1 Message Date
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
2025-06-18 10:46:26 -05:00
Brian C
7ab5923fad
Redact input URL string to prevent console printing (#3486) 2025-06-13 22:59:32 -05:00
Herman J. Radtke III
26ace0ac8f fix(pg-connection-string): remove .nyc_output 2025-05-27 09:32:54 -04: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
2025-05-12 11:49:59 -05:00
Brian C
27f34c6aee
Bump libpq & nan version dep for node24 compat (#3462) 2025-05-12 01:07:01 -05:00
Herman J. Radtke III
6be857e9d3 chore(pg-connection-string): use tsx for tests 2025-05-06 06:49:24 -04:00
Davide Violante
93aa1ba2f1
chore: replace var with const in md files (#3446) 2025-04-28 09:54:46 +00:00
Brian C
9e7a5d97cf
Replace all usages of var with let / const - eslint auto applied (#3444) 2025-04-27 11:50:33 -05:00
Brian Carlson
56e2862577 Publish
- pg-cloudflare@1.2.5
 - pg-connection-string@2.8.5
 - pg-cursor@2.14.5
 - pg-esm-test@1.1.5
 - pg-native@3.4.5
 - pg-pool@3.9.5
 - pg-protocol@1.9.5
 - pg-query-stream@4.9.5
 - pg@8.15.5
2025-04-23 13:48:25 -05:00
Brian Carlson
2919f28d31 Manually advance patch versions to re-align with lerna 2025-04-23 13:48:13 -05:00
Meghan Denny
bbc84b2690 pg-connection-string: fix 'parse' type signature 2025-04-23 10:43:34 -04:00
Brian Carlson
fb25f7bdb3 Publish
- pg-connection-string@2.8.1
 - pg-cursor@2.14.1
 - pg-esm-test@1.1.1
 - pg-pool@3.9.1
 - pg-query-stream@4.9.1
 - pg@8.15.1
2025-04-22 15:27:31 -05:00
Herman J. Radtke III
557716d1fa
fix(pg-connection-string): export default from esm wrapper (#3425)
Prior to v2.8.0, the parse function was the default when using import.
When esm compatibility was introduced in v2.8.0, there was not default
specified. This broke existing code that relied on that default.

Fixes #3424
2025-04-22 15:24:48 -05:00
Brian Carlson
9ec9e5f58d Publish
- pg-cloudflare@1.2.0
 - pg-connection-string@2.8.0
 - pg-cursor@2.14.0
 - pg-esm-test@1.1.0
 - pg-native@3.4.0
 - pg-pool@3.9.0
 - pg-protocol@1.9.0
 - pg-query-stream@4.9.0
 - pg@8.15.0
2025-04-22 10:55:24 -05:00
Brian C
940479bc4b
Add esm exports (#3423)
* build: add esm exports

* fix: add defaults as per arethetypeswrong report

* fix: add missing types

* lint

* Fix broken tests

* Add (failing) test for esm compat

* Begin moving files to proper extension and adding tests

* Add tests for connection-string and fix cloudflare module type and esm compat

* Add query-stream and cursor as esm exports

* Update PR copilot review

* Publish

 - pg-cloudflare@1.1.2-alpha.0
 - pg-connection-string@2.7.1-alpha.0
 - pg-cursor@2.13.2-alpha.0
 - pg-esm-test@1.0.1-alpha.0
 - pg-native@3.3.1-alpha.0
 - pg-pool@3.8.1-alpha.0
 - pg-protocol@1.8.1-alpha.0
 - pg-query-stream@4.8.2-alpha.0
 - pg@8.14.2-alpha.0

* More cf compat work

* Publish

 - pg-cloudflare@1.1.2-alpha.1
 - pg-cursor@2.13.2-alpha.1
 - pg-esm-test@1.0.1-alpha.1
 - pg-pool@3.8.1-alpha.1
 - pg-query-stream@4.8.2-alpha.1
 - pg@8.14.2-alpha.1

* Add more cf compat and update tests

* Make tests pass - update exports for esm

* Use env vars for test connection in cf tests

* Fix lint

* Fit vitest into existing legacy framework

* Skip worker tests on node below 18

* Revert doc changes for now

* Remove legacy worker test in favor of vitest

---------

Co-authored-by: Luca Ban <mesqueeb@users.noreply.github.com>
2025-04-22 10:53:22 -05:00
Patrick Malouin
81ec0635fc
feat(pg-connection-string): get closer to libpq semantics for sslmode
Allows user to change the semantics of `sslmode` to be as close as possible to libpq semantics. The opt in can be enabled using `useLibpqCompat` parsing option or the non-standard `uselibpqcompat` query string parameter.

---------

Co-authored-by: Charmander <~@charmander.me>
Co-authored-by: Herman J. Radtke III <herman@hermanradtke.com>
2025-04-20 08:13:33 -04:00
Alex Anderson
9b510373a6
eslint: enable recommended ruleset (#3263) 2025-04-12 08:17:33 +00:00
Herman J. Radtke III
5a8b1a7d24 feat(pg-connection-string): ClientConfig helper functions
Two new functions are introduced to make it easy for TypeScript
users to use a PostgresSQL connection string with pg Client.

Fixes #2280
2025-04-08 20:06:28 -04:00
Brian Carlson
92cb640fd3 Publish
- pg-connection-string@2.7.0
 - pg-cursor@2.12.0
 - pg-native@3.2.0
 - pg-pool@3.7.0
 - pg-protocol@1.7.0
 - pg-query-stream@4.7.0
 - pg@8.13.0
2024-09-17 10:08:42 -05:00
dependabot[bot]
54eb0fa216
Bump mocha and @types/mocha (#3273)
Bumps [mocha](https://github.com/mochajs/mocha) and [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha). These dependencies needed to be updated together.

Updates `mocha` from 3.4.2 to 10.5.2
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v3.4.2...v10.5.2)

Updates `@types/mocha` from 5.2.7 to 10.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
- dependency-name: "@types/mocha"
  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>
2024-07-25 12:20:59 -05:00
Alex Anderson
f2279f3529
pg-connection-string/test: remove unused var (#3243)
Co-authored-by: alxndrsn <alxndrsn>
2024-06-05 10:51:13 -05:00
Juan GP
0096856e2e
reorder user-password-host-port-database appearences (#3207) 2024-05-10 12:03:11 -05:00
Brian Carlson
a37a93bf79 Publish
- pg-connection-string@2.6.4
 - pg-cursor@2.10.5
 - pg-query-stream@4.5.5
 - pg@8.11.5
2024-04-02 15:26:02 -05:00
Brian C
95655fea0b
Revert "fix: conflict between browser URL object and Node URL object (#3061)" (#3188)
This reverts commit d21cc09556899b8038ec23613a801c19228637ca.
2024-04-02 15:23:53 -05:00
Brian Carlson
b03c071d2d Publish
- pg-connection-string@2.6.3
 - pg-cursor@2.10.4
 - pg-pool@3.6.2
 - pg-protocol@1.6.1
 - pg-query-stream@4.5.4
 - pg@8.11.4
2024-03-30 15:40:05 -05:00
Sehrope Sarkuni
b4bfd63f63
CI clean up to fix lint task and remove Windows / MacOS from matrix (#3122)
* Remove unused travis CI config

* Bump eslint and friends

* Fix lint errors after eslint upgrade

* Remove windows and macos from CI workflow as they are actually running linux

Removes the windows and macos matrix from the CI workflow as they were never actually setting
the OS. Both were running against the "ubuntu-latest" OS. Trying to actually use them would
not work either as neither windows or macos is supported for service containers. A different
means will be needed to test on those platforms. Until that's done, this removes those from
the matrix as we were simply running the same thing 3x for the same node versions.
2024-03-05 14:08:44 -06:00
Sebastien Stettler
d21cc09556
fix: conflict between browser URL object and Node URL object (#3061)
I am running this package using electron, what i noticed was that due to
the fact that the lines between node and browser environments become a
bit blurred, the URL class that was being used was the one defined by
the browser and not node. By making an explicit require it ensures the
correct Class is used.

While creating a test for this would be difficuilt i think adding an
eslint rule to stop using globally defined objects and require imports
instead would resolve issues like this in the future
2023-09-15 16:22:18 -05:00
Brian Carlson
a2a355a680 Publish
- pg-connection-string@2.6.2
 - pg-cursor@2.10.2
 - pg-query-stream@4.5.2
 - pg@8.11.2
2023-07-31 22:36:33 -05:00
Rafi Shamim
cf24ef28ee
pg-connection-string: avoid clobbering port from queryparams (#2833)
If the connection string is something like:
    postgresql://demo:password@/postgres?host=localhost&port=26258

Then the port from the query parameters should be used. Previously, the
parsing function would end up with a null port, and the default port
would end up being used by the connecetion package.
2023-07-21 11:57:02 -05:00
Brian Carlson
eaafac36dc Publish
- pg-cloudflare@1.1.1
 - pg-connection-string@2.6.1
 - pg-cursor@2.10.1
 - pg-pool@3.6.1
 - pg-query-stream@4.5.1
 - pg@8.11.1
2023-06-26 11:36:32 -05:00
Adam Jones
c38ecf3405
Fix connection string parsing for overriden hosts (#2977)
* Add failing test

* Fix test

This corresponds to what was line 48 previously, see https://github.com/brianc/node-postgres/pull/2971/files#diff-08a5e82487ebd9b43751630019753901fae0a111f8d009ad2e9d194445e96922L48

* Update packages/pg-connection-string/index.js

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

---------

Co-authored-by: Brian C <brian.m.carlson@gmail.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
2023-05-31 10:24:08 -05:00
Brian Carlson
14b840e96e Publish
- pg-cloudflare@1.1.0
 - pg-connection-string@2.6.0
 - pg-cursor@2.10.0
 - pg-query-stream@4.5.0
 - pg@8.11.0
2023-05-15 10:36:31 -05:00
Pete Bacon Darwin
f305419676 Use URL rather than url.parse() in pg-connection-string
Swapping the deprecated Node.js API for the modern cross
environment API.
2023-05-15 07:29:07 +01: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
2021-04-13 11:02:40 -05: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
Jakob Krigovsky
afb3bf3d43
Document sslmode connection string parameter (#2421) 2020-12-03 09:44:28 -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
7ffe68eba0 Publish
- pg-connection-string@2.4.0
 - pg-cursor@2.4.0
 - pg-protocol@1.3.0
 - pg-query-stream@3.3.0
 - pg@8.4.0
2020-10-04 14:26:29 -05:00
Benjie Gillam
c5445f0288 Fix metadata for pg-connection-string 2020-10-04 13:36:55 -05:00
Benjie Gillam
e421167d46 Add ssl=true into the test 2020-10-04 13:33:21 -05:00
Benjie Gillam
9cbea21587 Solve issues caused by config.ssl = true 2020-10-04 13:33:21 -05:00
Benjie Gillam
6be3b9022f Add support for ?sslmode connection string param 2020-10-04 13:33:21 -05:00
Brian M. Carlson
cf203431d6 Publish
- pg-connection-string@2.3.0
 - pg-cursor@2.3.0
 - pg-query-stream@3.2.0
 - pg@8.3.0
2020-07-09 10:35:06 -05:00
Brian C
da5d4efef4
Merge pull request #2216 from rafiss/pgoptions
Support options connection parameter
2020-07-08 12:16:03 -05:00
Brian M. Carlson
f3136a7d5d Publish
- pg-connection-string@2.2.3
 - pg-cursor@2.2.1
 - pg-pool@3.2.1
 - pg-protocol@1.2.4
 - pg-query-stream@3.1.1
 - pg@8.2.1
2020-05-15 18:33:34 -05:00
Rafi Shamim
06cdf3e9f0 Support options connection parameter
This supports the connection parameter documented here:
https://www.postgresql.org/docs/9.1/libpq-connect.html#LIBPQ-CONNECT-OPTIONS
2020-05-14 10:07:35 -04:00
Brian M. Carlson
8404434279 Upgrade mocha 2020-05-13 11:49:37 -05:00
Brian M. Carlson
3f5bc58a86 Publish
- pg-connection-string@2.2.2
 - pg-cursor@2.1.11
 - pg-pool@3.2.0
 - pg-query-stream@3.0.8
 - pg@8.1.0
2020-05-08 10:42:57 -05:00
Andreas Lind
abb1f34020 Fix repository field in package.json 2020-05-05 09:26:42 +02:00