(janitor/dependencies) chore(deps): remove unused js-cookie from apps/web - #5635
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/dependencies) chore(deps): remove unused js-cookie from apps/web#5635kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
js-cookie and its @types/js-cookie companion have no remaining consumers in apps/web. Cookie access in this app goes through next/headers `cookies()` on the server; no file imports `js-cookie`. Verified via: - knip dependency analysis (apps/web/package.json:110,145) - repo-wide grep for `js-cookie` imports/requires in apps/web (zero matches) - no config, script, or build-tool reference Lockfile regenerated with `pnpm remove js-cookie @types/js-cookie --filter web --lockfile-only`.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by grok-4.6 · Input: 81.1K · Output: 4.5K · Cached: 149.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
Removes
js-cookieand its type companion@types/js-cookiefromapps/web, both confirmed unused.Dependencies removed
js-cookie(apps/web dependency)@types/js-cookie(apps/web devDependency)Evidence each was unused
knip(already configured inapps/web/knip.ts) flagged both under "Unused dependencies" / "Unused devDependencies" (apps/web/package.json:110and:145).js-cookie(import statements,require(), string literals) acrossapps/web/srcand config files returned zero matches.getExtensionUrl.ts,verify-turnstile-jwt.ts,server.ts,verify-turnstile/route.ts) all use Next.js's built-innext/headerscookies()API, not thejs-cookiepackage.package.jsondeclaresjs-cookieor@types/js-cookie(checked viagrepacross allpackage.jsonfiles), so this isn't a duplicate left in the wrong package and nothing else in the monorepo depends on it.Dynamic, configuration, and tooling references checked
apps/web/next.config.mjs(webpack config,serverExternalPackages): no reference.package.jsoninvokesjs-cookie.tsconfig.json, jest/vitest config, or build tooling references it.Package publication and peer-dependency considerations
apps/webis a private Next.js application, not a published package, so there are no downstream consumers relying onjs-cookieas part of a public contract.js-cookieis not declared as a peer dependency anywhere in the workspace.apps/web's dependency tree requiresjs-cookieto be hoisted for its own use.Validation performed
knip-flagged candidates (@ai-sdk/mistral,@slack/oauth,discord-api-types,vaul, several@kilocode/*workspace packages) but did not remove them in this PR — some had ambiguous evidence (e.g.@octokit/graphql-schemawas flagged unused by knip but is actually read via a filesystem path in a test, confirming static analysis alone isn't proof) or warrant a separately scoped change. Only the single highest-confidence, tightly related pair (js-cookie+@types/js-cookie) was removed here.pnpm remove js-cookie @types/js-cookie --filter web --lockfile-only(a targeted removal, not a full monorepo re-resolution) to minimize unrelated lockfile churn.CI=1 pnpm install --filter web --frozen-lockfile), confirmingjs-cookie/@types/js-cookieare no longer linked intoapps/web/node_modules.knipforapps/webafter the change: unused dependency count dropped from 40 to 38, withjs-cookie/@types/js-cookieno longer appearing anywhere in the report and no new items introduced.@types/nodepeer suffix on onejestresolution, and areact/typescriptpeer suffix on oneexporesolution) that point to version strings already present elsewhere in the lockfile — these are pnpm resolution-graph housekeeping, not new dependency versions, and they disappear entirely when re-running the same command against an unmodifiedpackage.json(verified with a stash-and-rerun control).Uncertainty / not run
pnpm typecheck/tsgo --noEmitand thewebbuild could not be completed in this sandboxed environment: the container has 2 CPUs / 6GB RAM, and both the monorepopreparehook (rollup/tsgo build of@kilocode/trpc) and a directtsgo --noEmitrun overapps/webwere killed without a clear error under this resource ceiling, independent of this change.pnpm testforapps/web(which needs Postgres) was also not run, per this environment's documented resource constraints (no Postgres/Redis available here).knip's before/after dependency report, and confirmingnode_moduleslinkage no longer includes the removed packages after a clean install.pnpm validate) should confirm typecheck/lint/tests pass before merging.