Split adapter-sqlite into adapter-local, record-adapter-sqlite, and blob-adapter-disk#43
Merged
Conversation
…lob-adapter-disk - adapter-local (@haverstack/adapter-local): convenience StackAdapter wrapper combining SQLiteRecordAdapter + DiskBlobAdapter; exposes token methods for server use; matches the old SQLiteAdapter API with initialize()/open() static methods - record-adapter-sqlite (@haverstack/record-adapter-sqlite): SQLiteRecordAdapter implementing StackRecordAdapter; also provides createToken/lookupToken/listTokens/revokeToken - blob-adapter-disk (@haverstack/blob-adapter-disk): DiskBlobAdapter implementing StackBlobAdapter; content-addressed SHA-256 storage on the local filesystem Package naming convention: adapter-* = full StackAdapter, record-adapter-* = StackRecordAdapter, blob-adapter-* = StackBlobAdapter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
Makes the underlying library (sql.js) explicit, distinguishing it from other SQLite bindings in the JS ecosystem (better-sqlite3, node-sqlite3, etc.) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
…local Removes the unused RecordId import from record-adapter-sqljs that was causing a lint failure. Adds a vitest.config.ts to adapter-local that aliases workspace packages to their TypeScript sources so tests can run before dist/ directories are built. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
… to 0.6.0 Fixes the prettier format failure in adapter-local/vitest.config.ts and removes the redundant combineAdapters value import (re-export covers it). Bumps all six packages from 0.5.0 to 0.6.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
Removes publish:sqlite (adapter-sqlite is gone) and adds publish scripts for the three replacement packages: adapter-local, record-adapter-sqljs, and blob-adapter-disk. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@haverstack/adapter-sqlitewith three focused packages following a naming convention that encodes adapter type:adapter-*(fullStackAdapter),record-adapter-*(StackRecordAdapter),blob-adapter-*(StackBlobAdapter)@haverstack/adapter-local— convenience fullStackAdapterwrapping the two packages below;LocalAdapter.initialize()/LocalAdapter.open()are the new drop-in replacement for the oldSQLiteAdapterAPI; also exposes token management methods (createToken,lookupToken,listTokens,revokeToken) for server use@haverstack/record-adapter-sqlite—SQLiteRecordAdapter implements StackRecordAdapter; all SQL logic, FTS, pagination, tokens@haverstack/blob-adapter-disk—DiskBlobAdapter implements StackBlobAdapter; content-addressed SHA-256 blobs on the local filesystemSQLiteRecordAdapterdirectly and compose it withcombineAdapters()from@haverstack/coreadapter-localre-exportsSQLiteRecordAdapter,DiskBlobAdapter, andcombineAdaptersso it can serve as the single import for most use casesREADME.mdanddocs/spec.mdwith the new package names, naming convention table, and revised quick-start exampleTest plan
pnpm testpasses across all packages (94 tests: 65 record, 12 blob, 17 local integration)pnpm typecheckpasses across all packagesLocalAdapterfrom@haverstack/adapter-local)adapter-localre-exportsSQLiteRecordAdapterandDiskBlobAdapterso existing code that imported those fromadapter-sqlitecan migrate to a single import🤖 Generated with Claude Code
https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
Generated by Claude Code