Skip to content

Add @catmint-fs/indexdb-adapter package#1

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-indexdb-adapter-package
Draft

Add @catmint-fs/indexdb-adapter package#1
Copilot wants to merge 2 commits intomainfrom
copilot/add-indexdb-adapter-package

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 2, 2026

Browser-native FsAdapter implementation backed by IndexedDB. No Node.js dependencies.

Package structure

  • Mirrors sqlite-adapter layout: src/types.ts, src/indexdb-adapter.ts, src/index.ts
  • tsconfig.json extends root with DOM lib for IndexedDB types
  • fake-indexeddb as dev-only dependency for Node.js test environment

Implementation

  • Full FsAdapter interface: read/write, mkdir/readdir, rm/rmdir, rename, symlinks, stat, chmod/chown, permissions
  • Async throughout (IndexedDB is inherently async, unlike the sync sqlite wrapper)
  • Case-sensitive and case-insensitive path modes
  • Constructor auto-initializes the database schema and root directory

Tests

  • 72 tests across two suites, mirroring sqlite-adapter test patterns
  • Integration tests covering all FsAdapter methods and error codes
  • Case sensitivity tests for both modes
import { createLayer } from "@catmint-fs/core";
import { IndexdbAdapter } from "@catmint-fs/indexdb-adapter";

const adapter = new IndexdbAdapter({ dbName: "my-filesystem" });
const layer = await createLayer({ root: "/", adapter });

await layer.writeFile("/hello.txt", "Hello, world!\n");
Original prompt

Create a new package @catmint-fs/indexdb-adapter that is browser native (no nodejs dependencies) that can be used with the core library. It should have test coverage, readme, and structured similarly to other packages in the repo - you can use the sqlite adapter package as example. Remember to make sure the tests pass and that the code is written in similar structure and style


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…ation

Browser-native IndexedDB-backed adapter with:
- Full FsAdapter interface implementation (no Node.js dependencies)
- Package structure mirroring sqlite-adapter
- Integration tests (72 tests passing)
- Case sensitivity tests
- README documentation

Co-authored-by: darylcecile <6310278+darylcecile@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new package @catmint-fs/indexdb-adapter Add @catmint-fs/indexdb-adapter package Mar 2, 2026
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.

2 participants