renovate 39.261.3 → 39.261.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ const logger_1 = require("../../../logger");
7
7
  const graphql_1 = require("../../../util/github/graphql");
8
8
  const tags_1 = require("../../../util/github/tags");
9
9
  const url_1 = require("../../../util/github/url");
10
+ const memory_http_cache_provider_1 = require("../../../util/http/cache/memory-http-cache-provider");
10
11
  const github_1 = require("../../../util/http/github");
11
12
  const datasource_1 = require("../datasource");
12
13
  class GithubTagsDatasource extends datasource_1.Datasource {
@@ -28,7 +29,9 @@ class GithubTagsDatasource extends datasource_1.Datasource {
28
29
  let digest = null;
29
30
  try {
30
31
  const url = `${apiBaseUrl}repos/${githubRepo}/commits?per_page=1`;
31
- const res = await this.http.getJsonUnchecked(url);
32
+ const res = await this.http.getJsonUnchecked(url, {
33
+ cacheProvider: memory_http_cache_provider_1.memCacheProvider,
34
+ });
32
35
  digest = res.body[0].sha;
33
36
  }
34
37
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/github-tags/index.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,4CAAyC;AACzC,0DAAwE;AAExE,oDAA4D;AAC5D,kDAAuE;AACvE,sDAAuD;AACvD,8CAA2C;AAQ3C,MAAa,oBAAqB,SAAQ,uBAAU;IAClD,MAAM,CAAU,EAAE,GAAG,aAAa,CAAC;IAEjB,mBAAmB,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,gBAAgB,GAAG,MAAM,CAAC;IAE1B,uBAAuB,GAAG,IAAI,CAAC;IACjD,iBAAiB;IACC,oBAAoB,GACpC,2FAA2F,CAAC;IAC5E,gBAAgB,GAAG,SAAS,CAAC;IAC7B,aAAa,GAC7B,4EAA4E,CAAC;IAEtE,IAAI,CAAa;IAE1B;QACE,KAAK,CAAC,oBAAoB,CAAC,EAAE,CAAC,CA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,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAc,UAAU,CAAC,GAAG,CACxC,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YAChD,SAAS,EAAE,IAAI;YACf,OAAO;YACP,gBAAgB;YAChB,MAAM;SACP,CAAC,CACH,CAAC;QAEF,IAAI,CAAC;YACH,6DAA6D;YAC7D,MAAM,cAAc,GAAG,MAAM,IAAA,uBAAa,EAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9D,MAAM,WAAW,GAAG,IAAI,GAAG,EAA6B,CAAC;YACzD,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE,CAAC;gBACrC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5C,CAAC;YAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;gBACnE,IAAI,YAAE,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;oBAChC,OAAO,CAAC,QAAQ,GAAG,eAAe,CAAC;gBACrC,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,0BAA0B,CAAC,CAAC;YACxC,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,gDAAgD,CAAC,CAAC;QAC1E,CAAC;QAED,MAAM,UAAU,GAAkB;YAChC,SAAS;YACT,QAAQ;SACT,CAAC;QACF,OAAO,UAAU,CAAC;IACpB,CAAC;;AA/FH,oDAgGC","sourcesContent":["import is from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport { queryReleases, queryTags } from '../../../util/github/graphql';\nimport type { GithubReleaseItem } from '../../../util/github/graphql/types';\nimport { findCommitOfTag } from '../../../util/github/tags';\nimport { getApiBaseUrl, getSourceUrl } from '../../../util/github/url';\nimport { GithubHttp } from '../../../util/http/github';\nimport { Datasource } from '../datasource';\nimport type {\n DigestConfig,\n GetReleasesConfig,\n Release,\n ReleaseResult,\n} from '../types';\n\nexport class GithubTagsDatasource extends Datasource {\n static readonly id = 'github-tags';\n\n override readonly defaultRegistryUrls = ['https://github.com'];\n\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n // Note: not sure\n override readonly releaseTimestampNote =\n 'The get release timestamp is determined from the `releaseTimestamp` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined by using the `packageName` and `registryUrl`.';\n\n override http: GithubHttp;\n\n constructor() {\n super(GithubTagsDatasource.id);\n this.http = new GithubHttp(GithubTagsDatasource.id);\n }\n\n async getCommit(\n registryUrl: string | undefined,\n githubRepo: string,\n ): Promise<string | null> {\n const apiBaseUrl = getApiBaseUrl(registryUrl);\n let digest: string | null = null;\n try {\n const url = `${apiBaseUrl}repos/${githubRepo}/commits?per_page=1`;\n const res = await this.http.getJsonUnchecked<{ sha: string }[]>(url);\n digest = res.body[0].sha;\n } catch (err) {\n logger.debug(\n { githubRepo, err, registryUrl },\n 'Error getting latest commit from GitHub repo',\n );\n }\n return digest;\n }\n\n /**\n * github.getDigest\n *\n * The `newValue` supplied here should be a valid tag for the docker image.\n *\n * Returns the latest commit hash for the repository.\n */\n override getDigest(\n { packageName: repo, registryUrl }: Partial<DigestConfig>,\n newValue?: string,\n ): Promise<string | null> {\n return newValue\n ? findCommitOfTag(registryUrl, repo!, newValue, this.http)\n : this.getCommit(registryUrl, repo!);\n }\n\n override async getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult> {\n const { registryUrl, packageName: repo } = config;\n const sourceUrl = getSourceUrl(repo, registryUrl);\n const tagsResult = await queryTags(config, this.http);\n const releases: Release[] = tagsResult.map(\n ({ version, releaseTimestamp, gitRef, hash }) => ({\n newDigest: hash,\n version,\n releaseTimestamp,\n gitRef,\n }),\n );\n\n try {\n // Fetch additional data from releases endpoint when possible\n const releasesResult = await queryReleases(config, this.http);\n const releasesMap = new Map<string, GithubReleaseItem>();\n for (const release of releasesResult) {\n releasesMap.set(release.version, release);\n }\n\n for (const release of releases) {\n const isReleaseStable = releasesMap.get(release.version)?.isStable;\n if (is.boolean(isReleaseStable)) {\n release.isStable = isReleaseStable;\n }\n }\n } catch (err) /* istanbul ignore next */ {\n logger.debug({ err }, `Error fetching additional info for GitHub tags`);\n }\n\n const dependency: ReleaseResult = {\n sourceUrl,\n releases,\n };\n return dependency;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/github-tags/index.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,4CAAyC;AACzC,0DAAwE;AAExE,oDAA4D;AAC5D,kDAAuE;AACvE,oGAAuF;AACvF,sDAAuD;AACvD,8CAA2C;AAQ3C,MAAa,oBAAqB,SAAQ,uBAAU;IAClD,MAAM,CAAU,EAAE,GAAG,aAAa,CAAC;IAEjB,mBAAmB,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,gBAAgB,GAAG,MAAM,CAAC;IAE1B,uBAAuB,GAAG,IAAI,CAAC;IACjD,iBAAiB;IACC,oBAAoB,GACpC,2FAA2F,CAAC;IAC5E,gBAAgB,GAAG,SAAS,CAAC;IAC7B,aAAa,GAC7B,4EAA4E,CAAC;IAEtE,IAAI,CAAa;IAE1B;QACE,KAAK,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,mBAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,SAAS,CACb,WAA+B,EAC/B,UAAkB;QAElB,MAAM,UAAU,GAAG,IAAA,mBAAa,EAAC,WAAW,CAAC,CAAC;QAC9C,IAAI,MAAM,GAAkB,IAAI,CAAC;QACjC,IAAI,CAAC;YACH,M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EF,IAAI,CAAC;YACH,6DAA6D;YAC7D,MAAM,cAAc,GAAG,MAAM,IAAA,uBAAa,EAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9D,MAAM,WAAW,GAAG,IAAI,GAAG,EAA6B,CAAC;YACzD,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE,CAAC;gBACrC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5C,CAAC;YAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;gBACnE,IAAI,YAAE,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;oBAChC,OAAO,CAAC,QAAQ,GAAG,eAAe,CAAC;gBACrC,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,0BAA0B,CAAC,CAAC;YACxC,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,gDAAgD,CAAC,CAAC;QAC1E,CAAC;QAED,MAAM,UAAU,GAAkB;YAChC,SAAS;YACT,QAAQ;SACT,CAAC;QACF,OAAO,UAAU,CAAC;IACpB,CAAC;;AAjGH,oDAkGC","sourcesContent":["import is from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport { queryReleases, queryTags } from '../../../util/github/graphql';\nimport type { GithubReleaseItem } from '../../../util/github/graphql/types';\nimport { findCommitOfTag } from '../../../util/github/tags';\nimport { getApiBaseUrl, getSourceUrl } from '../../../util/github/url';\nimport { memCacheProvider } from '../../../util/http/cache/memory-http-cache-provider';\nimport { GithubHttp } from '../../../util/http/github';\nimport { Datasource } from '../datasource';\nimport type {\n DigestConfig,\n GetReleasesConfig,\n Release,\n ReleaseResult,\n} from '../types';\n\nexport class GithubTagsDatasource extends Datasource {\n static readonly id = 'github-tags';\n\n override readonly defaultRegistryUrls = ['https://github.com'];\n\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n // Note: not sure\n override readonly releaseTimestampNote =\n 'The get release timestamp is determined from the `releaseTimestamp` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined by using the `packageName` and `registryUrl`.';\n\n override http: GithubHttp;\n\n constructor() {\n super(GithubTagsDatasource.id);\n this.http = new GithubHttp(GithubTagsDatasource.id);\n }\n\n async getCommit(\n registryUrl: string | undefined,\n githubRepo: string,\n ): Promise<string | null> {\n const apiBaseUrl = getApiBaseUrl(registryUrl);\n let digest: string | null = null;\n try {\n const url = `${apiBaseUrl}repos/${githubRepo}/commits?per_page=1`;\n const res = await this.http.getJsonUnchecked<{ sha: string }[]>(url, {\n cacheProvider: memCacheProvider,\n });\n digest = res.body[0].sha;\n } catch (err) {\n logger.debug(\n { githubRepo, err, registryUrl },\n 'Error getting latest commit from GitHub repo',\n );\n }\n return digest;\n }\n\n /**\n * github.getDigest\n *\n * The `newValue` supplied here should be a valid tag for the docker image.\n *\n * Returns the latest commit hash for the repository.\n */\n override getDigest(\n { packageName: repo, registryUrl }: Partial<DigestConfig>,\n newValue?: string,\n ): Promise<string | null> {\n return newValue\n ? findCommitOfTag(registryUrl, repo!, newValue, this.http)\n : this.getCommit(registryUrl, repo!);\n }\n\n override async getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult> {\n const { registryUrl, packageName: repo } = config;\n const sourceUrl = getSourceUrl(repo, registryUrl);\n const tagsResult = await queryTags(config, this.http);\n const releases: Release[] = tagsResult.map(\n ({ version, releaseTimestamp, gitRef, hash }) => ({\n newDigest: hash,\n version,\n releaseTimestamp,\n gitRef,\n }),\n );\n\n try {\n // Fetch additional data from releases endpoint when possible\n const releasesResult = await queryReleases(config, this.http);\n const releasesMap = new Map<string, GithubReleaseItem>();\n for (const release of releasesResult) {\n releasesMap.set(release.version, release);\n }\n\n for (const release of releases) {\n const isReleaseStable = releasesMap.get(release.version)?.isStable;\n if (is.boolean(isReleaseStable)) {\n release.isStable = isReleaseStable;\n }\n }\n } catch (err) /* istanbul ignore next */ {\n logger.debug({ err }, `Error fetching additional info for GitHub tags`);\n }\n\n const dependency: ReleaseResult = {\n sourceUrl,\n releases,\n };\n return dependency;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "renovate",
3
3
  "description": "Automated dependency updates. Flexible so you don't need to be.",
4
- "version": "39.261.3",
4
+ "version": "39.261.4",
5
5
  "type": "commonjs",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",