Skip to content

anchored-chain-sqlite: confirm Bun-only publish shape (no Node dist) #642

Description

@bdelanghe

Spun out of the anchored-chain packaging PR. @bounded-systems/anchored-chain-sqlite cannot produce a runnable Node JS bundle: it imports bun:sqlite, drizzle-orm/bun-sqlite, and uses Bun's import ... with { type: 'text' } / { type: 'json' } attributes for the bundled .sql/.json migrations. None survive a plain tsc→JS Node build.

Current decision (implemented in the PR): ship it Bun-only

  • exports: bun./src/index.ts, default./src/index.ts (source is the runtime entry), types./dist/index.d.ts.
  • dist is declaration-only (emitDeclarationOnly), just for editor/type consumers.
  • engines.bun declared.

Open questions to confirm before/at extraction

  • Is Bun-only acceptable for all intended consumers, or does anything need to require/import this under Node? (If so, we'd need a portable sqlite driver + a real JS build — a larger change.)
  • Should drizzle-orm be a peerDependency rather than a direct dependency, to avoid version pinning across consumers?
  • Confirm the migration files (src/migrations/**) resolve correctly from the published package when loaded under the bun condition (they ship via files, but worth an install-and-run smoke test).

Context: claude.ai/code session 01PGAut6CEjiQjFMURp8UA5A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions