Skip to content

chore: remove 20 unused dependencies#663

Merged
rickstaa merged 1 commit into
mainfrom
chore/remove-orphan-deps
May 12, 2026
Merged

chore: remove 20 unused dependencies#663
rickstaa merged 1 commit into
mainfrom
chore/remove-orphan-deps

Conversation

@rickstaa
Copy link
Copy Markdown
Member

@rickstaa rickstaa commented May 7, 2026

Summary

Drop 20 direct dependencies in package.json with zero imports anywhere in source. Follow-up to #661 (initial four orphans). Together that brings the cleanup to 24 of 104 dependencies (~23%).

Verified via a scripted sweep across every *.ts/tsx/js/mjs/cjs file plus manual checks for side-effect imports, dynamic requires, and string references in build configs (next.config, codegen, jest, lighthouserc, eslint).

What's removed and why

GraphQL Tools cleanup — only @graphql-tools/wrap is imported (apollo/createSchema.ts); the schema-stitching helpers below were used when the gateway merged multiple sources and aren't needed for the current single-subgraph wrap.

  • @graphql-tools/delegate, @graphql-tools/links, @graphql-tools/schema, @graphql-tools/stitch
  • graphql-tools (legacy umbrella, distinct from the granular @graphql-tools/* packages)

MDX stack — no .mdx files, no MDX wiring in next.config.js.

  • @mdx-js/loader, @mdx-js/react, @next/mdx

Apollo Server stack — no GraphQL endpoint code references these. Apollo Server v3 reached EOL in October 2023.

  • apollo-server-micro, apollo-link, apollo-link-http, micro-cors

UI / utility leftovers

  • @reach/dialog — no imports (earlier assumption that this needed migration was wrong)
  • @wagmi/core — pulled in transitively via wagmi, redundant as a direct dep
  • gsap, lightweight-charts, match-sorter, parse-domain, react-confetti, react-number-format

Why

Trims dead weight from the lockfile (-2,203 lines) and reduces Dependabot noise by removing alerts attributable to packages no source code references.

What's intentionally not removed

  • dotenv — used by pnpm codegen via the -r dotenv/config flag.
  • @emotion/styled — peer dependency of @mui/material v7.
  • @stitches/react — declared transitively by @livepeer/design-system; safe to drop but worth verifying separately. Tracked as follow-up.

Outdated-but-still-used libraries (@reach/tabs, react-hook-form v3, react-ga, ethereumjs-util, apollo-fetch, react-table v7, ethers v5, etc.) are tracked as separate migration work.

Closes #662

Test plan

  • pnpm typecheck, pnpm lint, pnpm format:check pass locally
  • CI green
  • Vercel preview smoke-tested on /orchestrators, /leaderboard, /treasury, /accounts/<address>/orchestrating, the Connect Wallet modal, and the three /migrate/* pages

Drop 20 direct dependencies in package.json with zero imports anywhere in
source. Verified via scripted sweep across all *.ts/tsx/js/mjs/cjs files
plus manual confirmation that none are peer deps, build-time codegen, or
implicit-via-config (MDX, Apollo Server endpoint, etc.).

Removed by group:

GraphQL Tools — only @graphql-tools/wrap is actually imported (in
apollo/createSchema.ts):
- @graphql-tools/delegate, @graphql-tools/links, @graphql-tools/schema,
  @graphql-tools/stitch, graphql-tools (umbrella)

MDX — no .mdx files in repo, no MDX wiring in next.config.js:
- @mdx-js/loader, @mdx-js/react, @next/mdx

Apollo Server stack — no GraphQL endpoint code references them; AS3 is EOL:
- apollo-server-micro, apollo-link, apollo-link-http, micro-cors

UI/utility leftovers from earlier refactors:
- @reach/dialog, @wagmi/core (transitive via wagmi), gsap,
  lightweight-charts, match-sorter, parse-domain, react-confetti,
  react-number-format

Lockfile shrinks by 2,203 lines, reducing supply-chain attack surface
and CVE alert noise.

Closes #662

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rickstaa rickstaa requested a review from ECWireless as a code owner May 7, 2026 15:10
Copilot AI review requested due to automatic review settings May 7, 2026 15:10
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment May 7, 2026 3:11pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes a set of direct package.json dependencies that are no longer referenced by the Explorer application, and updates pnpm-lock.yaml accordingly to reduce install surface area and lockfile size.

Changes:

  • Dropped 20 unused direct dependencies from package.json (GraphQL Tools extras, MDX stack, Apollo Server stack, and various UI/util packages).
  • Regenerated pnpm-lock.yaml to reflect the removed direct dependencies and prune now-unneeded transitive packages.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
package.json Removes 20 direct dependencies that have no usage in repo source/config.
pnpm-lock.yaml Updates lockfile to drop the removed dependencies and their prunable transitive subtrees.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rickstaa rickstaa merged commit 997a2fd into main May 12, 2026
11 checks passed
@rickstaa rickstaa deleted the chore/remove-orphan-deps branch May 12, 2026 10:01
@github-project-automation github-project-automation Bot moved this from Triage to Done in Engineering Roadmap May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

chore: remove additional unused dependencies (20 orphans)

2 participants