MetaMask / module-lint

Analyzes one or more repos for divergence from a template repo.
1 stars 3 forks source link

Add file caching utility function #20

Closed mcmire closed 9 months ago

mcmire commented 10 months ago

One of the things that this tool will do is to hit the GitHub API and request all of the repositories under the MetaMask organization. We don't want to do this every time the tool is run, though, or else we might get rate limited. To prevent this, we can cache the response data from the API in a file.

This fetchOrPopulateFileCache function being introduced here (which we will use in a later commit) makes that possible.

Related to #5.


See here for context on how this function will eventually be used:

socket-security[bot] commented 10 months ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@metamask/utils 8.2.0 filesystem +17 4.96 MB metamaskbot
mcmire commented 9 months ago

This PR isn't needed anymore. I was going to use it to cache the call to the GitHub API which fetches the list of MetaMask repositories, but it turns out that gh can do this already, so no sense in reimplementing this (at least if/when we need to).