-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(internal): cached datasource lookups #5870
Conversation
…urce-cdnjs # Conflicts: # lib/datasource/cdnjs/index.spec.ts # lib/datasource/cdnjs/index.ts
Have some improvements for types, will do them later, currently on mobile only |
I split some of the work into #5871 |
# Conflicts: # lib/datasource/cdnjs/__fixtures__/KaTeX.json # lib/datasource/cdnjs/index.ts
…tebot/renovate into refactor/datasource-cdnjs # Conflicts: # lib/datasource/cdnjs/index.spec.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have the cache a default timeout?
yes, I'll add. Doing some more refactoring |
I added some code docu, so ide users can see it and it would hopefully help them to use it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my commit for changes.
JsDoc types can't be linked: microsoft/TypeScript#35524
🎉 This PR is included in version 19.195.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This PR simplifies the
cdnjs
datasource while abstracting away the task of caching. Also removes unnecessary getDigest.I took away some of the "safety" and null checks because I think this datasource should throw a DatasourceError for all errors except 404.
The important thing here is abstracting away the caching - I want to add this to all datasources if possible.