8000 frontend: remove unused dependencies by draaglom · Pull Request #1504 · Metaculus/metaculus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

frontend: remove unused dependencies #1504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 2, 2024

Conversation

draaglom
Copy link
Contributor

why?

eliminating unused dependencies with prejudice is beneficial for a few reasons:

  1. supply chain attacks - the fewer packages, the fewer people in the supply chain, so the fewer people that can be phished/compromised to do something naughty
  2. less chore work to keep them up to date
  3. faster, smaller builds probably
  4. clarity of development (e.g. knowing which http client is the best one to use)

how?

I checked with depheck and then manually double checked that any reported package wasn't (a) used in the build (depcheck won't see that); (b) added recently as something that could be WIP (e.g. sharp); (c) grepped around to double-sanity-check for any usage; (d) used git pickaxe (git log -S) to understand the historical context of the prior usage, if any.

See commit messages for package-specific commentary.

this has been unused since 875cd15
the dep was added in 65d8344 but never
actually used
added in 3f7c841 but never actually
used
it's still used indirectly, but package-lock can pin that just fine

removing it from package.json helps prevent people from accidentally
usiing it rather than fetch
@draaglom draaglom changed the title clean up unused frontend dependencies frontend: remove unused dependencies Nov 24, 2024
@draaglom
Copy link
Contributor Author
draaglom commented Nov 24, 2024

also resolves GHSA-c7qv-q95q-8v27 (though the app wasn't actually vulnerable because the dependency is unused, and it's a bit of a fake "high" sev imo)

@hlbmtc hlbmtc merged commit 7c5609a into Metaculus:main Dec 2, 2024
@draaglom draaglom deleted the cleanup-frontend-dependencies branch December 3, 2024 01: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
0