Skip to content

docs: restructure the README and move the API reference to docs/api.md - #141

Merged
okomarov merged 5 commits into
mainfrom
docs/readme-restructure
Oct 18, 2026
Merged

okomarov merged 5 commits into
mainfrom
docs/readme-restructure

Conversation

@okomarov

@okomarov okomarov commented Oct 18, 2026 •

Copy link
Copy Markdown

The README was 1,783 lines: the fork pitch, the fixed-issues table and the whole inherited API reference, which had drifted from 4.5.0. It is now about 240 lines, written for three readers: someone switching from Postgres.js, someone starting fresh, and a code assistant that needs the exact package name and what differs from the upstream API.

README, in order: what the package is and which name to import; the Postgres.js callout with the logo (served from this repo); the features the fork adds; the fixed upstream issues, grouped as correctness (19), reliability (35) and performance; getting started by switching (the migrate tool, the Codemod route or the manual alias, then the Sentry preload and every 4.x behaviour change) or by a fresh install; compatibility; security (how releases are published and verified, no dependencies, the diff against 3.4.9); documentation links.

docs/api.md: the reference, moved verbatim in the first commit, then checked against parseOptions, the codes thrown in src/ and the 4.x changelog:

  • the options block had wrong defaults and was missing backoff, keep_alive, max_pipeline, publications, onnotify, onclose and some ssl modes;
  • the pool section said 45 to 90 minutes, and the timeout section said connections never close;
  • AUTH_TYPE_NOT_IMPLEMENTED is never thrown; INVALID_TRANSACTION_NAME and 57014 were missing; three messages didn't match the code;
  • listen's unlisten, subscribe's result, cancel's host and options, which handles are disposable, and the env/URL rules were undocumented.

Sections keep upstream's order, so the layout stays familiar; The Connection Pool links docs/lifecycle.md for the states a connection and a handle move through.

Kept stable: the #fixed-postgresjs-issues, #switching-from-postgresjs and #upgrading-to-400 anchors, which ROADMAP, CONTRIBUTING, the changelog, the switching tool's output and links already posted elsewhere use. The two changelog links into moved sections now point at docs/api.md.

Package: docs/api.md ships in the tarball, so tools reading node_modules get the fork's reference; the tarball stays about the same size. The Deno build no longer writes the ignored deno/README.md.

Covers the README item of #64.

The reference moves verbatim, with its own contents list. Headings keep their
text, so README anchors such as #parameter-types become docs/api.md anchors of
the same name; the two changelog links that pointed at them follow.
Checked against parseOptions, the error codes thrown in src/ and the 4.x
changelog:

- The options block had wrong defaults (max_lifetime, idle_timeout, types,
  max on Workers) and left out backoff, keep_alive, max_pipeline,
  publications, onnotify, onclose and the ssl modes. The pool section said
  45 to 90 minutes and the timeout section said connections never close.
- Environment variables list every option read as PG<NAME> or ?name=, the
  false/disable rule and PGTARGETSESSIONATTRS; PGMAX points at #129.
- connect_timeout, backoff, idle_timeout and max_lifetime are described once,
  under Connection timeout.
- Error codes: AUTH_TYPE_NOT_IMPLEMENTED is never thrown and is dropped;
  INVALID_TRANSACTION_NAME and 57014 are added; three messages now match
  the code.
- listen returns unlisten, subscribe's result and status updates, the
  savepoint and COMMIT rollback behaviour, cancel's host and options, and
  which handles are disposable are documented.
- Stale Node and PostgreSQL version links point at current docs. Sections
  keep upstream's order; The Connection Pool links lifecycle.md for the
  states a connection and a handle move through.
@okomarov
okomarov force-pushed the docs/readme-restructure branch 3 times, most recently from 224954f to 84af780 Compare October 18, 2026 12:32
…DME for Deno

docs/api.md goes into the npm tarball, so tools and assistants reading
node_modules see the fork's API rather than upstream's. The tarball stays
about the same size, as the README lost what the reference gained.

The Deno build no longer writes deno/README.md. The file is ignored, isn't
published, pointed at a master branch that doesn't exist, and its regex
would have stopped matching the new README.
@okomarov
okomarov force-pushed the docs/readme-restructure branch 2 times, most recently from 6f430ed to 3129dff Compare October 18, 2026 13:12
Center the logo and test badge near the opening. Lead with correctness
fixes, fewer hangs and crashes, pool monitoring, faster queries and Vercel
Fluid Compute support, grounded in upstream issues and pull requests.

Separate new-project installation from codemod migration. Explain alias
installation for Drizzle, Kysely and tracing, and make clear that the
codemod reports Sentry but its preload must be added manually. Put security
and compatibility before detailed evidence, and remove repeated setup and
upgrade prose. Distinguish hosted Supabase Edge use from CI coverage.

Move the issue catalogue and upgrade details to linked guides, preserve
existing entry anchors, and correct the stale COPY migration note.

Validation: local links and legacy anchors, preserved issue references,
GitHub Markdown rendering, example syntax, section order and diff checks.
@okomarov
okomarov force-pushed the docs/readme-restructure branch from 3129dff to 1e33c55 Compare October 18, 2026 13:35
Ignore Markdown paths on branch pushes and pull requests while preserving
client/codemod routing. Mixed documentation and code changes still run the
relevant workflow; release tags retain all tests and publishing gates.
Update the contributor guide to describe the triggers.

Validated both workflows with actionlint 1.7.12 and checked 18 path-filter
scenarios, unchanged jobs and unchanged release-tag triggers.
@okomarov
okomarov merged commit 28d5b46 into main Oct 18, 2026
18 checks passed
@okomarov
okomarov deleted the docs/readme-restructure branch October 18, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant