Skip to content

mono - refactor: add KeyvAny/KeyvAnyArray types and replace explicit any - #2010

Merged
jaredwray merged 1 commit into
mainfrom
claude/session-axwgve
Jul 17, 2026
Merged

mono - refactor: add KeyvAny/KeyvAnyArray types and replace explicit any#2010
jaredwray merged 1 commit into
mainfrom
claude/session-axwgve

Conversation

@jaredwray

Copy link
Copy Markdown
Owner

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Refactor (type-level only — no runtime behavior change).

Introduces two shared types in core/keyv (src/types/keyv.ts), exported from the public API:

// biome-ignore lint/suspicious/noExplicitAny: values can be any type for parameterized queries
export type KeyvAny = any;
export type KeyvAnyArray = KeyvAny[];

A single noExplicitAny suppression now lives at the type definition instead of being scattered across the codebase. All any / any[] usages in type positions across the packages are replaced with KeyvAny / KeyvAnyArray (imported from keyv), and the now-redundant per-line // biome-ignore lint/suspicious/noExplicitAny comments and file-level // biome-ignore-all headers are removed (including a stale one in storage/redis/src/types.ts that suppressed nothing).

Packages touched: keyv, bigmap, test-suite, and the etcd, mongo, mysql, postgres, redis, sqlite, valkey storage adapters.

Verification

  • pnpm build — all 20 packages build cleanly.
  • biome check --error-on-warnings — passes on all changed files.
  • The only remaining any in source is the single centralized KeyvAny definition.
  • Docker-free test suites pass (keyv core: 329 tests, bigmap: 54 tests). Adapter integration suites that require Docker services were not run in this environment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XzGVTfZQrMHxZ4WDKGw5wQ


Generated by Claude Code

Introduce shared `KeyvAny` (=== any) and `KeyvAnyArray` (=== any[]) types in
core/keyv (`src/types/keyv.ts`), exported from the public API. A single
`noExplicitAny` biome suppression now lives at the type definition instead of
being scattered across the codebase.

Replace `any`/`any[]` in type positions with `KeyvAny`/`KeyvAnyArray` across
core (keyv, bigmap, test-suite) and all storage adapters (etcd, mongo, mysql,
postgres, redis, sqlite, valkey), importing the types from `keyv`, and remove
the now-redundant per-line and file-level `biome-ignore lint/suspicious/
noExplicitAny` comments. Purely type-level; runtime behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XzGVTfZQrMHxZ4WDKGw5wQ

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the codebase by centralizing dynamic any types into KeyvAny and KeyvAnyArray across several packages, allowing the removal of numerous biome-ignore lint suppressions. Feedback suggests using the GenericValue type parameter instead of KeyvAny for the iterator() method in Keyv to preserve type safety for consumers.

Comment thread core/keyv/src/keyv.ts
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (107d164) to head (eba8d34).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2010   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           55        55           
  Lines         4887      4887           
  Branches       784       785    +1     
=========================================
  Hits          4887      4887           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray
jaredwray merged commit 49ed583 into main Jul 17, 2026
14 checks passed
@jaredwray
jaredwray deleted the claude/session-axwgve branch July 17, 2026 15:20
This was referenced Aug 3, 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