Fixes authToken
overriding in sql
HTTP request.
Expose types
property on public HTTPQueryOptions type
Fix CONFIG.MD
documentation.
Capture stack traces in NeonDbError
, if Error.captureStackTrace
is available.
Allow authentication through JWT
by adding a authToken
property to the neon
HTTP connection options.
Expose all error information fields on NeonDbError
objects thrown when using the http fetch transport.
JSR README updates only.
Pass username (and database name) through URL decoder, so all usernames can successfully authorize.
Deprecate fetchConnectionCache
option, which is now always enabled. For neon
http fetch queries, enable setting options on individual queries within a batch transaction
(but note that the types still do not allow this).
Revert single per-region domain for WebSockets. Fix treatment of -pooler connection hosts.
Use a single (per-region) domain name for all connections to Neon databases. Intended to help with connection caching in V8. Passes the endpoint ID inside connection options for WebSocket connections.
Export a full ESM build to index.mjs -- don't just wrap the CJS code -- since no wrapping method seems reliable across bundlers and platforms. It's now important to only require
or only import
the package: if you mix, you'll get two copies of the code that don't share configuration changes.
Fixed index.d.mts.
Altered ESM re-export technique (in index.mjs) to work around WebPack issues. Added a re-export of TypeScript types (as index.d.mts) to fix the 'Masquerading as CJS' warning from https://arethetypeswrong.github.io/.
WebSocket connection errors are now reported properly via client.on('error', err => { /* ... */ })
.