From 4a158ef48043ae58c3ea57b212c0a1f4d6ed45e9 Mon Sep 17 00:00:00 2001 From: mujib77 Date: Sun, 12 Apr 2026 20:28:18 +0530 Subject: [PATCH 1/3] fix: preserve query string in config.options when parsing connection URL --- packages/pg-connection-string/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/pg-connection-string/index.js b/packages/pg-connection-string/index.js index 29ffeafd7..184ce3376 100644 --- a/packages/pg-connection-string/index.js +++ b/packages/pg-connection-string/index.js @@ -40,6 +40,9 @@ function parse(str, options = {}) { for (const entry of result.searchParams.entries()) { config[entry[0]] = entry[1] } + if (result.search) { + config.options = result.search.slice(1) // slice off the leading '?' + } config.user = config.user || decodeURIComponent(result.username) config.password = config.password || decodeURIComponent(result.password) From 84ad1049ae2bf2da9788ba7374a120e80f9b0622 Mon Sep 17 00:00:00 2001 From: mujib77 Date: Sun, 12 Apr 2026 22:35:26 +0530 Subject: [PATCH 2/3] fix: remove inline comment to pass lint --- packages/pg-connection-string/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pg-connection-string/index.js b/packages/pg-connection-string/index.js index 184ce3376..60971fff0 100644 --- a/packages/pg-connection-string/index.js +++ b/packages/pg-connection-string/index.js @@ -41,7 +41,7 @@ function parse(str, options = {}) { config[entry[0]] = entry[1] } if (result.search) { - config.options = result.search.slice(1) // slice off the leading '?' + config.options = result.search.slice(1) } config.user = config.user || decodeURIComponent(result.username) From 551e9a7fe81e5d1fa910653c9e83de6b71e1f373 Mon Sep 17 00:00:00 2001 From: mujib77 Date: Sun, 12 Apr 2026 22:43:23 +0530 Subject: [PATCH 3/3] fix: remove trailing space --- packages/pg-connection-string/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pg-connection-string/index.js b/packages/pg-connection-string/index.js index 60971fff0..9de8422c3 100644 --- a/packages/pg-connection-string/index.js +++ b/packages/pg-connection-string/index.js @@ -41,7 +41,7 @@ function parse(str, options = {}) { config[entry[0]] = entry[1] } if (result.search) { - config.options = result.search.slice(1) + config.options = result.search.slice(1) } config.user = config.user || decodeURIComponent(result.username)