durcno@1.0.0-alpha.1
Major Changes
-
b5f05a6 - Thanks to @almahdi404 !
change(connectors)!: introduce connector factory functions
Each connector now exposes a factory function (
pg(),postgres(),bun(),pglite()) instead of a bare class.defineConfignow accepts a connector instance rather than a constructor.// Beforeimport { PgConnector } from "durcno/connectors/pg";export default defineConfig(PgConnector, { ... });// Afterimport { pg } from "durcno/connectors/pg";export default defineConfig(pg(), { ... });PgLiteConnector/pglite()now accepts an optionalPGliteOptionsargument (e.g. for extensions), which is forwarded to the underlyingPGliteclient and pool instances.
Minor Changes
-
8f7516a - Thanks to @almahdi404 !
feat(migration): add sequential execution mode option
Adds an
executionoption toMigrationOptionsthat controls how migration statements are sent to the database.By default (
"joined"), all statements are concatenated into a single query. With"sequential", each statement is sent individually — useful for migrations that includeCREATE INDEX CONCURRENTLYorDROP INDEX CONCURRENTLY, which must be executed as standalone commands.export const options: MigrationOptions = {transaction: false, // Required for concurrent operationsexecution: "sequential", // Run each statement one at a time};The
executionoption is supported in bothmigrate(up) anddowncommands.
Patch Changes
-
92a3e32 - Thanks to @almahdi404 !
fix(cli/init): preserve .ts extension in imports
The generated
db/index.tsnow includes proper.tsextensions:import * as schema from "./schema.ts";import setup from "../durcno.config.ts";So that, Node.js versions lower than 25 can properly resolve the imports.