GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: sync upstream/master + bump @supabase/pg to 8.21.0, pg-protocol to 1.13.1 by avallete · Pull Request #31 · supabase/node-postgres

Conversation

@avallete

@avallete avallete commented May 12, 2026

Copy link
Copy Markdown
Member

What

Pulls in 16 upstream commits accumulated since the [email protected] tag we synced to in #29. Bumps:

  • @supabase/pg-protocol → 1.13.1 (patch — only buffer-reader.ts saw a one-line change plus tsconfig + eslint config tweaks; no API change)
  • @supabase/pg → 8.21.0 (minor — adds public client.getTransactionStatus() method, per semver)

Why

Upstream has not published a new tag since [email protected], so this picks up unreleased upstream master rather than aligning with a published tag like #29 did. Worth shipping anyway because of:

  • 7674d8c2 Fix pg prototype pollution via server supplied column names (Fix pg prototype pollution via server supplied column names brianc/node-postgres#3656) — security fix, primary motivation.
  • 939725e0 feat: add new client.getTransactionStatus() method (feat: add new client.getTransactionStatus() method brianc/node-postgres#3645) — new public API.
  • 7ba4efe2 Handle SASL SCRAM server error responses (Handle SASL SCRAM server error responses brianc/node-postgres#3521) — robustness fix in lib/crypto/sasl.js.
  • 3bb9fbaa Add error handling for non-function callback (Add error handling for non-function callback brianc/node-postgres#3561) + 0f56b76d Throw TypeError instead of base Error when query callback is not a function — better error semantics.
  • 1025d12b Node JS 26 (Node JS 26 brianc/node-postgres#3667) — adds Node 26 to the test matrix (we don't run that matrix here, but the version bump in pg/package.json engines field is preserved).
  • 02367b83 Upgrade eslint and typescript (Upgrade eslint and typescript brianc/node-postgres#3662) — replaces .eslintrc with eslint.config.mjs (flat config), bumps @typescript-eslint/* to ^8, eslint to ^10, typescript to ^6 in root devDependencies.
  • Various docs / tests / dependabot bumps.

How (merge mechanics)

A plain git merge upstream/master resolved cleanly with one trivial conflict: upstream modified the .github/workflows/ci.yml file we previously deleted. Kept it deleted (the deploy-pg.yml + deploy-pg-protocol.yml workflows on master remain the publish path; we don't run upstream's test matrix).

All five fork patches auto-merged with no conflict because upstream's edits were in different files or different hunks:

Fork patch Upstream changed same file? Outcome
@supabase/* rebrand (root + pg + pg-protocol package.json) Yes (no version bump) Auto-merged
Sub-package URL restorations (cloudflare, connection-string, cursor, native, pool, query-stream) Yes (no URL change) Auto-merged
maxResultSize in pg/lib/connection.js No Untouched
maxResultSize in pg/lib/client.js Yes (added getTransactionStatus in different hunk) Auto-merged
maxResultSize + connection back-ref in pg/lib/native/client.js Yes (added native getTransactionStatus in different hunk) Auto-merged
maxResultSize in pg/lib/native/query.js No Untouched
maxResultSize in pg/lib/defaults.js No Untouched
maxResultSize-tests.js No Untouched
Parser try/catch in pg-protocol/src/parser.ts No (upstream only changed buffer-reader.ts) Untouched
pg/README.md npm install @supabase/pg Yes (different line) Auto-merged
Root package.json packageManager field Yes (eslint devDeps section) Auto-merged

Validation

  • packages/pg-protocol: npm install --workspaces=false --prefix . + npm run build succeeds → 74 unit tests pass.
  • packages/pg: node --check passes on every modified lib/*.js, lib/native/*.js, lib/crypto/sasl.js (the upstream-changed file).
  • npm publish --dry-run succeeds for both packages, producing the expected supabase-pg-protocol-1.13.1.tgz and supabase-pg-8.21.0.tgz.
  • Full pg integration tests will run post-publish via postgres-meta CI, same pattern as chore: upgrade fork to upstream [email protected] #29.

⚠️ Merge order

This PR must merge AFTER #30 (fix(ci): make deploy workflows self-bootstrapping).

If merged first, the deploy workflows on the merge commit will hit the same Couldn't find any versions for "@supabase/pg-protocol" that matches "^1.13.1" install failure that broke the post-#29 publishes (the chicken-and-egg fixed by #30).

After #30 lands and this PR merges, both deploy-pg.yml and deploy-pg-protocol.yml will trigger automatically (both packages/pg/** and packages/pg-protocol/** paths changed) and successfully publish @supabase/[email protected] and @supabase/[email protected] to npm.

Test plan

  • PR fix(ci): make deploy workflows self-bootstrapping #30 merged first
  • PR merged via "Create a merge commit" (preserves history, no force-push, same as chore: upgrade fork to upstream [email protected] #29)
  • Deploy pg-protocol package workflow runs and succeeds → @supabase/[email protected] on npm
  • Deploy pg package workflow runs and succeeds → @supabase/[email protected] on npm
  • Bump postgres-meta to @supabase/[email protected] to confirm full integration tests pass downstream

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
brianc and others added 17 commits March 4, 2026 18:49
@brianc
Docs updates (brianc#3622)
c6028a8
* Add docs for

* Add docs for max uses

* Clean up casing and grammar in comments

* Add more docs on pool sizing

* Grammar

* Add better footer

* Final updates
@danieldiekmeier
Don't encourage people to use on('connect') for setup anymore (brianc…
412dc88
…#3623)
@brianc
Update readme text slightly (brianc#3637)
32ec730
* Update readme text slightly

* Better words
@brianc
Update the sub-readme (brianc#3638)
e7fa94a
@brianc
Cleanup tests (brianc#3640)
c78b302
@The-Alchemist
Update Medplum logo in README (brianc#3659)
4e6bdf0
@The-Alchemist
remove deprecated 'version' attribute from docker-compose.ymla (brian…
77cb771
…c#3660)

Removes the warning:

```
WARN[0000] .../node-postgres/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
```

The `version` attribute has been removed as of v2 of the docker compose plugin (https://github.com/compose-spec/compose-spec/blob/main/spec.md#version-top-level-element-obsolete).
@charmander
docs: Fix changelog entry’s spelling
341cb60
@hyperair
Upgrade eslint and typescript (brianc#3662)
02367b8
* Upgrade eslint and typescript

* eslint: Port config to new flat config format

* Fix preserve-caught-error eslint warning

* Drop unused eslint-disable-line

* pg-cloudflare: Fix typescript errors

- rootDir defaults have changed, so we need to specify it manually now
- baseUrl is no longer supported
- types no longer loads everything in @types by default, so we have to specify
  that we want node types
- Pin @types/node to 16.* because we support node16 and above

* pg-cloudflare: Workaround typescript bug regarding Buffer.from

Fixes the following error:

    % yarn build
    yarn run v1.22.19
    $ tsc --build
    packages/pg-cloudflare/src/index.ts:156:29 - error TS2769: No overload matches this call.
      The last overload gave the following error.
        Argument of type 'ArrayBuffer | Uint8Array<ArrayBufferLike>' is not assignable to parameter of type 'WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string; }'.
          Type 'ArrayBuffer' is not assignable to type 'WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string; }'.

    156     const hex = Buffer.from(data).toString('hex')
                                    ~~~~

      node_modules/@types/node/buffer.buffer.d.ts:83:13
         83             from(
                        ~~~~~
         84                 str:
            ~~~~~~~~~~~~~~~~~~~~
        ...
         89                 encoding?: BufferEncoding,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         90             ): Buffer<ArrayBuffer>;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        The last overload is declared here.

    Found 1 error.

See microsoft/TypeScript#63447 for more info

* Fix tsconfig for pg-protocol and pg-query-stream

* Standardize @types/node on ^16

Fixes the following typescript error:

    node_modules/typescript/lib/lib.esnext.intl.d.ts:26:135 - error TS2552: Cannot find name 'DateTimeRangeFormatPart'. Did you mean 'DateTimeFormatPart'?

    26         formatRangeToParts(startDate: FormattableTemporalObject | Date | number, endDate: FormattableTemporalObject | Date | number): DateTimeRangeFormatPart[];

* pg-protocol: Narrow type of BufferReader.encoding

`BufferReader.encoding` to `BufferEncoding` from `string` to match the new
signature of `Buffer.toString`.

* pg-query-stream: Bump eslint-plugin-promise to fix unmet peer dependency

* Run eslint on its own config
@cesco69
Node JS 26 (brianc#3667)
1025d12
* chore: update libpq to 1.11.0

* chore: add node 26
@hjr3
Fix pg prototype pollution via server supplied column names (brianc#3656
7674d8c
)

* fix(pg-connection-string): prototype pollution via query strings

* fix(pg): prototype pollution via server-supplied column names

Fixes brianc#3654
@dependabot
build(deps-dev): bump eslint-plugin-prettier from 5.5.1 to 5.5.5 (bri…
effc3f6
…anc#3648)

Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.5.1 to 5.5.5.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/eslint-plugin-prettier@v5.5.1...v5.5.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@panga @brianc
feat: add new client.getTransactionStatus() method (brianc#3645)
939725e
* feat: add new client.getTransactionStatus() method

Adds a new public method to retrieve the current transaction status
of the client connection. Returns 'I' (idle), 'T' (in transaction),
'E' (error/aborted), or null (initial state/native client).

The transaction status is tracked from PostgreSQL's ReadyForQuery
message after each query completes.

Native client returns null as it does not support this feature yet.

* feat: add native client support for getTransactionStatus()

- Add getTransactionStatus() to pg-native using libpq's
  PQtransactionStatus() with status mapping (0->I, 2->T, 3->E)
- Update pg native client wrapper to delegate to pg-native
- Remove native guard from txstatus tests (now runs in both modes)
- Bump libpq to ^1.10.0 for transactionStatus() binding support

* docs

* Tests

* fix: docs

* clear docs

---------

Co-authored-by: Brian C <[email protected]>
@v0idpwn
Handle SASL SCRAM server error responses (brianc#3521)
7ba4efe
Add proper error handling for SCRAM-SERVER-FINAL-MESSAGE error attribute.
The SCRAM specification allows servers to return error messages via the 'e'
attribute in the server final message. Currently, these errors are ignored
and authentication fails later during signature verification.

Postgres typically doesn't return this error (see [here](https://github.com/postgres/postgres/blob/2047ad068139f0b8c6da73d0b845ca9ba30fb33d/src/backend/libpq/auth-scram.c#L423)
on why), but poolers, or other applications using the postgres protocol might,
and it's part of the SCRAM spec, so it probably makes sense for node-postgres
to handle it.

Aligns behaviour with psql, postgrex, and somewhat with pgJDBC
(pgJDBC in particular is stricter with scram errors).

For reference:

- libpq handling it: https://github.com/postgres/postgres/blob/2047ad068139f0b8c6da73d0b845ca9ba30fb33d/src/interfaces/libpq/fe-auth-scram.c#L708
@dotob
Add error handling for non-function callback (brianc#3561)
3bb9fba
* Add error handling for non-function callback

catch callback not a function earlier to get a proper callstack. later when executing the callback the stack may be wrong/insufficient.

* fix: lint

* fix: lint

* fix: test

* feat: add test for new error
@charmander
Throw TypeError instead of base Error when query callback is not …
0f56b76
…a function

& style fix. Follow-up to brianc#3561.
@avallete
chore: sync upstream/master + bump @supabase/pg to 8.21.0, pg-protoco…
19d74b8
…l to 1.13.1

Pulls in 16 upstream commits since the [email protected] tag we synced to in #29.
Most notable:

- 7674d8c Fix pg prototype pollution via server supplied column names
  (brianc#3656) — security fix, primary motivation for this sync.
- 939725e feat: add new client.getTransactionStatus() method (brianc#3645)
- 7ba4efe Handle SASL SCRAM server error responses (brianc#3521)
- 3bb9fba Add error handling for non-function callback (brianc#3561)
- 0f56b76 Throw TypeError instead of base Error when query callback is
  not a function
- 1025d12 Node JS 26 (brianc#3667)
- 02367b8 Upgrade eslint and typescript (brianc#3662) — replaces .eslintrc
  with eslint.config.mjs, bumps @typescript-eslint/* to ^8, eslint to
  ^10, typescript to ^6 in root devDependencies.
- Various docs / tests / dependabot bumps.

Merge mechanics: a plain `git merge upstream/master` resolved cleanly
with one trivial conflict — upstream modified the .github/workflows/
ci.yml file we previously deleted. We kept it deleted (the
deploy-pg.yml + deploy-pg-protocol.yml workflows on master remain the
publish path; we don't run upstream's test matrix). All five fork
patches (rebrand + CI workflows + maxResultSize + parser try/catch +
URL/README/packageManager restorations) auto-merged without conflict
because upstream's edits were in different files or different hunks.

Versioning: upstream has not published a new tag since [email protected], so
this is a pick-up of unreleased upstream master rather than an
align-with-upstream-tag bump like #29 was. Chose:

- @supabase/[email protected] (patch — only buffer-reader.ts saw a
  one-line change plus tsconfig + eslint config tweaks; no API change)
- @supabase/[email protected] (minor — adds public client.getTransactionStatus
  method per semver)
@avallete
avallete requested a review from soedirgo May 12, 2026 09:44
soedirgo
soedirgo approved these changes May 12, 2026
View reviewed changes
@avallete
avallete merged commit 6868812 into master May 12, 2026
@avallete avallete mentioned this pull request May 13, 2026
chore: sync upstream/master + bump @supabase/pg to 8.21.1 #34
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@soedirgo soedirgo soedirgo approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

12 participants

@avallete @soedirgo @brianc @danieldiekmeier @The-Alchemist @charmander @hyperair @cesco69 @hjr3 @panga @v0idpwn @dotob
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.