renovate 39.78.0 → 39.79.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,8 +3,9 @@ import type { GetReleasesConfig, ReleaseResult } from '../types';
3
3
  export declare class OrbDatasource extends Datasource {
4
4
  static readonly id = "orb";
5
5
  constructor();
6
- readonly customRegistrySupport = false;
6
+ readonly customRegistrySupport = true;
7
7
  readonly defaultRegistryUrls: string[];
8
+ readonly registryStrategy = "hunt";
8
9
  readonly releaseTimestampSupport = true;
9
10
  readonly releaseTimestampNote = "The release timestamp is determined from the `createdAt` field in the results.";
10
11
  getReleases({ packageName, registryUrl, }: GetReleasesConfig): Promise<ReleaseResult | null>;
@@ -4,6 +4,7 @@ exports.OrbDatasource = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const logger_1 = require("../../../logger");
6
6
  const decorator_1 = require("../../../util/cache/package/decorator");
7
+ const url_1 = require("../../../util/url");
7
8
  const datasource_1 = require("../datasource");
8
9
  const MAX_VERSIONS = 100;
9
10
  const query = `
@@ -24,8 +25,9 @@ class OrbDatasource extends datasource_1.Datasource {
24
25
  constructor() {
25
26
  super(OrbDatasource.id);
26
27
  }
27
- customRegistrySupport = false;
28
+ customRegistrySupport = true;
28
29
  defaultRegistryUrls = ['https://circleci.com/'];
30
+ registryStrategy = 'hunt';
29
31
  releaseTimestampSupport = true;
30
32
  releaseTimestampNote = 'The release timestamp is determined from the `createdAt` field in the results.';
31
33
  async getReleases({ packageName, registryUrl, }) {
@@ -33,7 +35,7 @@ class OrbDatasource extends datasource_1.Datasource {
33
35
  if (!registryUrl) {
34
36
  return null;
35
37
  }
36
- const url = `${registryUrl}graphql-unstable`;
38
+ const url = (0, url_1.joinUrlParts)(registryUrl, 'graphql-unstable');
37
39
  const body = {
38
40
  query,
39
41
  variables: { packageName, maxVersions: MAX_VERSIONS },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/orb/index.ts"],"names":[],"mappings":";;;;AAAA,4CAAyC;AACzC,qEAA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D,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;YAC7D,OAAO;YACP,gBAAgB,EAAE,SAAS,IAAI,IAAI;SACpC,CAAC,CAAC,CAAC;QAEJ,MAAM,GAAG,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC;QAC/D,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;QAC7B,OAAO,GAAG,CAAC;IACb,CAAC;;AAvDH,sCAwDC;AArCO;IAJL,IAAA,iBAAK,EAAC;QACL,SAAS,EAAE,cAAc,aAAa,CAAC,EAAE,EAAE;QAC3C,GAAG,EAAE,CAAC,EAAE,WAAW,EAAqB,EAAE,EAAE,CAAC,WAAW;KACzD,CAAC;gDAqCD","sourcesContent":["import { logger } from '../../../logger';\nimport { cache } from '../../../util/cache/package/decorator';\nimport { Datasource } from '../datasource';\nimport type { GetReleasesConfig, ReleaseResult } from '../types';\nimport type { OrbResponse } from './types';\n\nconst MAX_VERSIONS = 100;\n\nconst query = `\nquery($packageName: String!, $maxVersions: Int!) {\n orb(name: $packageName) {\n name,\n homeUrl,\n isPrivate,\n versions(count: $maxVersions) {\n version,\n createdAt\n }\n }\n}\n`;\n\nexport class OrbDatasource extends Datasource {\n static readonly id = 'orb';\n\n constructor() {\n super(OrbDatasource.id);\n }\n\n override readonly customRegistrySupport = false;\n\n override readonly defaultRegistryUrls = ['https://circleci.com/'];\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `createdAt` field in the results.';\n\n @cache({\n namespace: `datasource-${OrbDatasource.id}`,\n key: ({ packageName }: GetReleasesConfig) => packageName,\n })\n async getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n // istanbul ignore if\n if (!registryUrl) {\n return null;\n }\n const url = `${registryUrl}graphql-unstable`;\n const body = {\n query,\n variables: { packageName, maxVersions: MAX_VERSIONS },\n };\n const res = (\n await this.http.postJson<OrbResponse>(url, {\n body,\n })\n ).body;\n if (!res?.data?.orb) {\n logger.debug({ res }, `Failed to look up orb ${packageName}`);\n return null;\n }\n\n const { orb } = res.data;\n // Simplify response before caching and returning\n const homepage = orb.homeUrl?.length\n ? orb.homeUrl\n : `https://circleci.com/developer/orbs/orb/${packageName}`;\n const releases = orb.versions.map(({ version, createdAt }) => ({\n version,\n releaseTimestamp: createdAt ?? null,\n }));\n\n const dep = { homepage, isPrivate: !!orb.isPrivate, releases };\n logger.trace({ dep }, 'dep');\n return dep;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/orb/index.ts"],"names":[],"mappings":";;;;AAAA,4CAAyC;AACzC,qEAA8D;AAC9D,2CAAiD;AACjD,8CAA2C;AAI3C,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB,MAAM,KAAK,GAAG;;;;;;;;;;;;CAYb,CAAC;AAEF,MAAa,aAAc,SAAQ,uBAAU;IAC3C,MAAM,CAAU,EAAE,GAAG,KAAK,CAAC;IAE3B;QACE,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAEiB,qBAAqB,GAAG,IAAI,CAAC;IAE7B,mBAAmB,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAChD,gBAAgB,GAAG,MAAM,CAAC;IAE1B,uBAAuB,GAAG,IAAI,CAAC;IAC/B,oBAAoB,GACpC,gFAAgF,CAAC;IAM7E,AAAN,KAAK,CAAC,WAAW,CAAC,EAChB,WAAW,EACX,WAAW,GACO;QAClB,qBAAqB;QACrB,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,GAAG,GAAG,IAAA,kBAAY,EAAC,WAAW,EAAE,kB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,CAAC;gDAqCD","sourcesContent":["import { logger } from '../../../logger';\nimport { cache } from '../../../util/cache/package/decorator';\nimport { joinUrlParts } from '../../../util/url';\nimport { Datasource } from '../datasource';\nimport type { GetReleasesConfig, ReleaseResult } from '../types';\nimport type { OrbResponse } from './types';\n\nconst MAX_VERSIONS = 100;\n\nconst query = `\nquery($packageName: String!, $maxVersions: Int!) {\n orb(name: $packageName) {\n name,\n homeUrl,\n isPrivate,\n versions(count: $maxVersions) {\n version,\n createdAt\n }\n }\n}\n`;\n\nexport class OrbDatasource extends Datasource {\n static readonly id = 'orb';\n\n constructor() {\n super(OrbDatasource.id);\n }\n\n override readonly customRegistrySupport = true;\n\n override readonly defaultRegistryUrls = ['https://circleci.com/'];\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `createdAt` field in the results.';\n\n @cache({\n namespace: `datasource-${OrbDatasource.id}`,\n key: ({ packageName }: GetReleasesConfig) => packageName,\n })\n async getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n // istanbul ignore if\n if (!registryUrl) {\n return null;\n }\n const url = joinUrlParts(registryUrl, 'graphql-unstable');\n const body = {\n query,\n variables: { packageName, maxVersions: MAX_VERSIONS },\n };\n const res = (\n await this.http.postJson<OrbResponse>(url, {\n body,\n })\n ).body;\n if (!res?.data?.orb) {\n logger.debug({ res }, `Failed to look up orb ${packageName}`);\n return null;\n }\n\n const { orb } = res.data;\n // Simplify response before caching and returning\n const homepage = orb.homeUrl?.length\n ? orb.homeUrl\n : `https://circleci.com/developer/orbs/orb/${packageName}`;\n const releases = orb.versions.map(({ version, createdAt }) => ({\n version,\n releaseTimestamp: createdAt ?? null,\n }));\n\n const dep = { homepage, isPrivate: !!orb.isPrivate, releases };\n logger.trace({ dep }, 'dep');\n return dep;\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.78.0",
4
+ "version": "39.79.0",
5
5
  "type": "commonjs",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",