Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@profullstack/profile",
"version": "0.1.4",
"version": "0.1.5",
"type": "module",
"description": "One user profile for every property: email, first_name, last_name, company_domain, job_title, linkedin_url. Validation, signup form fields, storage on Postgres/Turso/Supabase, HTTP handlers, CSV export, CLI and MCP.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
csvRow,
} from "./index.js";

const VERSION = "0.1.4";
const VERSION = "0.1.5";

const USAGE = `profile - signup profile fields (${COLUMNS.join(", ")})

Expand Down
14 changes: 10 additions & 4 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ export function adapt(db, dialect) {
dialect: dialect ?? "sqlite",
query: async (text, params = []) => {
const stmt = db.prepare(text);
if (stmt.reader === false) {
stmt.run(...params);
return [];
try {
if (stmt.reader === false) {
stmt.run(...params);
return [];
}
return stmt.all(...params);
} finally {
// bun:sqlite keeps the file open (locked on Windows) until every
// statement is finalized, even after db.close().
stmt.finalize?.();
}
return stmt.all(...params);
},
};
}
Expand Down
Loading