sidecar-cli 0.1.3-beta.1 → 0.1.3-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import fs from 'node:fs';
3
3
  import path from 'node:path';
4
4
  import readline from 'node:readline/promises';
5
5
  import { Command } from 'commander';
6
- import Database from 'better-sqlite3';
6
+ import { DatabaseSync } from 'node:sqlite';
7
7
  import { z } from 'zod';
8
8
  import { initializeSchema } from './db/schema.js';
9
9
  import { findSidecarRoot, getSidecarPaths } from './lib/paths.js';
@@ -333,7 +333,7 @@ program
333
333
  fs.rmSync(file, { recursive: true, force: true });
334
334
  }
335
335
  }
336
- const db = new Database(sidecar.dbPath);
336
+ const db = new DatabaseSync(sidecar.dbPath);
337
337
  initializeSchema(db);
338
338
  const ts = nowIso();
339
339
  db.prepare(`DELETE FROM projects`).run();
@@ -365,7 +365,7 @@ program
365
365
  if (shouldWriteRootClaude) {
366
366
  fs.writeFileSync(sidecar.rootClaudePath, renderClaudeMarkdown(projectName));
367
367
  }
368
- const db2 = new Database(sidecar.dbPath);
368
+ const db2 = new DatabaseSync(sidecar.dbPath);
369
369
  const refreshed = refreshSummaryFile(db2, rootPath, 1, 10);
370
370
  db2.close();
371
371
  const data = {
package/dist/db/client.js CHANGED
@@ -1,4 +1,4 @@
1
- import Database from 'better-sqlite3';
1
+ import { DatabaseSync } from 'node:sqlite';
2
2
  import { findSidecarRoot, getSidecarPaths } from '../lib/paths.js';
3
3
  import { SidecarError } from '../lib/errors.js';
4
4
  export function requireInitialized() {
@@ -6,7 +6,7 @@ export function requireInitialized() {
6
6
  if (!rootPath) {
7
7
  throw new SidecarError('Sidecar is not initialized in this directory or any parent directory', 'NOT_INITIALIZED', 2);
8
8
  }
9
- const db = new Database(getSidecarPaths(rootPath).dbPath);
9
+ const db = new DatabaseSync(getSidecarPaths(rootPath).dbPath);
10
10
  const row = db.prepare('SELECT id FROM projects ORDER BY id LIMIT 1').get();
11
11
  if (!row) {
12
12
  db.close();
package/dist/db/schema.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export function initializeSchema(db) {
2
- db.pragma('journal_mode = WAL');
2
+ db.exec('PRAGMA journal_mode = WAL;');
3
3
  db.exec(`
4
4
  CREATE TABLE IF NOT EXISTS projects (
5
5
  id INTEGER PRIMARY KEY AUTOINCREMENT,
package/dist/lib/db.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import fs from 'node:fs';
2
- import Database from 'better-sqlite3';
2
+ import { DatabaseSync } from 'node:sqlite';
3
3
  export function openDb(dbPath) {
4
- return new Database(dbPath);
4
+ return new DatabaseSync(dbPath);
5
5
  }
6
6
  export function migrate(db) {
7
- db.pragma('journal_mode = WAL');
7
+ db.exec('PRAGMA journal_mode = WAL;');
8
8
  db.exec(`
9
9
  CREATE TABLE IF NOT EXISTS events (
10
10
  id INTEGER PRIMARY KEY AUTOINCREMENT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sidecar-cli",
3
- "version": "0.1.3-beta.1",
3
+ "version": "0.1.3-beta.2",
4
4
  "description": "Local-first project memory and recording tool",
5
5
  "scripts": {
6
6
  "build": "npm run clean && tsc -p tsconfig.json",
@@ -23,17 +23,15 @@
23
23
  "type": "module",
24
24
  "private": false,
25
25
  "engines": {
26
- "node": ">=20"
26
+ "node": ">=22"
27
27
  },
28
28
  "dependencies": {
29
- "better-sqlite3": "^12.8.0",
30
29
  "chalk": "^5.6.2",
31
30
  "commander": "^14.0.3",
32
31
  "semver": "^7.7.4",
33
32
  "zod": "^4.3.6"
34
33
  },
35
34
  "devDependencies": {
36
- "@types/better-sqlite3": "^7.6.13",
37
35
  "@types/node": "^25.5.0",
38
36
  "@types/semver": "^7.7.1",
39
37
  "tsx": "^4.21.0",