Skip to content

feat!: add pluggable cache adapters and remove fetchify/native - #6

Merged
joeykamsteeg merged 1 commit into
developfrom
feature/cache-adapters
Aug 2, 2026
Merged

feat!: add pluggable cache adapters and remove fetchify/native#6
joeykamsteeg merged 1 commit into
developfrom
feature/cache-adapters

Conversation

@joeykamsteeg

Copy link
Copy Markdown
Member

Summary

  • Add a CacheAdapter interface, a createCacheAdapter factory (analogous to defineOptions) for authoring custom cache adapters, and a dependency-free in-memory adapter published at fetchify/cache/memory.
  • createFetchify's FetchifyOptions gains an optional cache field. create-fetchify.ts only ever type-imports CacheAdapter, so using createFetchify never pulls in a concrete cache implementation.
  • BREAKING: Remove the fetchify/native entry point (src/native.ts + the "./native" export). It has been a byte-for-byte duplicate of the main entry since the initial scaffold; consumers should import from fetchify instead — the API is identical.
  • Update DOCS.md and the OpenSpec specs (cache-adapters, cache-memory-adapter new; package-exports, fetchify-options, http-client, project-documentation updated) to match.
  • Add a changeset recording the major version bump with migration notes.

Test plan

  • bun test — 39/39 pass
  • bun run build — clean, produces dist/index.{js,d.ts} and dist/cache/memory.{js,d.ts}, no dist/native.*
  • openspec validate --changes add-cache-adapters --strict — passes

🤖 Generated with Claude Code

Adds a CacheAdapter interface, a createCacheAdapter factory for authoring
custom adapters (Redis, Upstash, etc.), and a dependency-free in-memory
adapter at fetchify/cache/memory. createFetchify's FetchifyOptions gains
an optional cache field.

BREAKING CHANGE: fetchify/native is removed. It has been an exact
duplicate of the main fetchify entry point since the initial scaffold,
with no platform-specific behavior. Import from fetchify instead — the
API is identical.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@joeykamsteeg
joeykamsteeg merged commit 7aef8ce into develop Aug 2, 2026
1 check passed
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