v4.7.0
Highlights
-
@byline/core/@byline/db-postgres— the database-adapter seam was hardened ahead of a second adapter. The dialect-independent storage machinery —flattenFieldSetData,restoreFieldSetData,resolveStoreTypes, theUnifiedFieldValue/FlattenedFieldValuerow types, and the store-column manifest data (storeColumnManifest,storeTableNames) — now lives in@byline/coreand is exported from its root, so anyIDbAdapterimplementation can consume the same flatten/reconstruct pipeline and column manifest without depending on the Postgres adapter.@byline/db-postgreskeeps its own SQL generation (storeSelectList,pgNullCast) and gained anormalizeRowseam that canonicalises raw driver rows before they reach the shared reconstruct code. This move is non-breaking: these symbols were internal to@byline/db-postgresand were never re-exported from its package root, so no existing import path changes. -
monorepo — a new private, unpublished
@byline/db-conformancepackage holds a parameterised behavioural conformance suite that anyIDbAdaptercan run against its own test database.@byline/db-postgresnow runs its storage, audit, counters, and admin integration tests through that suite (tests/conformance.integration.test.ts) with no coverage dropped or weakened. It is the correctness gate for the forthcoming second adapter.
Bug Fixes
-
@byline/db-postgres— closed a race inensureCounterGroup. Two processes creating the same brand-new counter sequence concurrently could both pass Postgres'sCREATE SEQUENCE IF NOT EXISTSexistence check and race on the catalog insert, surfacing a duplicate-object error (SQLSTATE23505) despite theIF NOT EXISTS. The adapter now absorbs that specific error as success, leaving every other error path untouched. -
@byline/db-postgres— the hand-writtensql/upgrade scripts now enforce a canonical ownership guard. When one of the numberedsql/scripts was applied as a superuser rather than the application's database role, any table it created was left owned by that superuser, and the running server (which connects as the app role) then hitpermission denied. Everysql/script that creates a table now reassigns ownership of mis-owned public objects back to the database owner before commit, and a CI test fails the build if a table-creating script omits the guard. This matters to self-hosters who apply the numberedsql/scripts by hand.
Chores
-
@byline/core—UnionRowValueis now a deprecated alias ofUnifiedFieldValue. The two were byte-identical row shapes; the alias keeps existing references compiling whileUnifiedFieldValuebecomes the single canonical name. Itsfile_sizetype widened tonumber | string | nullto match what the driver actually returns for aBIGINTcolumn. No action required. -
monorepo — refreshed the storage benchmark sweep (2026-07-21) and realigned the benchmark harness with the current storage APIs. Internal tooling only; no consumer-facing change.
All other @byline/* packages bumped to 4.7.0 in lockstep with no behavioural changes this cycle.