Replaces SqliteAdapter (built on better-sqlite3) with a new PgliteAdapter using @electric-sql/pglite — eliminates the [email protected] deprecation warning from mosaic gateway install
Ported all 18 adapter tests to in-memory PGlite (fully hermetic, zero external deps)
The local-tier storage dialect changes from SQLite to PGlite. Existing ~/.config/mosaic/gateway/data.db files will not be migrated. On upgrade, the gateway starts fresh with a new PGlite directory at ~/.config/mosaic/gateway/storage-pglite. This is a clean break — the Storage Abstraction mission is r0, no production users.
Test plan
pnpm --filter @mosaic/storage test — 18/18 pass (PGlite in-memory)
pnpm --filter @mosaic/gateway test — 347/347 pass
pnpm --filter @mosaic/cli test — 34/34 pass
All typecheck, lint, format:check pass monorepo-wide
pnpm why better-sqlite3 → empty
pnpm why prebuild-install → empty
## Summary
- Replaces `SqliteAdapter` (built on `better-sqlite3`) with a new `PgliteAdapter` using `@electric-sql/pglite` — eliminates the `[email protected]` deprecation warning from `mosaic gateway install`
- Ported all 18 adapter tests to in-memory PGlite (fully hermetic, zero external deps)
- Updated `StorageConfig` discriminated union: `{ type: 'sqlite', path }` → `{ type: 'pglite', dataDir? }` (absent = in-memory)
- CLI install wizard now writes `{ type: 'pglite', dataDir: '…/storage-pglite' }`
- Removed `better-sqlite3` + `@types/better-sqlite3` from `@mosaic/storage` deps; added `@electric-sql/pglite@^0.2.17`
- Removed `pnpm.onlyBuiltDependencies: ["better-sqlite3"]` from root `package.json`
- Fixed pre-existing `@mosaic/config` missing `eslint` devDependency
- Bumped `@mosaic/storage` 0.0.2 → 0.0.3, `@mosaic/gateway` 0.0.3 → 0.1.0
## Breaking Changes
The local-tier storage dialect changes from SQLite to PGlite. Existing `~/.config/mosaic/gateway/data.db` files will **not** be migrated. On upgrade, the gateway starts fresh with a new PGlite directory at `~/.config/mosaic/gateway/storage-pglite`. This is a clean break — the Storage Abstraction mission is r0, no production users.
## Test plan
- [ ] `pnpm --filter @mosaic/storage test` — 18/18 pass (PGlite in-memory)
- [ ] `pnpm --filter @mosaic/gateway test` — 347/347 pass
- [ ] `pnpm --filter @mosaic/cli test` — 34/34 pass
- [ ] All typecheck, lint, format:check pass monorepo-wide
- [ ] `pnpm why better-sqlite3` → empty
- [ ] `pnpm why prebuild-install` → empty
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 <[email protected]>
Update DEFAULT_LOCAL_CONFIG, VALID_STORAGE_TYPES, and repo-root
mosaic.config.json to use pglite instead of sqlite, completing the
storage dialect migration started in the previous commit.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
The package declared an eslint lint script but eslint was not in
devDependencies, causing the pre-push hook to fail.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
SqliteAdapter(built onbetter-sqlite3) with a newPgliteAdapterusing@electric-sql/pglite— eliminates the[email protected]deprecation warning frommosaic gateway installStorageConfigdiscriminated union:{ type: 'sqlite', path }→{ type: 'pglite', dataDir? }(absent = in-memory){ type: 'pglite', dataDir: '…/storage-pglite' }better-sqlite3+@types/better-sqlite3from@mosaic/storagedeps; added@electric-sql/pglite@^0.2.17pnpm.onlyBuiltDependencies: ["better-sqlite3"]from rootpackage.json@mosaic/configmissingeslintdevDependency@mosaic/storage0.0.2 → 0.0.3,@mosaic/gateway0.0.3 → 0.1.0Breaking Changes
The local-tier storage dialect changes from SQLite to PGlite. Existing
~/.config/mosaic/gateway/data.dbfiles will not be migrated. On upgrade, the gateway starts fresh with a new PGlite directory at~/.config/mosaic/gateway/storage-pglite. This is a clean break — the Storage Abstraction mission is r0, no production users.Test plan
pnpm --filter @mosaic/storage test— 18/18 pass (PGlite in-memory)pnpm --filter @mosaic/gateway test— 347/347 passpnpm --filter @mosaic/cli test— 34/34 passpnpm why better-sqlite3→ emptypnpm why prebuild-install→ emptyEliminates 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 <[email protected]>