Reduce disk churn for ESLint upgrades
See original GitHub issueThe version of ESLint you are using. 7.19.0 and earlier upgrades to, for example, 7.13.0
The problem you want to solve.
ESLint upgrades cause significant file changes in node_modules
. We have hit this problem multiple times, some statistics:
- 7.14.0 -> 7.19.0 (5 minor versions)
3796 files changed, 162528 insertions(+), 5876 deletions(-)
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692306
- 6.8.0 -> 7.13.0 (1 major version, 13 minor versions)
8913 files changed, 125261 insertions (+), 241831 deletions (-)
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534873
- 6.0.1 -> 6.8.0 (7 minor versions)
634 files changed, 47325 insertions (+), 9376 deletions (-)
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2137384
As an effect of these ESLint upgrades, checking out repositories becomes a lot slower and disk churn increases significantly for all contributors and bots.
Please note that we are required to check in our node_modules
for security and stability reasons. We are not allowed to make calls to external repositories in our testing infrastructure, which means we have to include the files in our repository. That said, even if you wouldn’t check in your files, the effects on files changed and disk operations remain. E.g. if you gitignore your node_modules
, ESLint upgrades would still cause significant disk churn.
Your take on the correct solution to problem.
Reduce the disk churn either by dropping dependencies that cause excessive disk usage and drop dependencies that are commonly duplicated in node_modules
trees. For example, in nearly all of our upgrades, we are observing multiple copies of lodash
in among others @eslint/eslintrc
or AST-like packages like es-abstract
.
Are you willing to submit a pull request to implement this change? I don’t think this is something I can do as an external contributor, but feel free to led me/the community know if there are dependencies that could be pruned and usages can be migrated to reduce overall disk usage.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:44 (43 by maintainers)
Top GitHub Comments
Good news! Removing Lodash removed 44k lines in NodeJS: https://github.com/nodejs/node/pull/38764
I’ve submitted #14287 to update
table
and removelodash
.node_modules size comparison: