renovate 43.285.3 → 43.285.5
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.
- package/dist/config/massage.js.map +1 -1
- package/dist/config/migration.js.map +1 -1
- package/dist/config/migrations/custom/compatibility-migration.js.map +1 -1
- package/dist/config/presets/index.js.map +1 -1
- package/dist/config/validation.js.map +1 -1
- package/dist/logger/bunyan.js.map +1 -1
- package/dist/modules/datasource/go/releases-goproxy.js +10 -4
- package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
- package/dist/modules/datasource/go/schema.js +5 -1
- package/dist/modules/datasource/go/schema.js.map +1 -1
- package/dist/modules/datasource/packagist/schema.js +13 -11
- package/dist/modules/datasource/packagist/schema.js.map +1 -1
- package/dist/modules/datasource/rubygems/metadata-cache.js.map +1 -1
- package/dist/modules/manager/bazel-module/index.js +1 -0
- package/dist/modules/manager/bazel-module/index.js.map +1 -1
- package/dist/modules/manager/bazelisk/index.js +1 -0
- package/dist/modules/manager/bazelisk/index.js.map +1 -1
- package/dist/modules/manager/bun/index.js +1 -0
- package/dist/modules/manager/bun/index.js.map +1 -1
- package/dist/modules/manager/bundler/index.js +1 -0
- package/dist/modules/manager/bundler/index.js.map +1 -1
- package/dist/modules/manager/cargo/index.js +1 -0
- package/dist/modules/manager/cargo/index.js.map +1 -1
- package/dist/modules/manager/circleci/schema.js.map +1 -1
- package/dist/modules/manager/composer/index.js +1 -0
- package/dist/modules/manager/composer/index.js.map +1 -1
- package/dist/modules/manager/conan/index.js +1 -0
- package/dist/modules/manager/conan/index.js.map +1 -1
- package/dist/modules/manager/deno/index.js +1 -0
- package/dist/modules/manager/deno/index.js.map +1 -1
- package/dist/modules/manager/devbox/index.js +1 -0
- package/dist/modules/manager/devbox/index.js.map +1 -1
- package/dist/modules/manager/fingerprint.generated.js +8 -8
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/gleam/index.js +1 -0
- package/dist/modules/manager/gleam/index.js.map +1 -1
- package/dist/modules/manager/gradle/extract/consistent-versions-plugin.js.map +1 -1
- package/dist/modules/manager/gradle/index.js +1 -0
- package/dist/modules/manager/gradle/index.js.map +1 -1
- package/dist/modules/manager/helmfile/index.js +1 -0
- package/dist/modules/manager/helmfile/index.js.map +1 -1
- package/dist/modules/manager/helmv3/index.js +1 -0
- package/dist/modules/manager/helmv3/index.js.map +1 -1
- package/dist/modules/manager/jsonnet-bundler/index.js +1 -0
- package/dist/modules/manager/jsonnet-bundler/index.js.map +1 -1
- package/dist/modules/manager/mise/index.js +1 -0
- package/dist/modules/manager/mise/index.js.map +1 -1
- package/dist/modules/manager/mix/index.js +1 -0
- package/dist/modules/manager/mix/index.js.map +1 -1
- package/dist/modules/manager/nix/index.js +1 -0
- package/dist/modules/manager/nix/index.js.map +1 -1
- package/dist/modules/manager/npm/artifacts.js.map +1 -1
- package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
- package/dist/modules/manager/npm/index.js +3 -1
- package/dist/modules/manager/npm/index.js.map +1 -1
- package/dist/modules/manager/nuget/index.js +1 -0
- package/dist/modules/manager/nuget/index.js.map +1 -1
- package/dist/modules/manager/pep621/index.js +3 -1
- package/dist/modules/manager/pep621/index.js.map +1 -1
- package/dist/modules/manager/pep621/schema.js.map +1 -1
- package/dist/modules/manager/pip-compile/index.js +1 -0
- package/dist/modules/manager/pip-compile/index.js.map +1 -1
- package/dist/modules/manager/pipenv/index.js +1 -0
- package/dist/modules/manager/pipenv/index.js.map +1 -1
- package/dist/modules/manager/pixi/index.js +1 -0
- package/dist/modules/manager/pixi/index.js.map +1 -1
- package/dist/modules/manager/poetry/index.js +1 -0
- package/dist/modules/manager/poetry/index.js.map +1 -1
- package/dist/modules/manager/pub/index.js +1 -0
- package/dist/modules/manager/pub/index.js.map +1 -1
- package/dist/modules/manager/terraform/index.js +1 -0
- package/dist/modules/manager/terraform/index.js.map +1 -1
- package/dist/modules/manager/terragrunt/index.js +3 -1
- package/dist/modules/manager/terragrunt/index.js.map +1 -1
- package/dist/modules/manager/types.d.ts +12 -0
- package/dist/modules/manager/vendir/index.js +1 -0
- package/dist/modules/manager/vendir/index.js.map +1 -1
- package/dist/modules/platform/codecommit/index.js.map +1 -1
- package/dist/modules/versioning/distro.js.map +1 -1
- package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
- package/dist/util/minimum-release-age.js +33 -0
- package/dist/util/minimum-release-age.js.map +1 -0
- package/dist/util/package-rules/index.js.map +1 -1
- package/dist/util/result.js.map +1 -1
- package/dist/workers/repository/init/vulnerability.js.map +1 -1
- package/dist/workers/repository/process/lookup/filter-checks.js +2 -28
- package/dist/workers/repository/process/lookup/filter-checks.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/common.js.map +1 -1
- package/dist/workers/repository/updates/branch-name.js.map +1 -1
- package/dist/workers/repository/updates/branchify.js.map +1 -1
- package/package.json +4 -4
- package/renovate-schema.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases-goproxy.js","names":["p.map","HttpError","goVersioning"],"sources":["../../../../lib/modules/datasource/go/releases-goproxy.ts"],"sourcesContent":["import { isNonEmptyStringAndNotWhitespace, isTruthy } from '@sindresorhus/is';\nimport type { ConstraintsFilter } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport goVersioning from '../../versioning/go-mod-directive/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl } from './common.ts';\nimport { parseGoproxy, parseNoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { VersionInfo } from './schema.ts';\n\n/** TODO #42566 */\nconst goVersionRegex = regEx(/^\\s*go\\s+(?<version>[^\\s]+)\\s*$/);\n\nconst modRegex = regEx(/^(?<baseMod>.*?)(?:[./]v(?<majorVersion>\\d+))?$/);\n\n/**\n * @see https://go.dev/ref/mod#pseudo-versions\n */\nconst pseudoVersionRegex = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?(?<timestamp>\\d{14})-(?<digest>[a-f0-9]{12})/i,\n);\n\nexport function pseudoVersionToRelease(pseudoVersion: string): Release | null {\n const match = pseudoVersion.match(pseudoVersionRegex)?.groups;\n if (!match) {\n return null;\n }\n\n const { digest: newDigest, timestamp } = match;\n const releaseTimestamp = asTimestamp(timestamp);\n\n return {\n version: pseudoVersion,\n newDigest,\n releaseTimestamp,\n };\n}\n\nexport class GoProxyDatasource extends Datasource {\n static readonly id = 'go-proxy';\n\n constructor() {\n super(GoProxyDatasource.id);\n }\n\n readonly direct = new GoDirectDatasource();\n\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n logger.trace(`goproxy.getReleases(${packageName})`);\n const goproxy = getEnv().GOPROXY ?? 'https://proxy.golang.org,direct';\n if (goproxy === 'direct') {\n return this.direct.getReleases(config);\n }\n const proxyList = parseGoproxy(goproxy);\n const noproxy = parseNoproxy();\n\n let result: ReleaseResult | null = null;\n\n if (noproxy?.test(packageName)) {\n logger.debug(`Fetching ${packageName} via GONOPROXY match`);\n result = await this.direct.getReleases(config);\n return result;\n }\n\n for (const { url, fallback } of proxyList) {\n try {\n if (url === 'off') {\n break;\n } else if (url === 'direct') {\n result = await this.direct.getReleases(config);\n break;\n }\n\n const res = await this.getVersionsWithInfo(\n url,\n packageName,\n config.constraintsFiltering,\n );\n if (res.releases.length) {\n result = res;\n break;\n }\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const statusCode = potentialHttpError?.response?.statusCode;\n const canFallback =\n fallback === '|' ? true : statusCode === 404 || statusCode === 410;\n const msg = canFallback\n ? 'Goproxy error: trying next URL provided with GOPROXY'\n : 'Goproxy error: skipping other URLs provided with GOPROXY';\n logger.debug({ err }, msg);\n if (!canFallback) {\n break;\n }\n }\n }\n\n if (result && !result.sourceUrl) {\n try {\n const datasource = await BaseGoDatasource.getDatasource(packageName);\n const sourceUrl = getSourceUrl(datasource);\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n } catch (err) {\n logger.trace({ err }, `Can't get datasource for ${packageName}`);\n }\n }\n\n return result;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getCacheKey(config),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Avoid ambiguity when serving from case-insensitive file systems.\n *\n * @see https://golang.org/ref/mod#goproxy-protocol\n */\n encodeCase(input: string): string {\n return input.replace(regEx(/([A-Z])/g), (x) => `!${x.toLowerCase()}`);\n }\n\n async listVersions(baseUrl: string, packageName: string): Promise<Release[]> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n 'list',\n );\n const { body } = await this.http.getText(url);\n return filterMap(body.split(newlineRegex), (str) => {\n if (!isNonEmptyStringAndNotWhitespace(str)) {\n return null;\n }\n\n const [version, timestamp] = str.trim().split(regEx(/\\s+/));\n const release: Release = pseudoVersionToRelease(version) ?? { version };\n\n const releaseTimestamp = asTimestamp(timestamp);\n if (releaseTimestamp) {\n release.releaseTimestamp = releaseTimestamp;\n }\n\n return release;\n });\n }\n\n async versionInfo(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<Release> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.info`,\n );\n const res = await this.http.getJson(url, VersionInfo);\n\n const result: Release = {\n version: res.body.Version,\n };\n\n const releaseTimestamp = asTimestamp(res.body.Time);\n if (releaseTimestamp) {\n result.releaseTimestamp = releaseTimestamp;\n }\n\n return result;\n }\n\n /**\n * Retrieve the `go` directive for a given Go Module.\n *\n * NOTE that this means the `go` directive, not the `toolchain` directive.\n */\n async retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getVersionedCacheKey(packageName, version),\n // a module's `go.mod` should /never/ change after it's published. If going via the Go Proxy and the Go Checksum Database, a change in this value will result in build failures.\n ttlMinutes: 100 * 24 * 60,\n },\n () => this._retrieveGoDirectiveForModule(baseUrl, packageName, version),\n );\n }\n\n async _retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.mod`,\n );\n const res = await this.http.getText(url);\n\n let goDirective: string | undefined = undefined;\n\n for (const line of res.body.split('\\n')) {\n const goVersionMatches = goVersionRegex.exec(line)?.groups;\n if (goVersionMatches) {\n goDirective = goVersionMatches.version;\n break;\n }\n }\n\n if (!goDirective) {\n return goDirective;\n }\n\n // always return it in full SemVer format, which can then be matched on using `semver` or `semver-coerced`\n const parts = goDirective.split('.');\n if (parts.length === 1) {\n return `${parts[0]}.0.0`;\n }\n if (parts.length === 2) {\n return `${parts[0]}.${parts[1]}.0`;\n }\n return `${parts[0]}.${parts[1]}.${parts[2]}`;\n }\n\n async getLatestVersion(\n baseUrl: string,\n packageName: string,\n ): Promise<string | null> {\n try {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@latest',\n );\n const res = await this.http.getJson(url, VersionInfo);\n return res.body.Version;\n } catch (err) {\n logger.trace({ err }, 'Failed to get latest version');\n return null;\n }\n }\n\n async getVersionsWithInfo(\n baseUrl: string,\n packageName: string,\n constraintsFiltering: ConstraintsFilter | undefined,\n ): Promise<ReleaseResult> {\n const isGopkgin = packageName.startsWith('gopkg.in/');\n const majorSuffixSeparator = isGopkgin ? '.' : '/';\n const modParts = packageName.match(modRegex)?.groups;\n const baseMod =\n modParts?.baseMod ??\n /* v8 ignore next -- defensive: modRegex matches any non-empty package name, so baseMod is always set */ packageName;\n const packageMajor = parseInt(modParts?.majorVersion ?? '0', 10);\n\n const result: ReleaseResult = { releases: [] };\n for (let major = packageMajor; ; major += 1) {\n let pkg = `${baseMod}${majorSuffixSeparator}v${major}`;\n if (!isGopkgin && major < 2) {\n pkg = baseMod;\n major += 1; // v0 and v1 are the same module\n }\n\n let releases: Release[] = [];\n\n try {\n const res = await this.listVersions(baseUrl, pkg);\n\n // Artifactory returns all versions in any major (past and future),\n // so starting from v2, we filter them in order to avoid the infinite loop\n const filteredReleases = res.filter(({ version }) => {\n if (major < 2) {\n return true;\n }\n\n return (\n version.split(regEx(/[^\\d]+/)).find(isTruthy) === major.toString()\n );\n });\n\n releases = await p.map(filteredReleases, async (versionInfo) => {\n const { version, newDigest, releaseTimestamp } = versionInfo;\n\n if (releaseTimestamp) {\n return { version, newDigest, releaseTimestamp };\n }\n\n try {\n return await this.versionInfo(baseUrl, pkg, version);\n } catch (err) {\n logger.trace({ err }, `Can't obtain data from ${baseUrl}`);\n return { version };\n }\n });\n\n if (constraintsFiltering === 'strict') {\n releases = await p.map(releases, async (rel) => {\n try {\n const goDirective = await this.retrieveGoDirectiveForModule(\n baseUrl,\n pkg,\n rel.version,\n );\n if (goDirective) {\n rel.constraints ??= {};\n rel.constraints['%goMod'] ??= [];\n rel.constraints['%goMod'].push(goDirective);\n }\n } catch (err) {\n logger.trace(\n { err },\n `Can't obtain \\`go\\` directive from ${baseUrl}`,\n );\n }\n\n return rel;\n });\n }\n\n result.releases.push(...releases);\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const status = potentialHttpError.response?.statusCode;\n if (\n potentialHttpError instanceof HttpError &&\n (status === 404 || status === 403) &&\n major !== packageMajor\n ) {\n break;\n }\n\n throw err;\n }\n\n const latestVersion = await this.getLatestVersion(baseUrl, pkg);\n if (latestVersion) {\n result.tags ??= {};\n result.tags.latest ??= latestVersion;\n if (goVersioning.isGreaterThan(latestVersion, result.tags.latest)) {\n result.tags.latest = latestVersion;\n }\n if (!result.releases.length) {\n const releaseFromLatest = pseudoVersionToRelease(latestVersion);\n if (releaseFromLatest) {\n result.releases.push(releaseFromLatest);\n }\n }\n }\n\n if (!releases.length) {\n break;\n }\n }\n\n return result;\n }\n\n static getCacheKey({\n packageName,\n constraintsFiltering,\n }: GetReleasesConfig): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n const constraintsFilteringKey =\n constraintsFiltering && constraintsFiltering !== 'none'\n ? `@@${constraintsFiltering}`\n : '';\n // TODO: types (#22198)\n return `${packageName}@@${goproxy}@@${noproxy?.toString()}${constraintsFilteringKey}`;\n }\n\n static getVersionedCacheKey(packageName: string, version: string): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n // TODO: types (#22198)\n return `${packageName}@@${version}@@${goproxy}@@${noproxy?.toString()}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,iBAAiB,MAAM,iCAAiC;AAE9D,MAAM,WAAW,MAAM,iDAAiD;;;;AAKxE,MAAM,qBAAqB,MACzB,gFACF;AAEA,SAAgB,uBAAuB,eAAuC;CAC5E,MAAM,QAAQ,cAAc,MAAM,kBAAkB,CAAC,EAAE;CACvD,IAAI,CAAC,OACH,OAAO;CAGT,MAAM,EAAE,QAAQ,WAAW,cAAc;CAGzC,OAAO;EACL,SAAS;EACT;EACA,kBALuB,YAAY,SAKpB;CACjB;AACF;AAEA,IAAa,oBAAb,MAAa,0BAA0B,WAAW;CAChD,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,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KAAK,WAAW;IACvB,IAAIC,IAAa,cAAc,eAAe,OAAO,KAAK,MAAM,GAC9D,OAAO,KAAK,SAAS;IAEvB,IAAI,CAAC,OAAO,SAAS,QAAQ;KAC3B,MAAM,oBAAoB,uBAAuB,aAAa;KAC9D,IAAI,mBACF,OAAO,SAAS,KAAK,iBAAiB;IAE1C;GACF;GAEA,IAAI,CAAC,SAAS,QACZ;EAEJ;EAEA,OAAO;CACT;CAEA,OAAO,YAAY,EACjB,aACA,wBAC4B;EAC5B,MAAM,UAAU,OAAO,CAAC,CAAC;EACzB,MAAM,UAAU,aAAa;EAC7B,MAAM,0BACJ,wBAAwB,yBAAyB,SAC7C,KAAK,yBACL;EAEN,OAAO,GAAG,YAAY,IAAI,QAAQ,IAAI,SAAS,SAAS,IAAI;CAC9D;CAEA,OAAO,qBAAqB,aAAqB,SAAyB;EAIxE,OAAO,GAAG,YAAY,IAAI,QAAQ,IAHlB,OAAO,CAAC,CAAC,QAGqB,IAF9B,aAEwC,CAAC,EAAE,SAAS;CACtE;AACF"}
|
|
1
|
+
{"version":3,"file":"releases-goproxy.js","names":["p.map","HttpError","goVersioning"],"sources":["../../../../lib/modules/datasource/go/releases-goproxy.ts"],"sourcesContent":["import {\n isNonEmptyString,\n isNonEmptyStringAndNotWhitespace,\n isTruthy,\n} from '@sindresorhus/is';\nimport type { ConstraintsFilter } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport goVersioning from '../../versioning/go-mod-directive/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl } from './common.ts';\nimport { parseGoproxy, parseNoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { VersionInfo } from './schema.ts';\n\n/** TODO #42566 */\nconst goVersionRegex = regEx(/^\\s*go\\s+(?<version>[^\\s]+)\\s*$/);\n\nconst modRegex = regEx(/^(?<baseMod>.*?)(?:[./]v(?<majorVersion>\\d+))?$/);\n\n/**\n * @see https://go.dev/ref/mod#pseudo-versions\n */\nconst pseudoVersionRegex = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?(?<timestamp>\\d{14})-(?<digest>[a-f0-9]{12})/i,\n);\n\nexport function pseudoVersionToRelease(pseudoVersion: string): Release | null {\n const match = pseudoVersion.match(pseudoVersionRegex)?.groups;\n if (!match) {\n return null;\n }\n\n const { digest: newDigest, timestamp } = match;\n const releaseTimestamp = asTimestamp(timestamp);\n\n return {\n version: pseudoVersion,\n newDigest,\n releaseTimestamp,\n };\n}\n\nexport class GoProxyDatasource extends Datasource {\n static readonly id = 'go-proxy';\n\n constructor() {\n super(GoProxyDatasource.id);\n }\n\n readonly direct = new GoDirectDatasource();\n\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n logger.trace(`goproxy.getReleases(${packageName})`);\n const goproxy = getEnv().GOPROXY ?? 'https://proxy.golang.org,direct';\n if (goproxy === 'direct') {\n return this.direct.getReleases(config);\n }\n const proxyList = parseGoproxy(goproxy);\n const noproxy = parseNoproxy();\n\n let result: ReleaseResult | null = null;\n\n if (noproxy?.test(packageName)) {\n logger.debug(`Fetching ${packageName} via GONOPROXY match`);\n result = await this.direct.getReleases(config);\n return result;\n }\n\n for (const { url, fallback } of proxyList) {\n try {\n if (url === 'off') {\n break;\n } else if (url === 'direct') {\n result = await this.direct.getReleases(config);\n break;\n }\n\n const res = await this.getVersionsWithInfo(\n url,\n packageName,\n config.constraintsFiltering,\n );\n if (res.releases.length) {\n result = res;\n break;\n }\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const statusCode = potentialHttpError?.response?.statusCode;\n const canFallback =\n fallback === '|' ? true : statusCode === 404 || statusCode === 410;\n const msg = canFallback\n ? 'Goproxy error: trying next URL provided with GOPROXY'\n : 'Goproxy error: skipping other URLs provided with GOPROXY';\n logger.debug({ err }, msg);\n if (!canFallback) {\n break;\n }\n }\n }\n\n if (result && !result.sourceUrl) {\n try {\n const datasource = await BaseGoDatasource.getDatasource(packageName);\n const sourceUrl = getSourceUrl(datasource);\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n } catch (err) {\n logger.trace({ err }, `Can't get datasource for ${packageName}`);\n }\n }\n\n return result;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getCacheKey(config),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Avoid ambiguity when serving from case-insensitive file systems.\n *\n * @see https://golang.org/ref/mod#goproxy-protocol\n */\n encodeCase(input: string): string {\n return input.replace(regEx(/([A-Z])/g), (x) => `!${x.toLowerCase()}`);\n }\n\n async listVersions(baseUrl: string, packageName: string): Promise<Release[]> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n 'list',\n );\n const { body } = await this.http.getText(url);\n return filterMap(body.split(newlineRegex), (str) => {\n if (!isNonEmptyStringAndNotWhitespace(str)) {\n return null;\n }\n\n const [version, timestamp] = str.trim().split(regEx(/\\s+/));\n const release: Release = pseudoVersionToRelease(version) ?? { version };\n\n const releaseTimestamp = asTimestamp(timestamp);\n if (releaseTimestamp) {\n release.releaseTimestamp = releaseTimestamp;\n }\n\n return release;\n });\n }\n\n async versionInfo(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<Release> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.info`,\n );\n const res = await this.http.getJson(url, VersionInfo);\n\n const result: Release = {\n version: res.body.Version,\n };\n\n const releaseTimestamp = asTimestamp(res.body.Time);\n if (releaseTimestamp) {\n result.releaseTimestamp = releaseTimestamp;\n }\n\n return result;\n }\n\n /**\n * Retrieve the `go` directive for a given Go Module.\n *\n * NOTE that this means the `go` directive, not the `toolchain` directive.\n */\n async retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getVersionedCacheKey(packageName, version),\n // a module's `go.mod` should /never/ change after it's published. If going via the Go Proxy and the Go Checksum Database, a change in this value will result in build failures.\n ttlMinutes: 100 * 24 * 60,\n },\n () => this._retrieveGoDirectiveForModule(baseUrl, packageName, version),\n );\n }\n\n async _retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.mod`,\n );\n const res = await this.http.getText(url);\n\n let goDirective: string | undefined = undefined;\n\n for (const line of res.body.split('\\n')) {\n const goVersionMatches = goVersionRegex.exec(line)?.groups;\n if (goVersionMatches) {\n goDirective = goVersionMatches.version;\n break;\n }\n }\n\n if (!goDirective) {\n return goDirective;\n }\n\n // always return it in full SemVer format, which can then be matched on using `semver` or `semver-coerced`\n const parts = goDirective.split('.');\n if (parts.length === 1) {\n return `${parts[0]}.0.0`;\n }\n if (parts.length === 2) {\n return `${parts[0]}.${parts[1]}.0`;\n }\n return `${parts[0]}.${parts[1]}.${parts[2]}`;\n }\n\n async getLatestVersion(\n baseUrl: string,\n packageName: string,\n ): Promise<{ version: string; sourceUrl?: string } | null> {\n try {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@latest',\n );\n const res = await this.http.getJson(url, VersionInfo);\n const { Version: version, Origin: origin } = res.body;\n // Extract sourceUrl from GOPROXY Origin when present, avoiding go-get to\n // vanity hosts (https://github.com/renovatebot/renovate/discussions/44898)\n const sourceUrl =\n origin?.VCS === 'git' && isNonEmptyString(origin.URL)\n ? origin.URL.replace(regEx(/\\.git$/), '')\n : undefined;\n return { version, sourceUrl };\n } catch (err) {\n logger.trace({ err }, 'Failed to get latest version');\n return null;\n }\n }\n\n async getVersionsWithInfo(\n baseUrl: string,\n packageName: string,\n constraintsFiltering: ConstraintsFilter | undefined,\n ): Promise<ReleaseResult> {\n const isGopkgin = packageName.startsWith('gopkg.in/');\n const majorSuffixSeparator = isGopkgin ? '.' : '/';\n const modParts = packageName.match(modRegex)?.groups;\n const baseMod =\n modParts?.baseMod ??\n /* v8 ignore next -- defensive: modRegex matches any non-empty package name, so baseMod is always set */ packageName;\n const packageMajor = parseInt(modParts?.majorVersion ?? '0', 10);\n\n const result: ReleaseResult = { releases: [] };\n for (let major = packageMajor; ; major += 1) {\n let pkg = `${baseMod}${majorSuffixSeparator}v${major}`;\n if (!isGopkgin && major < 2) {\n pkg = baseMod;\n major += 1; // v0 and v1 are the same module\n }\n\n let releases: Release[] = [];\n\n try {\n const res = await this.listVersions(baseUrl, pkg);\n\n // Artifactory returns all versions in any major (past and future),\n // so starting from v2, we filter them in order to avoid the infinite loop\n const filteredReleases = res.filter(({ version }) => {\n if (major < 2) {\n return true;\n }\n\n return (\n version.split(regEx(/[^\\d]+/)).find(isTruthy) === major.toString()\n );\n });\n\n releases = await p.map(filteredReleases, async (versionInfo) => {\n const { version, newDigest, releaseTimestamp } = versionInfo;\n\n if (releaseTimestamp) {\n return { version, newDigest, releaseTimestamp };\n }\n\n try {\n return await this.versionInfo(baseUrl, pkg, version);\n } catch (err) {\n logger.trace({ err }, `Can't obtain data from ${baseUrl}`);\n return { version };\n }\n });\n\n if (constraintsFiltering === 'strict') {\n releases = await p.map(releases, async (rel) => {\n try {\n const goDirective = await this.retrieveGoDirectiveForModule(\n baseUrl,\n pkg,\n rel.version,\n );\n if (goDirective) {\n rel.constraints ??= {};\n rel.constraints['%goMod'] ??= [];\n rel.constraints['%goMod'].push(goDirective);\n }\n } catch (err) {\n logger.trace(\n { err },\n `Can't obtain \\`go\\` directive from ${baseUrl}`,\n );\n }\n\n return rel;\n });\n }\n\n result.releases.push(...releases);\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const status = potentialHttpError.response?.statusCode;\n if (\n potentialHttpError instanceof HttpError &&\n (status === 404 || status === 403) &&\n major !== packageMajor\n ) {\n break;\n }\n\n throw err;\n }\n\n const latest = await this.getLatestVersion(baseUrl, pkg);\n if (latest) {\n const { version: latestVersion, sourceUrl } = latest;\n result.tags ??= {};\n result.tags.latest ??= latestVersion;\n if (goVersioning.isGreaterThan(latestVersion, result.tags.latest)) {\n result.tags.latest = latestVersion;\n }\n if (sourceUrl) {\n result.sourceUrl ??= sourceUrl;\n }\n if (!result.releases.length) {\n const releaseFromLatest = pseudoVersionToRelease(latestVersion);\n if (releaseFromLatest) {\n result.releases.push(releaseFromLatest);\n }\n }\n }\n\n if (!releases.length) {\n break;\n }\n }\n\n return result;\n }\n\n static getCacheKey({\n packageName,\n constraintsFiltering,\n }: GetReleasesConfig): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n const constraintsFilteringKey =\n constraintsFiltering && constraintsFiltering !== 'none'\n ? `@@${constraintsFiltering}`\n : '';\n // TODO: types (#22198)\n return `${packageName}@@${goproxy}@@${noproxy?.toString()}${constraintsFilteringKey}`;\n }\n\n static getVersionedCacheKey(packageName: string, version: string): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n // TODO: types (#22198)\n return `${packageName}@@${version}@@${goproxy}@@${noproxy?.toString()}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,iBAAiB,MAAM,iCAAiC;AAE9D,MAAM,WA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
|
|
@@ -3,7 +3,11 @@ import { z } from "zod/v4";
|
|
|
3
3
|
//#region lib/modules/datasource/go/schema.ts
|
|
4
4
|
const VersionInfo = z.object({
|
|
5
5
|
Version: z.string(),
|
|
6
|
-
Time: MaybeTimestamp
|
|
6
|
+
Time: MaybeTimestamp,
|
|
7
|
+
Origin: z.object({
|
|
8
|
+
VCS: z.string().optional(),
|
|
9
|
+
URL: z.string().optional()
|
|
10
|
+
}).optional()
|
|
7
11
|
});
|
|
8
12
|
//#endregion
|
|
9
13
|
export { VersionInfo };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/go/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\n\nexport const VersionInfo = z.object({\n Version: z.string(),\n Time: MaybeTimestamp,\n});\n\nexport type VersionInfo = z.infer<typeof VersionInfo>;\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/go/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\n\n// https://go.dev/ref/mod#goproxy-protocol\nexport const VersionInfo = z.object({\n Version: z.string(),\n Time: MaybeTimestamp,\n // https://github.com/golang/go/blob/dd612356d8bfe352ec7812ce6c93c9fd2bc10c81/src/cmd/go/internal/modfetch/codehost/codehost.go#L93\n Origin: z\n .object({\n VCS: z.string().optional(),\n URL: z.string().optional(),\n })\n .optional(),\n});\n\nexport type VersionInfo = z.infer<typeof VersionInfo>;\n"],"mappings":";;;AAIA,MAAa,cAAc,EAAE,OAAO;CAClC,SAAS,EAAE,OAAO;CAClB,MAAM;CAEN,QAAQ,EACL,OAAO;EACN,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS;EACzB,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,CAAC,CAAC,CACD,SAAS;AACd,CAAC"}
|
|
@@ -112,17 +112,19 @@ const RegistryMeta = z.record(z.string(), z.unknown()).catch({}).pipe(PackagistF
|
|
|
112
112
|
["providers-url"]: z.string().nullable().catch(null),
|
|
113
113
|
["metadata-url"]: z.string().nullable().catch(null),
|
|
114
114
|
["available-packages"]: z.array(z.string()).nullable().catch(null)
|
|
115
|
-
}))).transform(({ ["includes"]: includesFiles, ["packages"]: packages, ["provider-includes"]: files, ["providers"]: providerPackages, ["providers-lazy-url"]: providersLazyUrl, ["providers-url"]: providersUrl, ["metadata-url"]: metadataUrl, ["available-packages"]: availablePackages }) =>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
115
|
+
}))).transform(({ ["includes"]: includesFiles, ["packages"]: packages, ["provider-includes"]: files, ["providers"]: providerPackages, ["providers-lazy-url"]: providersLazyUrl, ["providers-url"]: providersUrl, ["metadata-url"]: metadataUrl, ["available-packages"]: availablePackages }) => {
|
|
116
|
+
return {
|
|
117
|
+
packages,
|
|
118
|
+
includesFiles,
|
|
119
|
+
providerPackages,
|
|
120
|
+
files,
|
|
121
|
+
providersUrl,
|
|
122
|
+
providersLazyUrl,
|
|
123
|
+
metadataUrl,
|
|
124
|
+
includesPackages: {},
|
|
125
|
+
availablePackages
|
|
126
|
+
};
|
|
127
|
+
});
|
|
126
128
|
//#endregion
|
|
127
129
|
export { ComposerPackagesResponse, ComposerRelease, ComposerReleases, HashSpec, MinifiedArray, PackagesResponse, PackagistFile, RegistryMeta, extractDepReleases, extractReleaseResult, parsePackagesResponse, parsePackagesResponses };
|
|
128
130
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/packagist/schema.ts"],"sourcesContent":["import { isUndefined } from '@sindresorhus/is';\nimport { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport {\n LooseArray,\n LooseRecord,\n Nullish,\n} from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release, ReleaseResult } from '../types.ts';\n\nexport const MinifiedArray = z\n .array(z.record(z.string(), z.unknown()))\n .transform((xs) => {\n // Ported from: https://github.com/composer/metadata-minifier/blob/main/src/MetadataMinifier.php#L17\n if (xs.length === 0) {\n return xs;\n }\n\n const prevVals: Record<string, unknown> = {};\n for (const x of xs) {\n for (const key of Object.keys(x)) {\n prevVals[key] ??= undefined;\n }\n\n for (const key of Object.keys(prevVals)) {\n const val = x[key];\n if (val === '__unset') {\n delete x[key];\n prevVals[key] = undefined;\n continue;\n }\n\n if (!isUndefined(val)) {\n prevVals[key] = val;\n continue;\n }\n\n if (!isUndefined(prevVals[key])) {\n x[key] = prevVals[key];\n continue;\n }\n }\n }\n\n return xs;\n });\nexport type MinifiedArray = z.infer<typeof MinifiedArray>;\n\nexport const ComposerRelease = z.object({\n version: z.union([z.string(), z.number().transform((v) => v.toString())]),\n homepage: z.string().nullable().catch(null),\n source: z.object({ url: z.string() }).nullable().catch(null),\n time: MaybeTimestamp,\n ['published-time']: Nullish(MaybeTimestamp),\n require: z.object({ php: z.string() }).nullable().catch(null),\n abandoned: z.union([z.string(), z.boolean()]).optional().catch(undefined),\n});\nexport type ComposerRelease = z.infer<typeof ComposerRelease>;\n\nexport const ComposerReleases = z\n .union([\n MinifiedArray.pipe(LooseArray(ComposerRelease)),\n LooseRecord(ComposerRelease).transform((map) => Object.values(map)),\n ])\n .catch([]);\nexport type ComposerReleases = z.infer<typeof ComposerReleases>;\n\nexport const ComposerPackagesResponse = z\n .object({\n packageName: z.string(),\n packagesResponse: z.object({\n packages: z.record(z.string(), z.unknown()),\n }),\n })\n .transform(\n ({ packageName, packagesResponse }) =>\n packagesResponse.packages[packageName],\n )\n .transform((xs) => ComposerReleases.parse(xs));\nexport type ComposerPackagesResponse = z.infer<typeof ComposerPackagesResponse>;\n\nexport function parsePackagesResponse(\n packageName: string,\n packagesResponse: unknown,\n): ComposerReleases {\n try {\n return ComposerPackagesResponse.parse({ packageName, packagesResponse });\n } catch (err) {\n logger.debug(\n { packageName, err },\n `Error parsing packagist response for ${packageName}`,\n );\n return [];\n }\n}\n\nexport function extractReleaseResult(\n ...composerReleasesArrays: ComposerReleases[]\n): ReleaseResult | null {\n const releases: Release[] = [];\n let homepage: string | null | undefined;\n let sourceUrl: string | null | undefined;\n let deprecationMessage: string | undefined;\n\n for (const composerReleasesArray of composerReleasesArrays) {\n for (const composerRelease of composerReleasesArray) {\n const version = composerRelease.version.replace(/^v/, '');\n const gitRef = composerRelease.version;\n\n const dep: Release = { version, gitRef };\n\n // Packagist's `published-time` reflects when the version was actually published to the registry;\n // prefer it over `time` (the git tag's `releasedAt`, which could be when the commit that the tag points at was pushed, not the time the release itself was made public to the world), falling back when absent.\n const releaseTimestamp =\n composerRelease['published-time'] ?? composerRelease.time;\n if (releaseTimestamp) {\n dep.releaseTimestamp = releaseTimestamp;\n }\n\n if (composerRelease.require?.php) {\n dep.constraints = { php: [composerRelease.require.php] };\n }\n\n if (composerRelease.abandoned) {\n dep.isDeprecated = true;\n deprecationMessage ??= getAbandonedMessage(composerRelease.abandoned);\n // TODO #44060 when `abandoned` is a package name, emit replacementName/replacementVersion to open a replacement PR\n }\n\n releases.push(dep);\n\n if (!homepage && composerRelease.homepage) {\n homepage = composerRelease.homepage;\n }\n\n if (!sourceUrl && composerRelease.source?.url) {\n sourceUrl = composerRelease.source.url;\n }\n }\n }\n\n if (releases.length === 0) {\n return null;\n }\n\n const result: ReleaseResult = { releases };\n\n if (homepage) {\n result.homepage = homepage;\n }\n\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n\n if (deprecationMessage) {\n result.deprecationMessage = deprecationMessage;\n }\n\n return result;\n}\n\nfunction getAbandonedMessage(abandoned: string | boolean): string {\n const message = 'This package is abandoned and no longer maintained.';\n if (typeof abandoned === 'string') {\n return `${message} The author suggests using the \\`${abandoned}\\` package instead.`;\n }\n return message;\n}\n\nexport function extractDepReleases(\n composerReleases: unknown,\n): ReleaseResult | null {\n const parsedReleases = ComposerReleases.parse(composerReleases);\n return extractReleaseResult(parsedReleases);\n}\n\nexport function parsePackagesResponses(\n packageName: string,\n packagesResponses: unknown[],\n): ReleaseResult | null {\n const releaseArrays = packagesResponses.map((pkgResp) =>\n parsePackagesResponse(packageName, pkgResp),\n );\n return extractReleaseResult(...releaseArrays);\n}\n\nexport const HashSpec = z.union([\n z\n .object({ sha256: z.string().nullable() })\n .transform(({ sha256 }) => ({ hash: sha256 })),\n z\n .object({ sha1: z.string().nullable() })\n .transform(({ sha1 }) => ({ hash: sha1 })),\n]);\nexport type HashSpec = z.infer<typeof HashSpec>;\n\nexport const RegistryFile = z.intersection(\n HashSpec,\n z.object({ key: z.string() }),\n);\nexport type RegistryFile = z.infer<typeof RegistryFile>;\n\nexport const PackagesResponse = z.object({\n packages: LooseRecord(ComposerReleases).catch({}),\n});\nexport type PackagesResponse = z.infer<typeof PackagesResponse>;\n\nexport const PackagistFile = PackagesResponse.merge(\n z.object({\n providers: LooseRecord(HashSpec)\n .transform((x) =>\n Object.fromEntries(\n Object.entries(x).map(([key, { hash }]) => [key, hash]),\n ),\n )\n .catch({}),\n }),\n);\nexport type PackagistFile = z.infer<typeof PackagistFile>;\n\nexport const RegistryMeta = z\n .record(z.string(), z.unknown())\n .catch({})\n .pipe(\n PackagistFile.merge(\n z.object({\n ['includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([name, { hash }]) => ({ key: name, hash })),\n )\n .catch([]),\n ['provider-includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([key, { hash }]) => ({ key, hash })),\n )\n .catch([]),\n ['providers-lazy-url']: z.string().nullable().catch(null),\n ['providers-url']: z.string().nullable().catch(null),\n ['metadata-url']: z.string().nullable().catch(null),\n ['available-packages']: z.array(z.string()).nullable().catch(null),\n }),\n ),\n )\n .transform(\n ({\n ['includes']: includesFiles,\n ['packages']: packages,\n ['provider-includes']: files,\n ['providers']: providerPackages,\n ['providers-lazy-url']: providersLazyUrl,\n ['providers-url']: providersUrl,\n ['metadata-url']: metadataUrl,\n ['available-packages']: availablePackages,\n }) => ({\n packages,\n includesFiles,\n providerPackages,\n files,\n providersUrl,\n providersLazyUrl,\n metadataUrl,\n includesPackages: {} as Record<string, ReleaseResult | null>,\n availablePackages,\n }),\n );\nexport type RegistryMeta = z.infer<typeof RegistryMeta>;\n"],"mappings":";;;;;;AAWA,MAAa,gBAAgB,EAC1B,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CACxC,WAAW,OAAO;CAEjB,IAAI,GAAG,WAAW,GAChB,OAAO;CAGT,MAAM,WAAoC,CAAC;CAC3C,KAAK,MAAM,KAAK,IAAI;EAClB,KAAK,MAAM,OAAO,OAAO,KAAK,CAAC,GAC7B,SAAS,SAAS,KAAA;EAGpB,KAAK,MAAM,OAAO,OAAO,KAAK,QAAQ,GAAG;GACvC,MAAM,MAAM,EAAE;GACd,IAAI,QAAQ,WAAW;IACrB,OAAO,EAAE;IACT,SAAS,OAAO,KAAA;IAChB;GACF;GAEA,IAAI,CAAC,YAAY,GAAG,GAAG;IACrB,SAAS,OAAO;IAChB;GACF;GAEA,IAAI,CAAC,YAAY,SAAS,IAAI,GAAG;IAC/B,EAAE,OAAO,SAAS;IAClB;GACF;EACF;CACF;CAEA,OAAO;AACT,CAAC;AAGH,MAAa,kBAAkB,EAAE,OAAO;CACtC,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,WAAW,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACxE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;CAC1C,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC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Ac,mBACd,uBAAuB,mBACvB,kBAAkB,eAClB,iBAAiB,cACjB,uBAAuB,yBACnB;CACL;CACA;CACA;CACA;CACA;CACA;CACA;CACA,kBAAkB,CAAC;CACnB;AACF,EACF"}
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/packagist/schema.ts"],"sourcesContent":["import { isUndefined } from '@sindresorhus/is';\nimport { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport {\n LooseArray,\n LooseRecord,\n Nullish,\n} from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release, ReleaseResult } from '../types.ts';\n\nexport const MinifiedArray = z\n .array(z.record(z.string(), z.unknown()))\n .transform((xs) => {\n // Ported from: https://github.com/composer/metadata-minifier/blob/main/src/MetadataMinifier.php#L17\n if (xs.length === 0) {\n return xs;\n }\n\n const prevVals: Record<string, unknown> = {};\n for (const x of xs) {\n for (const key of Object.keys(x)) {\n prevVals[key] ??= undefined;\n }\n\n for (const key of Object.keys(prevVals)) {\n const val = x[key];\n if (val === '__unset') {\n delete x[key];\n prevVals[key] = undefined;\n continue;\n }\n\n if (!isUndefined(val)) {\n prevVals[key] = val;\n continue;\n }\n\n if (!isUndefined(prevVals[key])) {\n x[key] = prevVals[key];\n continue;\n }\n }\n }\n\n return xs;\n });\nexport type MinifiedArray = z.infer<typeof MinifiedArray>;\n\nexport const ComposerRelease = z.object({\n version: z.union([z.string(), z.number().transform((v) => v.toString())]),\n homepage: z.string().nullable().catch(null),\n source: z.object({ url: z.string() }).nullable().catch(null),\n time: MaybeTimestamp,\n ['published-time']: Nullish(MaybeTimestamp),\n require: z.object({ php: z.string() }).nullable().catch(null),\n abandoned: z.union([z.string(), z.boolean()]).optional().catch(undefined),\n});\nexport type ComposerRelease = z.infer<typeof ComposerRelease>;\n\nexport const ComposerReleases = z\n .union([\n MinifiedArray.pipe(LooseArray(ComposerRelease)),\n LooseRecord(ComposerRelease).transform((map) => Object.values(map)),\n ])\n .catch([]);\nexport type ComposerReleases = z.infer<typeof ComposerReleases>;\n\nexport const ComposerPackagesResponse = z\n .object({\n packageName: z.string(),\n packagesResponse: z.object({\n packages: z.record(z.string(), z.unknown()),\n }),\n })\n .transform(\n ({ packageName, packagesResponse }) =>\n packagesResponse.packages[packageName],\n )\n .transform((xs) => ComposerReleases.parse(xs));\nexport type ComposerPackagesResponse = z.infer<typeof ComposerPackagesResponse>;\n\nexport function parsePackagesResponse(\n packageName: string,\n packagesResponse: unknown,\n): ComposerReleases {\n try {\n return ComposerPackagesResponse.parse({ packageName, packagesResponse });\n } catch (err) {\n logger.debug(\n { packageName, err },\n `Error parsing packagist response for ${packageName}`,\n );\n return [];\n }\n}\n\nexport function extractReleaseResult(\n ...composerReleasesArrays: ComposerReleases[]\n): ReleaseResult | null {\n const releases: Release[] = [];\n let homepage: string | null | undefined;\n let sourceUrl: string | null | undefined;\n let deprecationMessage: string | undefined;\n\n for (const composerReleasesArray of composerReleasesArrays) {\n for (const composerRelease of composerReleasesArray) {\n const version = composerRelease.version.replace(/^v/, '');\n const gitRef = composerRelease.version;\n\n const dep: Release = { version, gitRef };\n\n // Packagist's `published-time` reflects when the version was actually published to the registry;\n // prefer it over `time` (the git tag's `releasedAt`, which could be when the commit that the tag points at was pushed, not the time the release itself was made public to the world), falling back when absent.\n const releaseTimestamp =\n composerRelease['published-time'] ?? composerRelease.time;\n if (releaseTimestamp) {\n dep.releaseTimestamp = releaseTimestamp;\n }\n\n if (composerRelease.require?.php) {\n dep.constraints = { php: [composerRelease.require.php] };\n }\n\n if (composerRelease.abandoned) {\n dep.isDeprecated = true;\n deprecationMessage ??= getAbandonedMessage(composerRelease.abandoned);\n // TODO #44060 when `abandoned` is a package name, emit replacementName/replacementVersion to open a replacement PR\n }\n\n releases.push(dep);\n\n if (!homepage && composerRelease.homepage) {\n homepage = composerRelease.homepage;\n }\n\n if (!sourceUrl && composerRelease.source?.url) {\n sourceUrl = composerRelease.source.url;\n }\n }\n }\n\n if (releases.length === 0) {\n return null;\n }\n\n const result: ReleaseResult = { releases };\n\n if (homepage) {\n result.homepage = homepage;\n }\n\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n\n if (deprecationMessage) {\n result.deprecationMessage = deprecationMessage;\n }\n\n return result;\n}\n\nfunction getAbandonedMessage(abandoned: string | boolean): string {\n const message = 'This package is abandoned and no longer maintained.';\n if (typeof abandoned === 'string') {\n return `${message} The author suggests using the \\`${abandoned}\\` package instead.`;\n }\n return message;\n}\n\nexport function extractDepReleases(\n composerReleases: unknown,\n): ReleaseResult | null {\n const parsedReleases = ComposerReleases.parse(composerReleases);\n return extractReleaseResult(parsedReleases);\n}\n\nexport function parsePackagesResponses(\n packageName: string,\n packagesResponses: unknown[],\n): ReleaseResult | null {\n const releaseArrays = packagesResponses.map((pkgResp) =>\n parsePackagesResponse(packageName, pkgResp),\n );\n return extractReleaseResult(...releaseArrays);\n}\n\nexport const HashSpec = z.union([\n z\n .object({ sha256: z.string().nullable() })\n .transform(({ sha256 }) => ({ hash: sha256 })),\n z\n .object({ sha1: z.string().nullable() })\n .transform(({ sha1 }) => ({ hash: sha1 })),\n]);\nexport type HashSpec = z.infer<typeof HashSpec>;\n\nexport const RegistryFile = z.intersection(\n HashSpec,\n z.object({ key: z.string() }),\n);\nexport type RegistryFile = z.infer<typeof RegistryFile>;\n\nexport const PackagesResponse = z.object({\n packages: LooseRecord(ComposerReleases).catch({}),\n});\nexport type PackagesResponse = z.infer<typeof PackagesResponse>;\n\nexport const PackagistFile = PackagesResponse.merge(\n z.object({\n providers: LooseRecord(HashSpec)\n .transform((x) =>\n Object.fromEntries(\n Object.entries(x).map(([key, { hash }]) => [key, hash]),\n ),\n )\n .catch({}),\n }),\n);\nexport type PackagistFile = z.infer<typeof PackagistFile>;\n\nexport const RegistryMeta = z\n .record(z.string(), z.unknown())\n .catch({})\n .pipe(\n PackagistFile.merge(\n z.object({\n ['includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([name, { hash }]) => ({ key: name, hash })),\n )\n .catch([]),\n ['provider-includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([key, { hash }]) => ({ key, hash })),\n )\n .catch([]),\n ['providers-lazy-url']: z.string().nullable().catch(null),\n ['providers-url']: z.string().nullable().catch(null),\n ['metadata-url']: z.string().nullable().catch(null),\n ['available-packages']: z.array(z.string()).nullable().catch(null),\n }),\n ),\n )\n .transform(\n ({\n ['includes']: includesFiles,\n ['packages']: packages,\n ['provider-includes']: files,\n ['providers']: providerPackages,\n ['providers-lazy-url']: providersLazyUrl,\n ['providers-url']: providersUrl,\n ['metadata-url']: metadataUrl,\n ['available-packages']: availablePackages,\n }) => {\n const includesPackages: Record<string, ReleaseResult | null> = {};\n return {\n packages,\n includesFiles,\n providerPackages,\n files,\n providersUrl,\n providersLazyUrl,\n metadataUrl,\n includesPackages,\n availablePackages,\n };\n },\n );\nexport type RegistryMeta = z.infer<typeof RegistryMeta>;\n"],"mappings":";;;;;;AAWA,MAAa,gBAAgB,EAC1B,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CACxC,WAAW,OAAO;CAEjB,IAAI,GAAG,WAAW,GAChB,OAAO;CAGT,MAAM,WAAoC,CAAC;CAC3C,KAAK,MAAM,KAAK,IAAI;EAClB,KAAK,MAAM,OAAO,OAAO,KAAK,CAAC,GAC7B,SAAS,SAAS,KAAA;EAGpB,KAAK,MAAM,OAAO,OAAO,KAAK,QAAQ,GAAG;GACvC,MAAM,MAAM,EAAE;GACd,IAAI,QAAQ,WAAW;IACrB,OAAO,EAAE;IACT,SAAS,OAAO,KAAA;IAChB;GACF;GAEA,IAAI,CAAC,YAAY,GAAG,GAAG;IACrB,SAAS,OAAO;IAChB;GACF;GAEA,IAAI,CAAC,YAAY,SAAS,IAAI,GAAG;IAC/B,EAAE,OAAO,SAAS;IAClB;GACF;EACF;CACF;CAEA,OA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,MAAM,IAAI;EACvD,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;EAClD,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;EACjD,uBAAuB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;AACnE,CAAC,CACH,CACF,CAAC,CACA,WACE,GACE,aAAa,gBACb,aAAa,WACb,sBAAsB,QACtB,cAAc,mBACd,uBAAuB,mBACvB,kBAAkB,eAClB,iBAAiB,cACjB,uBAAuB,wBACpB;CAEJ,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAA,CAAe;EACf;CACF;AACF,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-cache.js","names":["packageCache.get","packageCache.set"],"sources":["../../../../lib/modules/datasource/rubygems/metadata-cache.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport * as packageCache from '../../../util/cache/package/index.ts';\nimport { toSha256 } from '../../../util/hash.ts';\nimport type { Http } from '../../../util/http/index.ts';\nimport type { AsyncResult } from '../../../util/result.ts';\nimport { Result } from '../../../util/result.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport type { ReleaseResult } from '../types.ts';\nimport { getV1Releases } from './common.ts';\n\ninterface CacheRecord {\n hash: string;\n data: ReleaseResult;\n isFallback?: true;\n}\n\nfunction hashVersions(versions: string[]): string {\n return toSha256(versions.sort().join(','));\n}\n\nfunction hashReleases(releases: ReleaseResult): string {\n return hashVersions(releases.releases.map((release) => release.version));\n}\n\ninterface CacheNotFoundError {\n type: 'cache-not-found';\n}\ninterface CacheStaleError {\n type: 'cache-stale';\n cache: CacheRecord;\n}\ninterface CacheInvalidError {\n type: 'cache-invalid';\n}\ntype CacheLoadError = CacheNotFoundError | CacheStaleError;\ntype CacheError = CacheNotFoundError | CacheStaleError | CacheInvalidError;\n\nexport class MetadataCache {\n private readonly http: Http;\n\n constructor(http: Http) {\n this.http = http;\n }\n\n async getRelease(\n registryUrl: string,\n packageName: string,\n versions: string[],\n ): Promise<ReleaseResult> {\n const cacheNs = `datasource-rubygems`;\n const cacheKey = `metadata-cache:${registryUrl}:${packageName}`;\n const versionsHash = hashVersions(versions);\n\n function loadCache(): AsyncResult<ReleaseResult, CacheLoadError> {\n return Result.wrapNullable<CacheRecord, CacheLoadError, CacheLoadError>(\n packageCache.get<CacheRecord>(cacheNs, cacheKey),\n { type: 'cache-not-found' },\n ).transform((cache) => {\n return versionsHash === cache.hash\n ? Result.ok(cache.data)\n : Result.err({ type: 'cache-stale', cache });\n });\n }\n\n async function saveCache(\n cache: CacheRecord,\n ttlMinutes = 100 * 24 * 60,\n ttlDelta = 10 * 24 * 60,\n ): Promise<void> {\n const registryHostname = parseUrl(registryUrl)?.hostname;\n if (registryHostname === 'rubygems.org') {\n const ttlRandomDelta = Math.floor(Math.random() * ttlDelta);\n const ttl = ttlMinutes + ttlRandomDelta;\n await packageCache.set(cacheNs, cacheKey, cache, ttl);\n }\n }\n\n return await loadCache()\n .catch((err) =>\n getV1Releases(this.http, registryUrl, packageName).transform(\n async (\n data: ReleaseResult,\n ): Promise<Result<ReleaseResult, CacheError>> => {\n const dataHash = hashReleases(data);\n if (dataHash === versionsHash) {\n await saveCache({\n hash: dataHash,\n data,\n });\n return Result.ok(data);\n }\n\n /**\n * Return stale cache for 24 hours,\n * if metadata is inconsistent with versions list.\n */\n if (err.type === 'cache-stale') {\n const staleCache = err.cache;\n if (!staleCache.isFallback) {\n await saveCache(\n { ...staleCache, isFallback: true },\n 24 * 60,\n 0,\n );\n }\n return Result.ok(staleCache.data);\n }\n\n return Result.err({ type: 'cache-invalid' });\n },\n ),\n )\n .catch((err) => {\n logger.debug(\n { err },\n 'Rubygems: error fetching rubygems data, falling back to versions-only result',\n );\n const releases = versions.map((version) => ({ version }));\n return Result.ok({ releases }
|
|
1
|
+
{"version":3,"file":"metadata-cache.js","names":["packageCache.get","packageCache.set"],"sources":["../../../../lib/modules/datasource/rubygems/metadata-cache.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport * as packageCache from '../../../util/cache/package/index.ts';\nimport { toSha256 } from '../../../util/hash.ts';\nimport type { Http } from '../../../util/http/index.ts';\nimport type { AsyncResult } from '../../../util/result.ts';\nimport { Result } from '../../../util/result.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport type { ReleaseResult } from '../types.ts';\nimport { getV1Releases } from './common.ts';\n\ninterface CacheRecord {\n hash: string;\n data: ReleaseResult;\n isFallback?: true;\n}\n\nfunction hashVersions(versions: string[]): string {\n return toSha256(versions.sort().join(','));\n}\n\nfunction hashReleases(releases: ReleaseResult): string {\n return hashVersions(releases.releases.map((release) => release.version));\n}\n\ninterface CacheNotFoundError {\n type: 'cache-not-found';\n}\ninterface CacheStaleError {\n type: 'cache-stale';\n cache: CacheRecord;\n}\ninterface CacheInvalidError {\n type: 'cache-invalid';\n}\ntype CacheLoadError = CacheNotFoundError | CacheStaleError;\ntype CacheError = CacheNotFoundError | CacheStaleError | CacheInvalidError;\n\nexport class MetadataCache {\n private readonly http: Http;\n\n constructor(http: Http) {\n this.http = http;\n }\n\n async getRelease(\n registryUrl: string,\n packageName: string,\n versions: string[],\n ): Promise<ReleaseResult> {\n const cacheNs = `datasource-rubygems`;\n const cacheKey = `metadata-cache:${registryUrl}:${packageName}`;\n const versionsHash = hashVersions(versions);\n\n function loadCache(): AsyncResult<ReleaseResult, CacheLoadError> {\n return Result.wrapNullable<CacheRecord, CacheLoadError, CacheLoadError>(\n packageCache.get<CacheRecord>(cacheNs, cacheKey),\n { type: 'cache-not-found' },\n ).transform((cache) => {\n return versionsHash === cache.hash\n ? Result.ok(cache.data)\n : Result.err({ type: 'cache-stale', cache });\n });\n }\n\n async function saveCache(\n cache: CacheRecord,\n ttlMinutes = 100 * 24 * 60,\n ttlDelta = 10 * 24 * 60,\n ): Promise<void> {\n const registryHostname = parseUrl(registryUrl)?.hostname;\n if (registryHostname === 'rubygems.org') {\n const ttlRandomDelta = Math.floor(Math.random() * ttlDelta);\n const ttl = ttlMinutes + ttlRandomDelta;\n await packageCache.set(cacheNs, cacheKey, cache, ttl);\n }\n }\n\n return await loadCache()\n .catch((err) =>\n getV1Releases(this.http, registryUrl, packageName).transform(\n async (\n data: ReleaseResult,\n ): Promise<Result<ReleaseResult, CacheError>> => {\n const dataHash = hashReleases(data);\n if (dataHash === versionsHash) {\n await saveCache({\n hash: dataHash,\n data,\n });\n return Result.ok(data);\n }\n\n /**\n * Return stale cache for 24 hours,\n * if metadata is inconsistent with versions list.\n */\n if (err.type === 'cache-stale') {\n const staleCache = err.cache;\n if (!staleCache.isFallback) {\n await saveCache(\n { ...staleCache, isFallback: true },\n 24 * 60,\n 0,\n );\n }\n return Result.ok(staleCache.data);\n }\n\n return Result.err({ type: 'cache-invalid' });\n },\n ),\n )\n .catch((err) => {\n logger.debug(\n { err },\n 'Rubygems: error fetching rubygems data, falling back to versions-only result',\n );\n const releases = versions.map((version) => ({ version }));\n return Result.ok({ releases });\n })\n .unwrapOrThrow();\n }\n}\n"],"mappings":";;;;;;;AAgBA,SAAS,aAAa,UAA4B;CAChD,OAAO,SAAS,SAAS,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC;AAC3C;AAEA,SAAS,aAAa,UAAiC;CACrD,OAAO,aAAa,SAAS,SAAS,KAAK,YAAY,QAAQ,OAAO,CAAC;AACzE;AAeA,IAAa,gBAAb,MAA2B;CACzB;CAEA,YAAY,MAAY;EACtB,KAAK,OAAO;CACd;CAEA,MAAM,WACJ,aACA,aACA,UACwB;EACxB,MAAM,UAAU;EAChB,MAAM,WAAW,kBAAkB,YAAY,GAAG;EAClD,MAAM,eAAe,aAAa,QAAQ;EAE1C,SAAS,YAAwD;GAC/D,OAAO,OAAO,aACZA,IAA8B,SAAS,QAAQ,GAC/C,EAAE,MAAM,kBAAkB,CAC5B,CAAC,CAAC,WAAW,UAAU;IACrB,OAAO,iBAAiB,MAAM,OAC1B,OAAO,GAAG,MAAM,IAAI,IACpB,OAAO,IAAI;KAAE,MAAM;KAAe;IAAM,CAAC;GAC/C,CAAC;EACH;EAEA,eAAe,UACb,OACA,aAAa,OAAW,IACxB,WAAW,OACI;GAEf,IADyB,SAAS,WAAW,CAAC,EAAE,aACvB,gBAAgB;IAEvC,MAAM,MAAM,aADW,KAAK,MAAM,KAAK,OAAO,IAAI,QACZ;IACtC,MAAMC,IAAiB,SAAS,UAAU,OAAO,GAAG;GACtD;EACF;EAEA,OAAO,MAAM,UAAU,CAAC,CACrB,OAAO,QACN,cAAc,KAAK,MAAM,aAAa,WAAW,CAAC,CAAC,UACjD,OACE,SAC+C;GAC/C,MAAM,WAAW,aAAa,IAAI;GAClC,IAAI,aAAa,cAAc;IAC7B,MAAM,UAAU;KACd,MAAM;KACN;IACF,CAAC;IACD,OAAO,OAAO,GAAG,IAAI;GACvB;;;;;GAMA,IAAI,IAAI,SAAS,eAAe;IAC9B,MAAM,aAAa,IAAI;IACvB,IAAI,CAAC,WAAW,YACd,MAAM,UACJ;KAAE,GAAG;KAAY,YAAY;IAAK,GAClC,MACA,CACF;IAEF,OAAO,OAAO,GAAG,WAAW,IAAI;GAClC;GAEA,OAAO,OAAO,IAAI,EAAE,MAAM,gBAAgB,CAAC;EAC7C,CACF,CACF,CAAC,CACA,OAAO,QAAQ;GACd,OAAO,MACL,EAAE,IAAI,GACN,8EACF;GACA,MAAM,WAAW,SAAS,KAAK,aAAa,EAAE,QAAQ,EAAE;GACxD,OAAO,OAAO,GAAG,EAAE,SAAS,CAAC;EAC/B,CAAC,CAAC,CACD,cAAc;CACnB;AACF"}
|
|
@@ -13,6 +13,7 @@ var bazel_module_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
13
|
defaultConfig: () => defaultConfig,
|
|
14
14
|
extractPackageFile: () => extractPackageFile,
|
|
15
15
|
knownDepTypes: () => knownDepTypes,
|
|
16
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
16
17
|
lockFileNames: () => lockFileNames,
|
|
17
18
|
supportedDatasources: () => supportedDatasources,
|
|
18
19
|
supportsLockFileMaintenance: () => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/bazel-module/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { BazelDatasource } from '../../datasource/bazel/index.ts';\nimport { CrateDatasource } from '../../datasource/crate/index.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { MavenDatasource } from '../../datasource/maven/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { knownDepTypes } from './dep-types.ts';\nexport { extractPackageFile } from './extract.ts';\n\nexport const url = 'https://bazel.build/external/module';\nexport const categories: Category[] = ['bazel'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/|\\\\.)MODULE\\\\.bazel$/'],\n};\n\nexport const supportedDatasources = [\n BazelDatasource.id,\n CrateDatasource.id,\n DockerDatasource.id,\n GithubTagsDatasource.id,\n MavenDatasource.id,\n];\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['MODULE.bazel.lock'];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/bazel-module/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { BazelDatasource } from '../../datasource/bazel/index.ts';\nimport { CrateDatasource } from '../../datasource/crate/index.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { MavenDatasource } from '../../datasource/maven/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { knownDepTypes } from './dep-types.ts';\nexport { extractPackageFile } from './extract.ts';\n\nexport const url = 'https://bazel.build/external/module';\nexport const categories: Category[] = ['bazel'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/|\\\\.)MODULE\\\\.bazel$/'],\n};\n\nexport const supportedDatasources = [\n BazelDatasource.id,\n CrateDatasource.id,\n DockerDatasource.id,\n GithubTagsDatasource.id,\n MavenDatasource.id,\n];\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['MODULE.bazel.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAWA,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,OAAO;AAE9C,MAAa,gBAAgB,EAC3B,qBAAqB,CAAC,4BAA4B,EACpD;AAEA,MAAa,uBAAuB;CAClC,gBAAgB;CAChB,gBAAgB;CAChB,iBAAiB;CACjB,qBAAqB;CACrB,gBAAgB;AAClB;AAGA,MAAa,gBAAgB,CAAC,mBAAmB"}
|
|
@@ -8,6 +8,7 @@ var bazelisk_exports = /* @__PURE__ */ __exportAll({
|
|
|
8
8
|
categories: () => categories,
|
|
9
9
|
defaultConfig: () => defaultConfig,
|
|
10
10
|
extractPackageFile: () => extractPackageFile,
|
|
11
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
11
12
|
lockFileNames: () => lockFileNames,
|
|
12
13
|
supportedDatasources: () => supportedDatasources,
|
|
13
14
|
supportsLockFileMaintenance: () => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["semverVersioning.id"],"sources":["../../../../lib/modules/manager/bazelisk/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport * as semverVersioning from '../../versioning/semver/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractPackageFile } from './extract.ts';\n\nexport const url = 'https://github.com/bazelbuild/bazelisk';\nexport const categories: Category[] = ['bazel'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)\\\\.bazelversion$/'],\n pinDigests: false,\n versioning: semverVersioning.id,\n};\n\nexport const supportedDatasources = [GithubReleasesDatasource.id];\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['MODULE.bazel.lock'];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["semverVersioning.id"],"sources":["../../../../lib/modules/manager/bazelisk/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport * as semverVersioning from '../../versioning/semver/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractPackageFile } from './extract.ts';\n\nexport const url = 'https://github.com/bazelbuild/bazelisk';\nexport const categories: Category[] = ['bazel'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)\\\\.bazelversion$/'],\n pinDigests: false,\n versioning: semverVersioning.id,\n};\n\nexport const supportedDatasources = [GithubReleasesDatasource.id];\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['MODULE.bazel.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n"],"mappings":";;;;;;;;;;;;;;;;;AAOA,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,OAAO;AAE9C,MAAa,gBAAgB;CAC3B,qBAAqB,CAAC,yBAAyB;CAC/C,YAAY;CACZ,YAAYA;AACd;AAEA,MAAa,uBAAuB,CAAC,yBAAyB,EAAE;AAGhE,MAAa,gBAAgB,CAAC,mBAAmB"}
|
|
@@ -12,6 +12,7 @@ var bun_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
12
|
defaultConfig: () => defaultConfig,
|
|
13
13
|
extractAllPackageFiles: () => extractAllPackageFiles,
|
|
14
14
|
getRangeStrategy: () => getRangeStrategy,
|
|
15
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
15
16
|
lockFileNames: () => lockFileNames,
|
|
16
17
|
supersedesManagers: () => supersedesManagers,
|
|
17
18
|
supportedDatasources: () => supportedDatasources,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/bun/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { getRangeStrategy, updateDependency } from '../npm/index.ts';\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractAllPackageFiles } from './extract.ts';\n\nexport const url = 'https://bun.sh/docs/cli/install';\nexport const categories: Category[] = ['js'];\n\nexport const supersedesManagers = ['npm'];\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['bun.lockb', 'bun.lock'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)bun\\\\.lockb?$/', '/(^|/)package\\\\.json$/'],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [GithubTagsDatasource.id, NpmDatasource.id];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/bun/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { getRangeStrategy, updateDependency } from '../npm/index.ts';\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractAllPackageFiles } from './extract.ts';\n\nexport const url = 'https://bun.sh/docs/cli/install';\nexport const categories: Category[] = ['js'];\n\nexport const supersedesManagers = ['npm'];\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['bun.lockb', 'bun.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)bun\\\\.lockb?$/', '/(^|/)package\\\\.json$/'],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [GithubTagsDatasource.id, NpmDatasource.id];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,IAAI;AAE3C,MAAa,qBAAqB,CAAC,KAAK;AAExC,MAAa,gBAAgB,CAAC,aAAa,UAAU;AAGrD,MAAa,gBAAgB;CAC3B,qBAAqB,CAAC,wBAAwB,wBAAwB;CACtE,QAAQ,EACN,mBAAmB,EACjB,QACE,8KACJ,EACF;CACA,mBAAmB,EACjB,QACE,6SACJ;AACF;AAEA,MAAa,uBAAuB,CAAC,qBAAqB,IAAI,cAAc,EAAE"}
|
|
@@ -10,6 +10,7 @@ var bundler_exports = /* @__PURE__ */ __exportAll({
|
|
|
10
10
|
categories: () => categories,
|
|
11
11
|
defaultConfig: () => defaultConfig,
|
|
12
12
|
extractPackageFile: () => extractPackageFile,
|
|
13
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
13
14
|
lockFileNames: () => lockFileNames,
|
|
14
15
|
supportedDatasources: () => supportedDatasources,
|
|
15
16
|
supportsLockFileMaintenance: () => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["rubyVersioning.id"],"sources":["../../../../lib/modules/manager/bundler/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { RubyVersionDatasource } from '../../datasource/ruby-version/index.ts';\nimport { RubygemsDatasource } from '../../datasource/rubygems/index.ts';\nimport * as rubyVersioning from '../../versioning/ruby/index.ts';\nimport { updateArtifacts } from './artifacts.ts';\nimport { extractPackageFile } from './extract.ts';\nimport { updateLockedDependency } from './update-locked.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['Gemfile.lock'];\n\n/*\n * Each of the below functions contain some explanations within their own files.\n * The best way to understand them in more detail is to look at the existing managers and find one that matches most closely what you need to do.\n */\n\nexport {\n extractPackageFile, // Mandatory unless extractAllPackageFiles is used instead\n updateArtifacts, // Optional\n updateLockedDependency,\n};\n\nexport const url = 'https://bundler.io/docs.html';\nexport const categories: Category[] = ['ruby'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)Gemfile$/'],\n versioning: rubyVersioning.id,\n};\n\nexport const supportedDatasources = [\n RubygemsDatasource.id,\n RubyVersionDatasource.id,\n];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["rubyVersioning.id"],"sources":["../../../../lib/modules/manager/bundler/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { RubyVersionDatasource } from '../../datasource/ruby-version/index.ts';\nimport { RubygemsDatasource } from '../../datasource/rubygems/index.ts';\nimport * as rubyVersioning from '../../versioning/ruby/index.ts';\nimport { updateArtifacts } from './artifacts.ts';\nimport { extractPackageFile } from './extract.ts';\nimport { updateLockedDependency } from './update-locked.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['Gemfile.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n\n/*\n * Each of the below functions contain some explanations within their own files.\n * The best way to understand them in more detail is to look at the existing managers and find one that matches most closely what you need to do.\n */\n\nexport {\n extractPackageFile, // Mandatory unless extractAllPackageFiles is used instead\n updateArtifacts, // Optional\n updateLockedDependency,\n};\n\nexport const url = 'https://bundler.io/docs.html';\nexport const categories: Category[] = ['ruby'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)Gemfile$/'],\n versioning: rubyVersioning.id,\n};\n\nexport const supportedDatasources = [\n RubygemsDatasource.id,\n RubyVersionDatasource.id,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,MAAa,gBAAgB,CAAC,cAAc;AAc5C,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,MAAM;AAE7C,MAAa,gBAAgB;CAC3B,qBAAqB,CAAC,iBAAiB;CACvC,YAAYA;AACd;AAEA,MAAa,uBAAuB,CAClC,mBAAmB,IACnB,sBAAsB,EACxB"}
|
|
@@ -16,6 +16,7 @@ var cargo_exports = /* @__PURE__ */ __exportAll({
|
|
|
16
16
|
defaultConfig: () => defaultConfig,
|
|
17
17
|
extractPackageFile: () => extractPackageFile,
|
|
18
18
|
getRangeStrategy: () => getRangeStrategy,
|
|
19
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
19
20
|
lockFileNames: () => lockFileNames,
|
|
20
21
|
supportedDatasources: () => supportedDatasources,
|
|
21
22
|
supportsLockFileMaintenance: () => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/cargo/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { CrateDatasource } from '../../datasource/crate/index.ts';\nimport { GitRefsDatasource } from '../../datasource/git-refs/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { updateArtifacts } from './artifacts.ts';\nimport { extractPackageFile } from './extract.ts';\n\nexport { getRangeStrategy } from './range.ts';\nexport { bumpPackageVersion } from './update.ts';\nexport { updateLockedDependency } from './update-locked.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['Cargo.lock'];\n\nexport { extractPackageFile, updateArtifacts };\n\nexport const url = 'https://doc.rust-lang.org/cargo';\nexport const categories: Category[] = ['rust'];\n\nexport const defaultConfig = {\n commitMessageTopic: 'Rust crate {{depName}}',\n managerFilePatterns: ['/(^|/)Cargo\\\\.toml$/'],\n};\n\nexport const supportedDatasources = [\n CrateDatasource.id,\n GithubTagsDatasource.id,\n GitlabTagsDatasource.id,\n GitRefsDatasource.id,\n GitTagsDatasource.id,\n];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/cargo/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { CrateDatasource } from '../../datasource/crate/index.ts';\nimport { GitRefsDatasource } from '../../datasource/git-refs/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { updateArtifacts } from './artifacts.ts';\nimport { extractPackageFile } from './extract.ts';\n\nexport { getRangeStrategy } from './range.ts';\nexport { bumpPackageVersion } from './update.ts';\nexport { updateLockedDependency } from './update-locked.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['Cargo.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n\nexport { extractPackageFile, updateArtifacts };\n\nexport const url = 'https://doc.rust-lang.org/cargo';\nexport const categories: Category[] = ['rust'];\n\nexport const defaultConfig = {\n commitMessageTopic: 'Rust crate {{depName}}',\n managerFilePatterns: ['/(^|/)Cargo\\\\.toml$/'],\n};\n\nexport const supportedDatasources = [\n CrateDatasource.id,\n GithubTagsDatasource.id,\n GitlabTagsDatasource.id,\n GitRefsDatasource.id,\n GitTagsDatasource.id,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAa,gBAAgB,CAAC,YAAY;AAK1C,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,MAAM;AAE7C,MAAa,gBAAgB;CAC3B,oBAAoB;CACpB,qBAAqB,CAAC,sBAAsB;AAC9C;AAEA,MAAa,uBAAuB;CAClC,gBAAgB;CAChB,qBAAqB;CACrB,qBAAqB;CACrB,kBAAkB;CAClB,kBAAkB;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/manager/circleci/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport {\n LooseArray,\n LooseRecord,\n NotCircular,\n} from '../../../util/schema-utils/index.ts';\n\nexport const CircleCiDocker = z\n .object({ image: z.string() })\n .transform(({ image }) => image);\n\nexport const CircleCiJob = z\n .object({\n docker: LooseArray(CircleCiDocker).catch([]),\n })\n .transform(({ docker }) => docker);\nexport type CircleCiJob = z.infer<typeof CircleCiJob>;\n\nconst CircleCiJobList = LooseRecord(CircleCiJob)\n .transform((x) => Object.values(x).flat())\n .catch([]);\n\nconst BaseOrb = z.object({\n executors: CircleCiJobList,\n jobs: CircleCiJobList,\n});\n\ntype Orb = z.infer<typeof BaseOrb> & {\n orbs: Record<string, string | Orb>;\n};\n\nexport const CircleCiOrb: z.ZodType<Orb> = BaseOrb.extend({\n orbs: LooseRecord(z.union([z.string(), z.lazy(() => CircleCiOrb)])).catch({}),\n})
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/manager/circleci/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport {\n LooseArray,\n LooseRecord,\n NotCircular,\n} from '../../../util/schema-utils/index.ts';\n\nexport const CircleCiDocker = z\n .object({ image: z.string() })\n .transform(({ image }) => image);\n\nexport const CircleCiJob = z\n .object({\n docker: LooseArray(CircleCiDocker).catch([]),\n })\n .transform(({ docker }) => docker);\nexport type CircleCiJob = z.infer<typeof CircleCiJob>;\n\nconst CircleCiJobList = LooseRecord(CircleCiJob)\n .transform((x) => Object.values(x).flat())\n .catch([]);\n\nconst BaseOrb = z.object({\n executors: CircleCiJobList,\n jobs: CircleCiJobList,\n});\n\ntype Orb = z.infer<typeof BaseOrb> & {\n orbs: Record<string, string | Orb>;\n};\n\nexport const CircleCiOrb: z.ZodType<Orb> = BaseOrb.extend({\n orbs: LooseRecord(z.union([z.string(), z.lazy(() => CircleCiOrb)])).catch({}),\n});\nexport type CircleCiOrb = z.infer<typeof CircleCiOrb>;\n\nexport const CircleCiFile = NotCircular.pipe(\n BaseOrb.extend({\n aliases: LooseArray(CircleCiDocker).catch([]),\n orbs: LooseRecord(z.union([z.string(), CircleCiOrb])).catch({}),\n }),\n);\nexport type CircleCiFile = z.infer<typeof CircleCiFile>;\n"],"mappings":";;;AAOA,MAAa,iBAAiB,EAC3B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAC7B,WAAW,EAAE,YAAY,KAAK;AAEjC,MAAa,cAAc,EACxB,OAAO,EACN,QAAQ,WAAW,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,EAC7C,CAAC,CAAC,CACD,WAAW,EAAE,aAAa,MAAM;AAGnC,MAAM,kBAAkB,YAAY,WAAW,CAAC,CAC7C,WAAW,MAAM,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACzC,MAAM,CAAC,CAAC;AAEX,MAAM,UAAU,EAAE,OAAO;CACvB,WAAW;CACX,MAAM;AACR,CAAC;AAMD,MAAa,cAA8B,QAAQ,OAAO,EACxD,MAAM,YAAY,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,WAAW,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAC9E,CAAC;AAGD,MAAa,eAAe,YAAY,KACtC,QAAQ,OAAO;CACb,SAAS,WAAW,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,MAAM,YAAY,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAChE,CAAC,CACH"}
|
|
@@ -16,6 +16,7 @@ var composer_exports = /* @__PURE__ */ __exportAll({
|
|
|
16
16
|
extractPackageFile: () => extractPackageFile,
|
|
17
17
|
getRangeStrategy: () => getRangeStrategy,
|
|
18
18
|
knownDepTypes: () => knownDepTypes,
|
|
19
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
19
20
|
lockFileNames: () => lockFileNames,
|
|
20
21
|
supportedDatasources: () => supportedDatasources,
|
|
21
22
|
supportsLockFileMaintenance: () => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["composerVersioningId"],"sources":["../../../../lib/modules/manager/composer/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { PackagistDatasource } from '../../datasource/packagist/index.ts';\nimport { updateArtifacts } from './artifacts.ts';\nimport { extractPackageFile } from './extract.ts';\nimport { getRangeStrategy } from './range.ts';\nimport { updateLockedDependency } from './update-locked.ts';\nimport { composerVersioningId } from './utils.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['composer.lock'];\n\nexport {\n extractPackageFile,\n getRangeStrategy,\n updateArtifacts,\n updateLockedDependency,\n};\n\nexport const url = 'https://getcomposer.org/doc';\nexport const categories: Category[] = ['php'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)([\\\\w-]*)composer\\\\.json$/'],\n versioning: composerVersioningId,\n};\n\nexport const supportedDatasources = [\n BitbucketTagsDatasource.id,\n GitTagsDatasource.id,\n PackagistDatasource.id,\n];\n\nexport { knownDepTypes } from './dep-types.ts';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["composerVersioningId"],"sources":["../../../../lib/modules/manager/composer/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { PackagistDatasource } from '../../datasource/packagist/index.ts';\nimport { updateArtifacts } from './artifacts.ts';\nimport { extractPackageFile } from './extract.ts';\nimport { getRangeStrategy } from './range.ts';\nimport { updateLockedDependency } from './update-locked.ts';\nimport { composerVersioningId } from './utils.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['composer.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n\nexport {\n extractPackageFile,\n getRangeStrategy,\n updateArtifacts,\n updateLockedDependency,\n};\n\nexport const url = 'https://getcomposer.org/doc';\nexport const categories: Category[] = ['php'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)([\\\\w-]*)composer\\\\.json$/'],\n versioning: composerVersioningId,\n};\n\nexport const supportedDatasources = [\n BitbucketTagsDatasource.id,\n GitTagsDatasource.id,\n PackagistDatasource.id,\n];\n\nexport { knownDepTypes } from './dep-types.ts';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,MAAa,gBAAgB,CAAC,eAAe;AAU7C,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,KAAK;AAE5C,MAAa,gBAAgB;CAC3B,qBAAqB,CAAC,kCAAkC;CACxD,YAAYA;AACd;AAEA,MAAa,uBAAuB;CAClC,wBAAwB;CACxB,kBAAkB;CAClB,oBAAoB;AACtB"}
|
|
@@ -12,6 +12,7 @@ var conan_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
12
|
extractPackageFile: () => extractPackageFile,
|
|
13
13
|
getRangeStrategy: () => getRangeStrategy,
|
|
14
14
|
knownDepTypes: () => knownDepTypes,
|
|
15
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
15
16
|
lockFileNames: () => lockFileNames,
|
|
16
17
|
supportedDatasources: () => supportedDatasources,
|
|
17
18
|
supportsLockFileMaintenance: () => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["conan.id"],"sources":["../../../../lib/modules/manager/conan/index.ts"],"sourcesContent":["export { updateArtifacts } from './artifacts.ts';\nexport { knownDepTypes } from './dep-types.ts';\nexport { extractPackageFile } from './extract.ts';\n\nimport type { Category } from '../../../constants/index.ts';\n\nexport { getRangeStrategy } from './range.ts';\n\nimport { ConanDatasource } from '../../datasource/conan/index.ts';\nimport * as conan from '../../versioning/conan/index.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['conan.lock'];\nexport const url = 'https://docs.conan.io';\nexport const categories: Category[] = ['c'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)conanfile\\\\.(txt|py)$/'],\n datasource: ConanDatasource.id,\n versioning: conan.id,\n};\n\nexport const supportedDatasources = [ConanDatasource.id];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["conan.id"],"sources":["../../../../lib/modules/manager/conan/index.ts"],"sourcesContent":["export { updateArtifacts } from './artifacts.ts';\nexport { knownDepTypes } from './dep-types.ts';\nexport { extractPackageFile } from './extract.ts';\n\nimport type { Category } from '../../../constants/index.ts';\n\nexport { getRangeStrategy } from './range.ts';\n\nimport { ConanDatasource } from '../../datasource/conan/index.ts';\nimport * as conan from '../../versioning/conan/index.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['conan.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\nexport const url = 'https://docs.conan.io';\nexport const categories: Category[] = ['c'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)conanfile\\\\.(txt|py)$/'],\n datasource: ConanDatasource.id,\n versioning: conan.id,\n};\n\nexport const supportedDatasources = [ConanDatasource.id];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA,MAAa,gBAAgB,CAAC,YAAY;AAE1C,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,GAAG;AAE1C,MAAa,gBAAgB;CAC3B,qBAAqB,CAAC,8BAA8B;CACpD,YAAY,gBAAgB;CAC5B,YAAYA;AACd;AAEA,MAAa,uBAAuB,CAAC,gBAAgB,EAAE"}
|
|
@@ -13,6 +13,7 @@ var deno_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
13
|
defaultConfig: () => defaultConfig,
|
|
14
14
|
extractAllPackageFiles: () => extractAllPackageFiles,
|
|
15
15
|
getRangeStrategy: () => getRangeStrategy,
|
|
16
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
16
17
|
lockFileNames: () => lockFileNames,
|
|
17
18
|
supersedesManagers: () => supersedesManagers,
|
|
18
19
|
supportedDatasources: () => supportedDatasources,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/deno/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { DenoDatasource } from '../../datasource/deno/index.ts';\nimport { JsrDatasource } from '../../datasource/jsr/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { getRangeStrategy } from '../npm/index.ts'; // for node-compat\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractAllPackageFiles } from './extract.ts';\n// The reason updateDependency is necessary is that extractPackageFile cannot retrieve the correct lock file\n// See: normalizeWorkspace in lib/modules/manager/deno/post.ts\nexport { updateDependency } from './update.ts';\n\nexport const url =\n 'https://docs.deno.com/runtime/getting_started/installation/';\nexport const categories: Category[] = ['js'];\n\nexport const supersedesManagers = ['npm'];\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['deno.lock'];\nexport const supportedDatasources = [\n NpmDatasource.id,\n JsrDatasource.id,\n DenoDatasource.id,\n];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)deno\\\\.lock$/', '/(^|/)deno\\\\.(json|jsonc)$/'],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n // append diff link if its npm datasource\n Change:\n \"{{#if (equals datasource \\\"npm\\\")}}[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}}){{else}}{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}{{/if}}\",\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/deno/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { DenoDatasource } from '../../datasource/deno/index.ts';\nimport { JsrDatasource } from '../../datasource/jsr/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { getRangeStrategy } from '../npm/index.ts'; // for node-compat\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractAllPackageFiles } from './extract.ts';\n// The reason updateDependency is necessary is that extractPackageFile cannot retrieve the correct lock file\n// See: normalizeWorkspace in lib/modules/manager/deno/post.ts\nexport { updateDependency } from './update.ts';\n\nexport const url =\n 'https://docs.deno.com/runtime/getting_started/installation/';\nexport const categories: Category[] = ['js'];\n\nexport const supersedesManagers = ['npm'];\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['deno.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\nexport const supportedDatasources = [\n NpmDatasource.id,\n JsrDatasource.id,\n DenoDatasource.id,\n];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)deno\\\\.lock$/', '/(^|/)deno\\\\.(json|jsonc)$/'],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n // append diff link if its npm datasource\n Change:\n \"{{#if (equals datasource \\\"npm\\\")}}[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}}){{else}}{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}{{/if}}\",\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAa,MACX;AACF,MAAa,aAAyB,CAAC,IAAI;AAE3C,MAAa,qBAAqB,CAAC,KAAK;AAExC,MAAa,gBAAgB,CAAC,WAAW;AAEzC,MAAa,uBAAuB;CAClC,cAAc;CACd,cAAc;CACd,eAAe;AACjB;AAEA,MAAa,gBAAgB;CAC3B,qBAAqB,CAAC,uBAAuB,6BAA6B;CAC1E,QAAQ,EACN,mBAAmB,EACjB,QACE,gLACJ,EACF;CACA,mBAAmB,EAEjB,QACE,8gBACJ;AACF"}
|
|
@@ -6,6 +6,7 @@ import { extractPackageFile } from "./extract.js";
|
|
|
6
6
|
var devbox_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
defaultConfig: () => defaultConfig,
|
|
8
8
|
extractPackageFile: () => extractPackageFile,
|
|
9
|
+
lockFileMaintenanceIsDelegatedToPackageManager: () => true,
|
|
9
10
|
lockFileNames: () => lockFileNames,
|
|
10
11
|
supportedDatasources: () => supportedDatasources,
|
|
11
12
|
supportsLockFileMaintenance: () => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/devbox/index.ts"],"sourcesContent":["import { DevboxDatasource } from '../../datasource/devbox/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractPackageFile } from './extract.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['devbox.lock'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)devbox\\\\.json$/'],\n};\n\nexport const supportedDatasources = [DevboxDatasource.id];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/devbox/index.ts"],"sourcesContent":["import { DevboxDatasource } from '../../datasource/devbox/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractPackageFile } from './extract.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['devbox.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)devbox\\\\.json$/'],\n};\n\nexport const supportedDatasources = [DevboxDatasource.id];\n"],"mappings":";;;;;;;;;;;;;;AAMA,MAAa,gBAAgB,CAAC,aAAa;AAG3C,MAAa,gBAAgB,EAC3B,qBAAqB,CAAC,uBAAuB,EAC/C;AAEA,MAAa,uBAAuB,CAAC,iBAAiB,EAAE"}
|
|
@@ -33,7 +33,7 @@ hashMap.set("crossplane", "5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e4708
|
|
|
33
33
|
hashMap.set("crow", "eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0");
|
|
34
34
|
hashMap.set("deno", "db87814a407e43b8edaf7ccdf1659407fd934597e4253a3f330b8219dc34c40e");
|
|
35
35
|
hashMap.set("deps-edn", "c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c");
|
|
36
|
-
hashMap.set("devbox", "
|
|
36
|
+
hashMap.set("devbox", "a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9");
|
|
37
37
|
hashMap.set("devcontainer", "24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec");
|
|
38
38
|
hashMap.set("docker-compose", "5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb");
|
|
39
39
|
hashMap.set("dockerfile", "54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478");
|
|
@@ -53,12 +53,12 @@ hashMap.set("gradle-wrapper", "81760ab88a1bed36b0381684396934cf7875e3466c01df8c9
|
|
|
53
53
|
hashMap.set("haskell-cabal", "f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891");
|
|
54
54
|
hashMap.set("helm-requirements", "4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b");
|
|
55
55
|
hashMap.set("helm-values", "b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af");
|
|
56
|
-
hashMap.set("helmfile", "
|
|
56
|
+
hashMap.set("helmfile", "3530f56b6a558f65d0143d19ef2fbc3f5a08e0a4955e636742ad58f5e0cb5205");
|
|
57
57
|
hashMap.set("helmsman", "ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e");
|
|
58
|
-
hashMap.set("helmv3", "
|
|
58
|
+
hashMap.set("helmv3", "3131b36223c8ee5b04f30f9de86f95e1d7f5bba83e60ba619e1592311a3a49d3");
|
|
59
59
|
hashMap.set("hermit", "cdc0007b3612f91a1fa61a9fa137096555014638c75ea8d5465bf71fd6ff6125");
|
|
60
60
|
hashMap.set("homeassistant-manifest", "05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f");
|
|
61
|
-
hashMap.set("homebrew", "
|
|
61
|
+
hashMap.set("homebrew", "9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367");
|
|
62
62
|
hashMap.set("html", "67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8");
|
|
63
63
|
hashMap.set("jenkins", "268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3");
|
|
64
64
|
hashMap.set("jsonnet-bundler", "4023ef4cac55fe58f8d9744ae86b13532298926e35e22d250334cde55c3386ff");
|
|
@@ -74,8 +74,8 @@ hashMap.set("mise", "1d4470230400ee4c1cb546cbe4fec3426f25a81425d8c555a3f60a42add
|
|
|
74
74
|
hashMap.set("mix", "bedc1c384159dc19663827a9a3da0f195a5d4122b60ec5749cd3144cef339371");
|
|
75
75
|
hashMap.set("nix", "5c2a27c9525894185d93b81e54eeb663bc2f6192853b220f56211c56e87d8379");
|
|
76
76
|
hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
|
|
77
|
-
hashMap.set("npm", "
|
|
78
|
-
hashMap.set("nuget", "
|
|
77
|
+
hashMap.set("npm", "feb2afcb489654db8809924b68f5c56249505f89677cdb1a3068b8a1f99290ed");
|
|
78
|
+
hashMap.set("nuget", "8afbf267843d2d318f0f15120e12fa68d0c678e2686d0afb16b0df69db11ba34");
|
|
79
79
|
hashMap.set("nvm", "3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322");
|
|
80
80
|
hashMap.set("ocb", "032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca");
|
|
81
81
|
hashMap.set("osgi", "32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10");
|
|
@@ -84,7 +84,7 @@ hashMap.set("pep723", "b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b2
|
|
|
84
84
|
hashMap.set("pip-compile", "52f0aa7c0b2ae5af6c649f7d7dd7202e257887c4f4497a0b70eb3384e349e7de");
|
|
85
85
|
hashMap.set("pip_requirements", "133115d094c35139584fd08e20b8a60bfc99de4e82e30020e4acb3c2f33a1a5b");
|
|
86
86
|
hashMap.set("pip_setup", "0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61");
|
|
87
|
-
hashMap.set("pipenv", "
|
|
87
|
+
hashMap.set("pipenv", "c24f2023a5eb779433c688d66887754e1b1a5658175e4fdf7a51762c079dabf8");
|
|
88
88
|
hashMap.set("pixi", "fd925887530c356daaa416057e1941a291d494238b9f519d43f970a3457cc1e6");
|
|
89
89
|
hashMap.set("poetry", "60965cf6f1addb4ebb43531b12138fc90560c5145530a69529719325b443cc62");
|
|
90
90
|
hashMap.set("pre-commit", "d191792fe6a89025de644421e9e6391c4048f10bf8e46421c676290a35c9e587");
|
|
@@ -116,7 +116,7 @@ hashMap.set("velaci", "fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac
|
|
|
116
116
|
hashMap.set("vendir", "ef3374fc0a3d3457172b0ce77bfca120e8044b6fd4fa942348fb837f6023360c");
|
|
117
117
|
hashMap.set("woodpecker", "6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045");
|
|
118
118
|
hashMap.set("xcodegen", "dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683");
|
|
119
|
-
hashMap.set("jsonata", "
|
|
119
|
+
hashMap.set("jsonata", "efd520a9f674c6dcd4edde61e8d14ddbb29a60bcfd6a92e6179197faebf63e84");
|
|
120
120
|
hashMap.set("regex", "dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996fd325416e");
|
|
121
121
|
//#endregion
|
|
122
122
|
export { hashMap };
|