-
Notifications
You must be signed in to change notification settings - Fork 24
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
Remove several unused JS dependencies #7521
Conversation
@@ -166,7 +165,6 @@ | |||
"classnames": "^2.2.5", | |||
"color-hash": "^2.0.1", | |||
"comlink": "^4.3.0", | |||
"cross-fetch": "^3.1.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lib was introduced to added a polyfill for airbrake-js
. We have switched to @airbrake/browser
in the meantime, which seems to work without polyfills.
@philippotto @daniel-wer I already tried to verify as much as possible that we really do not use these libs anywhere in our code or tooling. Yet, I didn't remember why we added some of this in the first-place or why it has become unused. Maybe some of the lib names mean more to you and you can verify that this is safe to remove. Thanks. |
@@ -154,7 +154,6 @@ | |||
"@types/pixelmatch": "^5.2.4", | |||
"@types/pngjs": "^6.0.1", | |||
"@types/three": "^0.142.0", | |||
"@use-it/interval": "^1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have implemented this ourselves in libs/react_helpers
I didn't test this PR (your performed testing looks very good 👍), but your explanations sound very reasonable and I agree that these packages seem to be unused.
I would have hoped that webpack wouldn't include unused bits, but removing unused packages is still a good idea, obviously. |
@daniel-wer Do these libs mean anything to you? Do you see any red flags? |
I don't see any red flags. Thanks for the detailed description and researching where these libs were introduced! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, then, let's do it 🎉
While debugging the library version conflicts for PR #7505 I ran a check for unused libs with
depcheck
. While it flagged many false positive libs I think it correctly identified these 5 libs as unused:[Name]: [PR where the lib was introduced]
ndarray-convolve
: Quick Select Tool PRreact-sortable-tree-theme-file-explore
: Dataset Folder PRstrip-ansi
: Virtual VX Logs@use-it/interval
: Recent Datasets conversion on Dashboard PRcross-fetch
: PR to Fix airbrake-jsHopefully this decreases our bundle size a little bit and helps to avoid version conflicts in the future.
Command to detect unused libs.
URL of deployed dev instance (used for testing):
Steps to test:
node_modules
andyarn install
Issues:
(Please delete unneeded items, merge only when none are left open)