(janitor/dependencies) remove unused redis dependency from apps/web - #5844
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/dependencies) remove unused redis dependency from apps/web#5844kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
apps/web uses @upstash/redis for its Redis client and @chat-adapter/state-redis for chat state. The bare redis (node-redis) package is declared directly but never imported anywhere in the repository.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by grok-4.6 · Input: 49.2K · Output: 4.1K · Cached: 147.2K Review guidance: REVIEW.md from base branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove one high-confidence unused dependency from
apps/web.Dependencies removed
redis(5.11.0) — removed fromapps/web/package.jsondependencies.Evidence it was unused
apps/webperforms all Redis access through two other packages:@upstash/redis(declared atapps/web/package.json) is the actual client —src/lib/redis.tsdoesimport { Redis } from '@upstash/redis'.@chat-adapter/state-redis(declared atapps/web/package.json) is the chat-state adapter.The bare
redis(node-redis) package is not imported anywhere in the repository:from 'redis',from "redis",require('redis'),require("redis"),import('redis'), andimport("redis")(.ts/.tsx/.js/.mjs/.cjs) returned no matches.'redis'/"redis"returned only the Docker Compose service name indev/local/services.ts(unrelated to the npm package) and@upstash/redis/@redis/*/@chat-adapter/state-redisreferences.knip(already configured inapps/web) listsredisunder "Unused dependencies".Dynamic, configuration, and tooling references checked
import()/require()ofredis.next.config.*,jest.config.*,tsconfig*.json, or any*.config.*file.apps/web/package.jsonscriptsor rootscripts/*.apps/web/scripts/*,.mjs/.cjshelper, or Docker/tooling config.Package publication and peer-dependency considerations
apps/webis"private": true; it is not published, so there is no published package contract or peer-dependency surface to preserve.rediswas a direct runtime dependency, not a peer or optional dependency.redistypes;@upstash/redisprovides the client types used.Transitive dependency check
redis@5.11.0remains in the lockfile because it is a transitive dependency of@chat-adapter/state-redis(redis: 5.11.0under@chat-adapter/state-redis@4.36.0). The lockfile diff therefore only removes the directapps/webimporter entry (3 lines) and leaves the package graph otherwise intact.apps/websource never importedredis, so removing the direct declaration does not expose any undeclared transitive usage.Validation performed
pnpm install(with an enlarged Node heap, since the default 2 GB heap OOMs in this constrained environment) regeneratedpnpm-lock.yaml; diff is a clean 3-line removal limited to theapps/webimporter'sredisentry.pnpm --filter web lint— 0 warnings, 0 errors.pnpm --filter web typecheck(tsgo --noEmit) — passes (exit 0).git diff --check— clean.Not run in this environment (documented as a limitation, not a failure):
apps/webunit tests andnext buildwere not run — they require PostgreSQL/Redis and a full environment that this resource-constrained sandbox cannot start.Uncertainty
redisis a clear leftover from the migration to@upstash/redis; it has no import, config, script, plugin, or peer-dependency consumer. It remains in the tree only as a transitive dependency of@chat-adapter/state-redis, which is unaffected by this change.