perf: remove find-up dependency, upgrade file-type dependency #8195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8111 and #8113
Before: 132 dependencies
After: 123 dependencies
This PR also contains a small performance optimization during telemetry startup: By using the async
fs.promises.readFile
instead ofreadFileSync
we're not blocking the entire thread anymore and are allowing other stuff to happen while the file is being read.Also, in our dependency checker, this moves some variables out of loops, to the module scope, as they only need to be calculated once.
We have to pin file-type to 19.3.0 and cannot upgrade it further (latest is 19.5.0). See reasoning in #8111 (comment)