Repository navigation
http connection parameters - #227
Merged
Merged
Conversation
…te all dependencies and make necessary changes
…m down httpQuery.ts
…or several dependencies)
…nction passwords for Client and Pool with pipelineConnect
jawj
marked this pull request as ready for review
September 25, 2026 10:41
pffigueiredo
approved these changes
Sep 30, 2026
pffigueiredo
left a comment
Contributor
There was a problem hiding this comment.
Should we also add docs about these:
- parseIntoClientConfig
- Function passwords for Client/Pool
…atch errors in password functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes which (amongst other benefits) support OIDC auth for Neon partners:
Options to the
neon(...)HTTP-client creation function, and to thetransactionandqueryfunctions, now support individual connection parameters:user(orusername),password,host(orhostname),port,databaseandconnectionString.These can be strings (or number, for
port) or sync or async functions to be resolved on every query. They can supplement, override parts of, or fully replace the first-argument connection string.So this still works:
const sql = neon(DATABASE_URL)But, for example, these now work too:
const sql = neon(DATABASE_URL_NO_PASSWORD, { password: () => getPasswordAsync() })const sql = neon({ user, password, host, database })const sql = neon({ connectionString: () => getConnectionString() }ClientandPoolnow support a sync or async function as thepasswordconnection parameter whenpipelineConnectis enabled (this previously caused an error).parseIntoClientConfigis exported, to support supplementing a connection string with a function to retrieve a token aspassword(recent changes exportedparseConnectionStringinstead, but this turns out to be more suitable).Smaller changes:
HTTP-related code has been refactored into its own folder, with
NeonDbErrorandNeonQueryPromisegetting their own files.application_nameis now used to report the driver identity and version to the proxy, unless overridden.Minor fixes to TLS handling, addressing two PRs.
A few minor dependency updates.