Instructions for AI coding agents working in this repository.
@aossie-org/idb-backup is a framework-agnostic TypeScript library for exporting and importing IndexedDB databases via type-tagged JSON. It wraps the native IndexedDB API using idb.
src/— library source (TypeScript)tests/— Vitest test suite (happy-dom+fake-indexeddbfor browser-API emulation)public/— org logo assets referenced by README (no project-specific logo exists yet)dist/— build output (generated, not committed source)
npm install
npm run build # tsup — builds ESM + CJS with type declarations
npm test # vitest run
npm run test:watch # vitest watch mode
npm run lint # eslint src/ tests/
npm run format # prettier --write
npm run format:check # prettier --check- The only runtime dependency is
idb— don't add another runtime dependency without discussing it in an issue first; devDependencies for build/test tooling are fine. - The package ships both ESM and CJS builds with TypeScript declarations (via
tsup) — don't introduce APIs that only work in one module format. - New functionality needs tests in
tests/using Vitest; usefake-indexeddb/happy-domto emulate the browser APIs rather than requiring a real browser.