Skip to content

keyv - chore: remove cyclic workspace dependencies#1844

Merged
jaredwray merged 4 commits intomainfrom
claude/remove-keyv-dependencies-c7Kgc
Feb 16, 2026
Merged

keyv - chore: remove cyclic workspace dependencies#1844
jaredwray merged 4 commits intomainfrom
claude/remove-keyv-dependencies-c7Kgc

Conversation

@jaredwray
Copy link
Owner

Remove devDependencies on @keyv/compress-brotli, @keyv/compress-gzip,
@keyv/compress-lz4, @keyv/memcache, @keyv/mongo, @keyv/sqlite, and
@keyv/test-suite from keyv core to eliminate cyclic workspace dependency
warnings during pnpm install. Also remove unused @keyv/test-suite and
keyv devDependencies from @keyv/serialize.

Replace external adapter usage in tests with inline mock compression
adapters and in-memory store adapters. Remove suite.test.ts as the
compliance tests are already run by each adapter package.

https://claude.ai/code/session_01NpH5nuxAZHEs8ApTeBoY5N

Remove devDependencies on @keyv/compress-brotli, @keyv/compress-gzip,
@keyv/compress-lz4, @keyv/memcache, @keyv/mongo, @keyv/sqlite, and
@keyv/test-suite from keyv core to eliminate cyclic workspace dependency
warnings during pnpm install. Also remove unused @keyv/test-suite and
keyv devDependencies from @keyv/serialize.

Replace external adapter usage in tests with inline mock compression
adapters and in-memory store adapters. Remove suite.test.ts as the
compliance tests are already run by each adapter package.

https://claude.ai/code/session_01NpH5nuxAZHEs8ApTeBoY5N
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jaredwray, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on improving the project's dependency management and testing infrastructure. By removing cyclic workspace dependencies and replacing external test adapters with internal mocks, the changes aim to create a more robust and isolated testing environment. This also streamlines the build process by eliminating unnecessary package references and redundant test suites.

Highlights

  • Dependency Cleanup: Removed several @keyv/* workspace devDependencies from the keyv core package, including compression, storage, and test-suite packages, to resolve cyclic dependency warnings during pnpm install.
  • Test Refactoring: Replaced external adapter usage in tests with inline mock compression and in-memory store adapters, enhancing test isolation and reducing external dependencies.
  • Test Suite Removal: Eliminated the suite.test.ts file as compliance tests are now run by individual adapter packages, streamlining the testing process.
  • Serialization Package Update: Removed unused @keyv/test-suite and keyv devDependencies from the @keyv/serialize package.
Changelog
  • core/keyv/package.json
    • Removed devDependencies on @keyv/compress-brotli, @keyv/compress-gzip, @keyv/compress-lz4, @keyv/memcache, @keyv/mongo, @keyv/sqlite, and @keyv/test-suite.
  • core/keyv/test/get-raw.test.ts
    • Removed imports for process, KeyvGzip, KeyvMongo, and delay from @keyv/test-suite.
    • Added a local delay utility function.
    • Introduced createMockCompression function to mock compression adapters.
    • Introduced createStore function to create an in-memory store adapter with getMany support.
    • Updated tests to use createMockCompression() instead of KeyvGzip.
    • Updated tests to use createStore() instead of KeyvMongo.
  • core/keyv/test/keyv-hooks.test.ts
    • Removed import for KeyvSqlite.
    • Introduced createStore function to create an in-memory store adapter.
    • Updated tests to use createStore() instead of KeyvSqlite.
  • core/keyv/test/suite.test.ts
    • Removed the entire test file.
  • core/keyv/test/test.ts
    • Removed imports for KeyvBrotli, KeyvGzip, KeyvLz4, KeyvMemcache, KeyvMongo, KeyvSqlite, and delay from @keyv/test-suite.
    • Added a local delay utility function.
    • Introduced createMockCompression function to mock compression adapters.
    • Introduced createStore function to create an in-memory store adapter with getMany, iterator, disconnect, and namespace support.
    • Updated test descriptions to reflect the use of generic storage adapters.
    • Updated tests to use createStore() instead of specific Keyv storage adapters like KeyvSqlite or KeyvMemcache.
    • Updated tests to use createMockCompression() instead of specific Keyv compression adapters like KeyvBrotli, KeyvGzip, or KeyvLz4.
    • Adjusted snooze delay in a test case from 100ms to 150ms.
  • pnpm-lock.yaml
    • Removed entries for @keyv/compress-brotli, @keyv/compress-gzip, @keyv/compress-lz4, @keyv/memcache, @keyv/mongo, @keyv/sqlite, and @keyv/test-suite from core/keyv devDependencies.
    • Removed entries for @keyv/test-suite and keyv from serialization/serialize devDependencies.
  • serialization/serialize/package.json
    • Removed devDependencies on @keyv/test-suite and keyv.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

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

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 effectively removes cyclic workspace dependencies by replacing dev dependencies on other @keyv packages with inline mock adapters for testing purposes. This is a valuable change that improves the overall health and maintainability of the monorepo. The implementation is solid, introducing mock compression and store adapters to decouple the core keyv package from its adapters during testing. I've identified one area for improvement concerning duplicated test helper functions across several test files and have left a comment with a suggestion to refactor them into a shared utility file. Besides that, the changes look great.

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.79%. Comparing base (4029612) to head (08efa87).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1844      +/-   ##
===========================================
- Coverage   100.00%   99.79%   -0.21%     
===========================================
  Files           32       32              
  Lines         2432     2432              
  Branches       448      448              
===========================================
- Hits          2432     2427       -5     
- Misses           0        5       +5     

☔ View full report in Codecov by Sentry.
📢 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.

Move duplicated delay, createMockCompression, and createStore helpers
from test.ts, get-raw.test.ts, and keyv-hooks.test.ts into a shared
test/test-utils.ts file. Uses the most complete version of createStore
(with getMany, has, iterator, disconnect, and namespace support).

https://claude.ai/code/session_01NpH5nuxAZHEs8ApTeBoY5N
Rename test/test.ts to test/keyv.test.ts to follow the *.test.ts naming
convention. This simplifies the vitest include pattern to just
'test/*.test.ts', cleanly excluding non-test files like test-utils.ts.

https://claude.ai/code/session_01NpH5nuxAZHEs8ApTeBoY5N
@jaredwray jaredwray merged commit a04589c into main Feb 16, 2026
9 of 10 checks passed
@jaredwray jaredwray deleted the claude/remove-keyv-dependencies-c7Kgc branch February 16, 2026 00:38
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