Skip to content

chore(issuer): switch sqlite example to libsql#47

Merged
venables merged 1 commit intomainfrom
venables/issuer-libsql-no-native
Feb 14, 2026
Merged

chore(issuer): switch sqlite example to libsql#47
venables merged 1 commit intomainfrom
venables/issuer-libsql-no-native

Conversation

@venables
Copy link
Contributor

@venables venables commented Feb 14, 2026

Summary

  • replace better-sqlite3 in examples/issuer with @libsql/client
  • switch Drizzle adapter/migrator imports to drizzle-orm/libsql
  • remove better-sqlite3 from workspace onlyBuiltDependencies

Why

The issuer example should avoid native Node build requirements (node-gyp/C++ toolchain). Using libsql keeps the example lightweight and avoids native driver install failures.

Validation

  • pnpm --filter ./examples/issuer db:generate
  • root pnpm install (run locally by requester)

Summary by CodeRabbit

  • Refactor

    • Updated the issuer example's database infrastructure to use LibSQL, providing enhanced compatibility and improved async database operations.
  • Chores

    • Updated project dependencies to support the new database backend infrastructure.

Replace better-sqlite3 usage in examples/issuer with the Drizzle libsql adapter and migrator.\n\nThis removes the native-node build dependency from the example path and avoids requiring node-gyp tooling for local setup.
@coderabbitai
Copy link

coderabbitai bot commented Feb 14, 2026

Walkthrough

This change migrates the database backend from better-sqlite3 to LibSQL across the issuer example. It updates imports in server initialization and database configuration, swaps dependencies in package.json, and adjusts the workspace configuration to remove better-sqlite3 from the build dependencies list.

Changes

Cohort / File(s) Summary
Database Backend Migration
examples/issuer/bin/start-server.ts, examples/issuer/src/db/get-db.ts
Replaced better-sqlite3 imports with LibSQL client. Made startServer async and awaited migrate call. Updated database URL format from "sqlite.db" to "file:sqlite.db". Internal variable names changed from sqlite to client.
Dependency & Configuration Updates
examples/issuer/package.json, pnpm-workspace.yaml
Added @libsql/client 0.15.15 dependency. Removed better-sqlite3 and @types/better-sqlite3 from dependencies. Removed better-sqlite3 from pnpm workspace onlyBuiltDependencies list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(issuer): switch sqlite example to libsql' accurately summarizes the main change: migrating the issuer example from better-sqlite3 to libsql.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch venables/issuer-libsql-no-native

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@venables venables merged commit 6ef1582 into main Feb 14, 2026
3 checks passed
@venables venables deleted the venables/issuer-libsql-no-native branch February 14, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant