Skip to content

v3.15.1

Choose a tag to compare

@58bits 58bits released this 29 Jun 04:53

Bug Fixes

  • @byline/search-postgresmigrate() is now bundle-safe. It previously resolved its migrations/ directory via new URL('../migrations', import.meta.url) and read the numbered .sql files from disk at runtime. That works when the package runs from node_modules, but a production server bundle (Nitro / rollup, as produced by a TanStack Start build) inlines the package and rewrites import.meta.url to the bundle's own location — so the path resolved to .output/server/migrations, where the SQL was never emitted, and the boot-time migrate() threw ENOENT … scandir '…/.output/server/migrations', 500-ing the whole app on startup. The SQL is now embedded into the JS so the runner needs no runtime file read and works identically whether bundled or not. The numbered .sql files remain the source of truth and still ship in the package for the by-hand install path (psql -f node_modules/@byline/search-postgres/migrations/0001_init.sql); a drift-guard test keeps the embedded copy and the files in sync. If you applied a stopgap to work around the crash (copying the migrations/ folder into .output during your Docker build, or applying the SQL by hand), you can remove it after upgrading to 3.15.1.

  • @byline/cli + monorepo — the boot-time migrate() call in the CLI docs example template (and the reference webapp's server.config.ts) is now wrapped defensively: a migration failure logs loudly and degrades search rather than taking down the entire app at boot. The comment also points locked-down deployments (where the app role can't run DDL) at the by-hand psql path instead.

All other @byline/* packages bumped to 3.15.1 in lockstep with no behavioural changes this cycle.