Skip to content
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

Investigate migrating away from file-system-cache #29168

Open
Tracked by #29038
JReinhold opened this issue Sep 20, 2024 · 0 comments
Open
Tracked by #29038

Investigate migrating away from file-system-cache #29168

JReinhold opened this issue Sep 20, 2024 · 0 comments

Comments

@JReinhold
Copy link
Contributor

JReinhold commented Sep 20, 2024

file-system-cache has some problems:

  1. It's a pretty big dependency for just reading and writing to the file system in a specific directory (we don't even use it to specify the directory, we use find-cache-dir for that, which is also sort of dubious).
  2. It includes all of ramda (lodash-like lib) because it imports it with a wildcard.
  3. We've had some typing issues with it before, where it was distributed without the necessary sub-type packages.
  4. The versioning/releasing is funky, as currently the versions 3.0.0-alpha.0-8 have been released after 3.0.0, which doesn't make any sense. Furthermore, 3.0.0-alpha.8 is currently the version on the latest tag: https://www.npmjs.com/package/file-system-cache?activeTab=versions

Problem 2-4 could probably be fixed upstream if we wanted instead.

It provides a nice and simple get/set API around reading/writing to a directory. It might do more, but that is all we use it for, and to me it seems like something we could easily do internally without the problems listed above. As far as I can see it doesn't do anything special to improve the perf, it just uses node:fs and fs-extra under the hood.

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

No branches or pull requests

1 participant