Repository navigation
(janitor/dependencies) Remove unused @slack/oauth dependency - #7330
Conversation
@slack/oauth is no longer imported anywhere in apps/web; the Slack OAuth callback exchanges tokens via @slack/web-api directly. Remove the leftover declaration and update the @slack/web-api override comment that referenced it.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryVerified the removal of the unused Files Reviewed (3 files)
Reviewed by deepseek-v4.1-flash · Input: 36.9K · Output: 4.1K · Cached: 271K Review guidance: REVIEW.md from base branch |
eshurakov
left a comment
There was a problem hiding this comment.
Code Review Summary
Status: No Issues Found | Recommendation: Merge
Executive Summary
Independently reviewed all three changed files at 060af68 against base 2084412; no major issues found. A complete pinned-source scan found no remaining @slack/oauth references, including runtime/dynamic imports and configuration. The OAuth callback delegates to @chat-adapter/slack 4.36.0, whose published runtime calls @slack/web-api directly without @slack/oauth.
Structural assertions passed: the manifest removes only this dependency, the lockfile removes exactly its importer/resolution/snapshot, no other lockfile consumer requires it, and workspace YAML semantics are unchanged. Existing reviews/discussion and CI were checked; frozen-lockfile installs, typecheck, lint, tests, and web/AI-gateway builds passed. Head/base were reconfirmed immediately before approval. No local install, build, tests, or live OAuth exercise were performed; the shared checkout was not modified.
Files Reviewed (3 files)
apps/web/package.jsonpnpm-lock.yamlpnpm-workspace.yaml
Dependencies removed
@slack/oauth@3.0.5fromapps/web/package.json(dependencies)Evidence the dependency was unused
apps/webtree forslack/oauthand@slack/oauthmatches only thepackage.jsondeclaration. No import,require, dynamic import, or type reference exists anywhere in source, tests, or configuration.@slack/oauthis declared and referenced by no other workspace package. It is not a transitive dependency of anything else in the lockfile (the@slack/oauthsnapshot shows it depends on@slack/web-api, never the reverse).apps/web/src/lib/integrations/oauth/platforms/slack-callback.ts) exchanges tokens through@slack/web-api(upsertSlackInstallationinapps/web/src/lib/integrations/slack-service.ts), not through@slack/oauth.@slack/web-api,@slack/types, and@slack/socket-moderemain declared and used; only the@slack/oauthpackage was left behind.Dynamic, configuration, and tooling references checked
knip(the repository's dependency-analysis tool,apps/web/knip.ts) lists@slack/oauthunder "Unused dependencies" (package.json:106), in agreement with the search above.@slack/oauthis not inignoreDependencies.next.config, Jest, Babel,instrumentation, script, CSS plugin, or other configuration references the package (the exhaustive repo-wide search covers all file types underapps/web).pnpm-workspace.yamlexplaining the@slack/web-apioverride; it has been updated to drop the now-removed@slack/oauth.Package publication and peer-dependency considerations
apps/webis"private": trueand not published, so there is no published-package contract to preserve.@slack/oauthis declared as a plain runtimedependency(not a peer/optional dependency) and has no consumers in the tree; removal deletes it from the lockfile entirely.Validation performed
pnpm installcompletes cleanly (--no-frozen-lockfile); the lockfile diff is limited to the three@slack/oauthdeletions (importer entry,packagesresolution,snapshots).pnpm --filter web run lint→Found 0 warnings and 0 errors.@slack/web-api,@slack/types, and@slack/socket-moderemain present in the lockfile after removal.Uncertainty
apps/webtypecheck andnext buildwere not run in this environment (resource-constrained; Postgres/Redis cannot be started). The change is a manifest-only edit with zero source references, so typecheck/build output is expected to be unaffected, but this was not verified end-to-end.knipalso reports ~46 other unused-dependency candidates forapps/web; these were intentionally left alone to keep this change to the single safest removal. Several are false positives (e.g.@opentelemetry/apiis a peer of@sentry/nextjs/@vercel/otel) and were not evaluated for removal.