Repository navigation
feat(server-utils): Add the orchestrion config for @neondatabase/serverless - #25176
Conversation
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8cc649c. Configure here.
size-limit report 📦
|
JPeer264
left a comment
There was a problem hiding this comment.
LGTM, just one comment. Integration tests will come in a later PR in the stack
| // `_pulseQueryQueue`), decoy `query` methods on the pool and protocol classes, the `neon()` | ||
| // factory with its nested HTTP executor, and the connection-string resolver. | ||
| const body = ` | ||
| var Qx=class{query(e){this._send(e)}}; |
There was a problem hiding this comment.
l/m: Couldn't we directly use the body from their exports? This might break in the next version without us knowing and we also have to manually keep this updated, which we probably miss.
8cc649c to
fb0610b
Compare
…erless The package ships two minified esbuild bundles with mangled identifiers that differ between CJS and ESM, so the name-based matchers find nothing. The selectors key on property names and string literals that survive minification: pg's _pulseQueryQueue sibling for Client.prototype.query, the Neon-Connection-String header literal for the HTTP executor, and the resolvedURL return shape for the connection resolver. The config is not registered yet; the integration that subscribes to its channels registers it. A test transforms and executes the published bundles, so a Neon release that reshapes them fails CI. Refs #25144 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fb0610b to
e20131f
Compare
Adds `neonIntegration` for `@neondatabase/serverless`. Both drivers emit `db` spans with the pg span shape: the WebSocket `Client`/`Pool` and the HTTP `neon()` function, including Drizzle's `neon-http` and `neon-serverless` adapters. Subscribes to the channels from #25176 and registers the config, so build-time bundler plugins get the same coverage as the runtime hook. - The HTTP span wraps the executor inside `neon()`, not the lazy query promise, so `transaction()` batches get one span instead of one per statement plus one for the batch. - Connection attributes for HTTP come from the connection resolver, which runs inside the query span. The executor itself never sees the connection string. - `db.connection_string` is deprecated and not emitted. End-to-end tests follow in #25177. Stacked on #25176. Fixes #25144 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Adds the orchestrion config for
@neondatabase/serverless, so the bundler plugins and the runtime hook can inject channels into it. The integration that subscribes to those channels follows in #25164 and registers the config there, which keeps every layer's CI green on its own.The package ships two minified esbuild bundles with mangled identifiers that differ between CJS and ESM, so the name-based matchers find nothing. The selectors key on property names and string literals that survive minification: pg's
_pulseQueryQueuesibling method forClient.prototype.query, theNeon-Connection-Stringheader literal for the HTTP executor, and theresolvedURLreturn shape for the connection resolver.@neondatabase/serverlessbecomes a dev dependency of server-utils for a test that transforms and executes the published bundles, so a Neon release that reshapes them fails CI. The version range is capped at<2.Stacked on #25163.
Refs #25144