react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Add CI for unused dependencies

Open latekvo opened this issue 9 months ago • 0 comments

Description

Remove unnecessary packages. This PR reduces average yarn install time by __% (___ms)

  • [ ] remove all unused packages
  • [ ] add CI preventing new unused packages being added to any of the package.json files

Explanations:

  • --ignores="eslint-plugin-prettier" - eslint-plugin-prettier is unused, but required by the CIs.
  • --ignores="expo-font" - Used inside app.config.js, required by @swmansion/icons.
  • --skip-missing - False hits. Real problematic missing packages will be caught by metro.
  • --quiet - No output on success, simplifies creating CIs.

Note: all e2e tests seem to be broken

Size differences

with these changes:

  • example - 46,008 packages at 565MB
  • root - 84,891 packages at 1.3GB

without these changes (main):

  • example - 59,275 packages at 689MB
  • root - __,___ packages at 1.3GB

Test plan

Command for gesture-handler/:

  • depcheck --quiet --skip-missing --ignores="eslint-plugin-prettier"

Command for gesture-handler/example/:

  • depcheck --quiet --ignores="eslint-plugin-prettier,expo-font"

  • [ ] all CIs are passing

  • [ ] open every example app, on all platforms and architectures available for given example app

  • [ ] prettier still works as intended

latekvo avatar Feb 03 '25 15:02 latekvo