mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 15:36:25 +00:00
chore: reset cdnjs datasource exports and logs
This commit is contained in:
parent
cf06b69abb
commit
78a1443835
1 changed files with 4 additions and 3 deletions
|
@ -7,13 +7,13 @@ export const id = 'cdnjs';
|
|||
|
||||
const http = new Http(id);
|
||||
|
||||
export interface CdnjsAsset {
|
||||
interface CdnjsAsset {
|
||||
version: string;
|
||||
files: string[];
|
||||
sri?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface CdnjsResponse {
|
||||
interface CdnjsResponse {
|
||||
homepage?: string;
|
||||
repository?: {
|
||||
type: 'git' | unknown;
|
||||
|
@ -30,6 +30,7 @@ async function downloadLibrary(library: string): CachePromise<CdnjsResponse> {
|
|||
export async function getReleases({
|
||||
lookupName,
|
||||
}: GetReleasesConfig): Promise<ReleaseResult | null> {
|
||||
// Each library contains multiple assets, so we cache at the library level instead of per-asset
|
||||
const library = lookupName.split('/')[0];
|
||||
try {
|
||||
const { assets, homepage, repository } = await cacheAble({
|
||||
|
@ -56,7 +57,7 @@ export async function getReleases({
|
|||
return result;
|
||||
} catch (err) {
|
||||
if (err.statusCode === 404) {
|
||||
logger.debug({ library, err }, 'Package lookup error');
|
||||
logger.debug({ library }, 'cdnjs library not found');
|
||||
return null;
|
||||
}
|
||||
// Throw a DatasourceError for all other types of errors
|
||||
|
|
Loading…
Reference in a new issue