Eliminates the `prebuild-install` deprecation warning that appears during
`mosaic gateway install` by removing `better-sqlite3` from the dependency
graph entirely and replacing the SqliteAdapter with a PGlite-based adapter
that mirrors the same interface and test coverage.
- New `PgliteAdapter` in `packages/storage/src/adapters/pglite.ts` using
`@electric-sql/pglite` with JSONB columns and pg-style `$N` placeholders
- Ported all 18 adapter tests to `pglite.test.ts` (in-memory PGlite instances)
- Deleted `sqlite.ts` and `sqlite.test.ts`
- Updated `StorageConfig` discriminated union: `sqlite` → `pglite` with optional
`dataDir` (absent = in-memory)
- `packages/storage/index.ts` re-exports `PgliteAdapter` and registers it
- CLI install wizard writes `{ type: 'pglite', dataDir: '…/storage-pglite' }`
- Removed `better-sqlite3` and `@types/better-sqlite3` from storage deps;
added `@electric-sql/pglite@^0.2.17`
- Removed `pnpm.onlyBuiltDependencies: ["better-sqlite3"]` from root package.json
- Bump `@mosaic/storage` 0.0.2 → 0.0.3
- Bump `@mosaic/gateway` 0.0.3 → 0.1.0 (minor — storage dialect change)
Breaking: local-tier `data.db` SQLite files are not migrated. Clean break.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
759 B
JSON
28 lines
759 B
JSON
{
|
|
"name": "mosaic-stack",
|
|
"private": true,
|
|
"packageManager": "pnpm@10.6.2",
|
|
"scripts": {
|
|
"build": "turbo run build",
|
|
"dev": "turbo run dev",
|
|
"lint": "turbo run lint",
|
|
"typecheck": "turbo run typecheck",
|
|
"test": "turbo run test",
|
|
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
"prepare": "husky"
|
|
},
|
|
"devDependencies": {
|
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
"@typescript-eslint/parser": "^8.0.0",
|
|
"eslint": "^9.0.0",
|
|
"typescript-eslint": "^8.0.0",
|
|
"husky": "^9.0.0",
|
|
"lint-staged": "^15.0.0",
|
|
"prettier": "^3.0.0",
|
|
"turbo": "^2.0.0",
|
|
"typescript": "^5.8.0",
|
|
"vitest": "^2.0.0"
|
|
}
|
|
}
|