renovate 44.62.0 → 44.62.2

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.
@@ -202,6 +202,13 @@ const presets = {
202
202
  ],
203
203
  versioning: "docker"
204
204
  },
205
+ {
206
+ description: "Use partial semver versioning for partial mise Java versions so rolling versions (e.g. 21) are not upgraded to full-precision versions (e.g. 21.0.11+9.0.LTS).",
207
+ matchCurrentValue: "/^\\d+(?:\\.\\d+)?$/",
208
+ matchDatasources: ["java-version"],
209
+ matchManagers: ["mise"],
210
+ versioning: "semver-partial"
211
+ },
205
212
  {
206
213
  allowedVersions: "/^(?:jdk|jdk-all|jre)-(?:8|11|17|21|25)(?:\\.|-|$)/",
207
214
  description: "Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.",
@@ -1 +1 @@
1
- {"version":3,"file":"workarounds.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/workarounds.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n all: {\n extends: [\n 'workarounds:mavenCommonsAncientVersion',\n 'workarounds:ignoreSpringCloudNumeric',\n 'workarounds:ignoreWeb3jCoreWithOldReleaseTimestamp',\n 'workarounds:ignoreHttp4sDigestMilestones',\n 'workarounds:typesNodeVersioning',\n 'workarounds:nodeDockerVersioning',\n 'workarounds:doNotUpgradeFromAlpineStableToEdge',\n 'workarounds:supportRedHatImageVersion',\n 'workarounds:javaLTSVersions',\n 'workarounds:disableEclipseLifecycleMapping',\n 'workarounds:disableGradleReplacements',\n 'workarounds:disableMavenParentRoot',\n 'workarounds:containerbase',\n 'workarounds:bitnamiDockerImageVersioning',\n 'workarounds:clamavDockerImageVersioning',\n 'workarounds:grafanaDockerImageVersioning',\n 'workarounds:k3sKubernetesVersioning',\n 'workarounds:rke2KubernetesVersioning',\n 'workarounds:libericaJdkDockerVersioning',\n 'workarounds:ubuntuDockerVersioning',\n ],\n overrideDescription: [\n 'Apply crowd-sourced workarounds for known problems with packages.',\n ],\n },\n bitnamiDockerImageVersioning: {\n description: 'Use custom regex versioning for bitnami images',\n packageRules: [\n {\n matchCurrentValue:\n '/^(?<major>\\\\d+)(?:\\\\.(?<minor>\\\\d+)(?:\\\\.(?<patch>\\\\d+))?)?-(?<compatibility>.+)-(?<build>\\\\d+)(?:-r(?<revision>\\\\d+))?$/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bitnami/**',\n 'docker.io/bitnami/**',\n 'gcr.io/bitnami-containers/**',\n '*-docker.pkg.dev/vmw-app-catalog/**',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)(?:\\\\.(?<minor>\\\\d+)(?:\\\\.(?<patch>\\\\d+))?)?(:?-(?<compatibility>.+)-(?<build>\\\\d+)(?:-r(?<revision>\\\\d+))?)?$',\n },\n ],\n },\n clamavDockerImageVersioning: {\n description: 'Use custom regex versioning for ClamAV images',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchPackageNames: ['clamav/clamav', 'clamav/clamav-debian'],\n versioning:\n 'regex:^(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)(\\\\.(?<patch>\\\\d+))?(-(?<build>\\\\d+))?(_(?<compatibility>.+))?$',\n },\n ],\n },\n containerbase: {\n description: 'Add some containerbase overrides.',\n packageRules: [\n {\n description:\n 'Use node versioning for `(containerbase|renovate)/node` images',\n matchDatasources: ['docker'],\n matchPackageNames: [\n '/^(?:(?:docker|ghcr)\\\\.io/)?(?:containerbase|renovate)/node$/',\n ],\n versioning: 'node',\n },\n ],\n },\n disableEclipseLifecycleMapping: {\n description: 'Disable Eclipse m2e lifecycle-mapping placeholder package.',\n packageRules: [\n {\n enabled: false,\n matchDatasources: ['maven'],\n matchPackageNames: ['org.eclipse.m2e:lifecycle-mapping'],\n },\n ],\n },\n disableGradleReplacements: {\n description: 'Disable package replacement updates for gradle dependencies.',\n packageRules: [\n {\n enabled: false,\n matchManagers: ['gradle'],\n matchUpdateTypes: ['replacement'],\n },\n ],\n },\n disableMavenParentRoot: {\n description:\n 'Avoid version fetching for Maven packages detected as project root.',\n packageRules: [\n {\n enabled: false,\n matchDepTypes: ['parent-root'],\n matchManagers: ['maven'],\n },\n ],\n },\n doNotUpgradeFromAlpineStableToEdge: {\n description: 'Do not upgrade from Alpine stable to edge.',\n packageRules: [\n {\n allowedVersions: '<20000000',\n matchCurrentVersion: '!/^\\\\d{8}$/',\n matchDatasources: ['docker'],\n matchDepNames: ['alpine'],\n },\n {\n allowedVersions: '<20000000',\n matchCurrentVersion: '!/^\\\\d{8}$/',\n matchDatasources: ['docker'],\n matchPackageNames: ['alpine'],\n },\n ],\n },\n grafanaDockerImageVersioning: {\n description: 'Support security releases on Grafana (product) images',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'grafana/grafana',\n 'docker.io/grafana/grafana',\n 'grafana/grafana-enterprise',\n 'docker.io/grafana/grafana-enterprise',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)\\\\.(?<patch>\\\\d+)(?:-security-(?<build>\\\\d+))?(?:-(?<compatibility>.*))?$',\n },\n ],\n },\n ignoreHttp4sDigestMilestones: {\n description: 'Ignore `http4s` digest-based `1.x` milestones.',\n packageRules: [\n {\n allowedVersions: `!/^1\\\\.0-\\\\d+-[a-fA-F0-9]{7}$/`,\n matchManagers: ['sbt'],\n matchPackageNames: ['org.http4s:**'],\n },\n ],\n },\n ignoreSpringCloudNumeric: {\n description: 'Ignore spring cloud `1.x` releases.',\n packageRules: [\n {\n allowedVersions: '/^[A-Z]/',\n matchDatasources: ['maven'],\n matchPackageNames: [\n 'org.springframework.cloud:spring-cloud-starter-parent',\n ],\n },\n ],\n },\n ignoreWeb3jCoreWithOldReleaseTimestamp: {\n description: 'Ignore `web3j` `5.0.0` release.',\n packageRules: [\n {\n allowedVersions: '!/^5\\\\.0\\\\.0/',\n matchDatasources: ['maven'],\n matchPackageNames: ['org.web3j:core'],\n },\n ],\n },\n javaLTSVersions: {\n description: 'Limit Java runtime versions to LTS releases.',\n packageRules: [\n {\n allowedVersions: '/^(?:8|11|17|21|25)(?:\\\\.|-|$)/',\n description:\n 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.',\n matchDatasources: ['docker', 'java-version'],\n matchPackageNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jdk',\n 'java-jre',\n 'sapmachine',\n '/^azul/zulu-openjdk/',\n '/^bellsoft/liberica-openj(dk|re)-/',\n '/^cimg/openjdk/',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+)(LTS)?)?(-(?<compatibility>.*))?$',\n },\n {\n allowedVersions: '/^(?:8|11|17|21|25)(?:\\\\.|-|$)/',\n description:\n 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.',\n matchDatasources: ['docker', 'java-version'],\n matchDepNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jre',\n 'sapmachine',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+)(LTS)?)?(-(?<compatibility>.*))?$',\n },\n {\n description:\n 'Use docker versioning for major-only Java image tags so rolling tags (e.g. 21-jre) are not upgraded to full-precision tags (e.g. 21.0.11_10-jre).',\n matchCurrentValue: '/^\\\\d+(-|$)/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jdk',\n 'java-jre',\n 'sapmachine',\n '/^azul/zulu-openjdk/',\n '/^bellsoft/liberica-openj(dk|re)-/',\n '/^cimg/openjdk/',\n ],\n versioning: 'docker',\n },\n {\n description:\n 'Use docker versioning for major-only Java image tags so rolling tags (e.g. 21-jre) are not upgraded to full-precision tags (e.g. 21.0.11_10-jre).',\n matchCurrentValue: '/^\\\\d+(-|$)/',\n matchDatasources: ['docker'],\n matchDepNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jre',\n 'sapmachine',\n ],\n versioning: 'docker',\n },\n {\n allowedVersions: '/^(?:jdk|jdk-all|jre)-(?:8|11|17|21|25)(?:\\\\.|-|$)/',\n description:\n 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n },\n ],\n },\n k3sKubernetesVersioning: {\n description: 'Use custom regex versioning for k3s-io/k3s',\n packageRules: [\n {\n matchDatasources: ['github-releases'],\n matchPackageNames: ['k3s-io/k3s'],\n versioning:\n 'regex:^v(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)\\\\.(?<patch>\\\\d+)(?:-(?<prerelease>[a-z]+\\\\d+))?(?<compatibility>\\\\+k3s)(?<build>\\\\d+)$',\n },\n ],\n },\n libericaJdkDockerVersioning: {\n description:\n 'Use custom regex versioning for bellsoft/liberica-runtime-container',\n packageRules: [\n {\n description: 'Liberica JDK Lite version optimized for the Cloud',\n matchCurrentValue: '/^jdk-[^a][^l]{2}/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n versioning:\n 'regex:^jdk-(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+))?(-(?<compatibility>.*))?$',\n },\n {\n description:\n 'Liberica JDK that can be used to create a custom runtime with a help of jlink tool',\n matchCurrentValue: '/^jdk-all/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n versioning:\n 'regex:^jdk-all-(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+))?(-(?<compatibility>.*))?$',\n },\n {\n description:\n 'Liberica JRE (only the runtime without the rest of JDK tools) for running Java applications',\n matchCurrentValue: '/^jre-/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n versioning:\n 'regex:^jre-(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+))?(-(?<compatibility>.*))?$',\n },\n ],\n },\n mavenCommonsAncientVersion: {\n description: 'Fix some problems with very old Maven commons versions.',\n packageRules: [\n {\n allowedVersions: '!/^200\\\\d{5}(\\\\.\\\\d+)?/',\n matchDatasources: ['maven', 'sbt-package'],\n matchPackageNames: ['commons-**'],\n },\n ],\n },\n nodeDockerVersioning: {\n description: 'Use node versioning for `node` docker images.',\n packageRules: [\n {\n matchDatasources: ['docker'],\n // copied from https://github.com/renovatebot/renovate/blob/a471762e137619c06e73a678d6b63ca984da7dba/lib/config/presets/internal/group.ts#L351\n matchPackageNames: [\n '/(?:^|/)node$/', // node or ends with \"/node, except those below\"\n '!calico/node',\n '!docker.io/calico/node',\n '!ghcr.io/devcontainers/features/node',\n '!kindest/node',\n '!docker.io/kindest/node',\n ],\n versionCompatibility: '^(?<version>[^-]+)(?<compatibility>-.*)?$',\n versioning: 'node',\n },\n ],\n },\n rke2KubernetesVersioning: {\n description: 'Use custom regex versioning for rancher/rke2',\n packageRules: [\n {\n matchDatasources: ['github-releases'],\n matchPackageNames: ['rancher/rke2'],\n versioning:\n 'regex:^v(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)\\\\.(?<patch>\\\\d+)(?:-(?<prerelease>[a-z]+\\\\d+))?(?<compatibility>\\\\+rke2r)(?<build>\\\\d+)$',\n },\n ],\n },\n supportRedHatImageVersion: {\n description:\n 'Use specific versioning for Red Hat-maintained container images.',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'registry.access.redhat.com/rhel',\n 'registry.access.redhat.com/rhel-atomic',\n 'registry.access.redhat.com/rhel-init',\n 'registry.access.redhat.com/rhel-minimal',\n 'registry.access.redhat.com/rhceph/**',\n 'registry.access.redhat.com/rhgs3/**',\n 'registry.access.redhat.com/rhel7**',\n 'registry.access.redhat.com/rhel8/**',\n 'registry.access.redhat.com/rhel9/**',\n 'registry.access.redhat.com/rhscl/**',\n 'registry.access.redhat.com/ubi*{,/}**',\n 'redhat/**',\n ],\n versioning: 'redhat',\n },\n ],\n },\n typesNodeVersioning: {\n description: 'Use node versioning for `@types/node`.',\n packageRules: [\n {\n matchManagers: ['npm'],\n matchPackageNames: ['@types/node'],\n versioning: `node`,\n },\n ],\n },\n ubuntuDockerVersioning: {\n description: 'Use ubuntu versioning for `ubuntu` docker images.',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchDepNames: ['ubuntu'],\n versioning: 'ubuntu',\n },\n ],\n },\n};\n"],"mappings":";AAEA,MAAa,UAAkC;CAC7C,KAAK;EACH,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,qBAAqB,CACnB,mEACF;CACF;CACA,8BAA8B;EAC5B,aAAa;EACb,cAAc,CACZ;GACE,mBACE;GACF,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB;IACjB;IACA;IACA;IACA;GACF;GACA,YACE;EACJ,CACF;CACF;CACA,6BAA6B;EAC3B,aAAa;EACb,cAAc,CACZ;G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c,CACZ;GACE,iBAAiB;GACjB,kBAAkB,CAAC,OAAO;GAC1B,mBAAmB,CAAC,gBAAgB;EACtC,CACF;CACF;CACA,iBAAiB;EACf,aAAa;EACb,cAAc;GACZ;IACE,iBAAiB;IACjB,aACE;IACF,kBAAkB,CAAC,UAAU,cAAc;IAC3C,mBAAmB;KACjB;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YACE;GACJ;GACA;IACE,iBAAiB;IACjB,aACE;IACF,kBAAkB,CAAC,UAAU,cAAc;IAC3C,eAAe;KACb;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YACE;GACJ;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB;KACjB;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YAAY;GACd;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,eAAe;KACb;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YAAY;GACd;GACA;IACE,iBAAiB;IACjB,aACE;IACF,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;GACF;EACF;CACF;CACA,yBAAyB;EACvB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,iBAAiB;GACpC,mBAAmB,CAAC,YAAY;GAChC,YACE;EACJ,CACF;CACF;CACA,6BAA6B;EAC3B,aACE;EACF,cAAc;GACZ;IACE,aAAa;IACb,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;IACA,YACE;GACJ;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;IACA,YACE;GACJ;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;IACA,YACE;GACJ;EACF;CACF;CACA,4BAA4B;EAC1B,aAAa;EACb,cAAc,CACZ;GACE,iBAAiB;GACjB,kBAAkB,CAAC,SAAS,aAAa;GACzC,mBAAmB,CAAC,YAAY;EAClC,CACF;CACF;CACA,sBAAsB;EACpB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAE3B,mBAAmB;IACjB;IACA;IACA;IACA;IACA;IACA;GACF;GACA,sBAAsB;GACtB,YAAY;EACd,CACF;CACF;CACA,0BAA0B;EACxB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,iBAAiB;GACpC,mBAAmB,CAAC,cAAc;GAClC,YACE;EACJ,CACF;CACF;CACA,2BAA2B;EACzB,aACE;EACF,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,YAAY;EACd,CACF;CACF;CACA,qBAAqB;EACnB,aAAa;EACb,cAAc,CACZ;GACE,eAAe,CAAC,KAAK;GACrB,mBAAmB,CAAC,aAAa;GACjC,YAAY;EACd,CACF;CACF;CACA,wBAAwB;EACtB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAC3B,eAAe,CAAC,QAAQ;GACxB,YAAY;EACd,CACF;CACF;AACF"}
1
+ {"version":3,"file":"workarounds.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/workarounds.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n all: {\n extends: [\n 'workarounds:mavenCommonsAncientVersion',\n 'workarounds:ignoreSpringCloudNumeric',\n 'workarounds:ignoreWeb3jCoreWithOldReleaseTimestamp',\n 'workarounds:ignoreHttp4sDigestMilestones',\n 'workarounds:typesNodeVersioning',\n 'workarounds:nodeDockerVersioning',\n 'workarounds:doNotUpgradeFromAlpineStableToEdge',\n 'workarounds:supportRedHatImageVersion',\n 'workarounds:javaLTSVersions',\n 'workarounds:disableEclipseLifecycleMapping',\n 'workarounds:disableGradleReplacements',\n 'workarounds:disableMavenParentRoot',\n 'workarounds:containerbase',\n 'workarounds:bitnamiDockerImageVersioning',\n 'workarounds:clamavDockerImageVersioning',\n 'workarounds:grafanaDockerImageVersioning',\n 'workarounds:k3sKubernetesVersioning',\n 'workarounds:rke2KubernetesVersioning',\n 'workarounds:libericaJdkDockerVersioning',\n 'workarounds:ubuntuDockerVersioning',\n ],\n overrideDescription: [\n 'Apply crowd-sourced workarounds for known problems with packages.',\n ],\n },\n bitnamiDockerImageVersioning: {\n description: 'Use custom regex versioning for bitnami images',\n packageRules: [\n {\n matchCurrentValue:\n '/^(?<major>\\\\d+)(?:\\\\.(?<minor>\\\\d+)(?:\\\\.(?<patch>\\\\d+))?)?-(?<compatibility>.+)-(?<build>\\\\d+)(?:-r(?<revision>\\\\d+))?$/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bitnami/**',\n 'docker.io/bitnami/**',\n 'gcr.io/bitnami-containers/**',\n '*-docker.pkg.dev/vmw-app-catalog/**',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)(?:\\\\.(?<minor>\\\\d+)(?:\\\\.(?<patch>\\\\d+))?)?(:?-(?<compatibility>.+)-(?<build>\\\\d+)(?:-r(?<revision>\\\\d+))?)?$',\n },\n ],\n },\n clamavDockerImageVersioning: {\n description: 'Use custom regex versioning for ClamAV images',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchPackageNames: ['clamav/clamav', 'clamav/clamav-debian'],\n versioning:\n 'regex:^(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)(\\\\.(?<patch>\\\\d+))?(-(?<build>\\\\d+))?(_(?<compatibility>.+))?$',\n },\n ],\n },\n containerbase: {\n description: 'Add some containerbase overrides.',\n packageRules: [\n {\n description:\n 'Use node versioning for `(containerbase|renovate)/node` images',\n matchDatasources: ['docker'],\n matchPackageNames: [\n '/^(?:(?:docker|ghcr)\\\\.io/)?(?:containerbase|renovate)/node$/',\n ],\n versioning: 'node',\n },\n ],\n },\n disableEclipseLifecycleMapping: {\n description: 'Disable Eclipse m2e lifecycle-mapping placeholder package.',\n packageRules: [\n {\n enabled: false,\n matchDatasources: ['maven'],\n matchPackageNames: ['org.eclipse.m2e:lifecycle-mapping'],\n },\n ],\n },\n disableGradleReplacements: {\n description: 'Disable package replacement updates for gradle dependencies.',\n packageRules: [\n {\n enabled: false,\n matchManagers: ['gradle'],\n matchUpdateTypes: ['replacement'],\n },\n ],\n },\n disableMavenParentRoot: {\n description:\n 'Avoid version fetching for Maven packages detected as project root.',\n packageRules: [\n {\n enabled: false,\n matchDepTypes: ['parent-root'],\n matchManagers: ['maven'],\n },\n ],\n },\n doNotUpgradeFromAlpineStableToEdge: {\n description: 'Do not upgrade from Alpine stable to edge.',\n packageRules: [\n {\n allowedVersions: '<20000000',\n matchCurrentVersion: '!/^\\\\d{8}$/',\n matchDatasources: ['docker'],\n matchDepNames: ['alpine'],\n },\n {\n allowedVersions: '<20000000',\n matchCurrentVersion: '!/^\\\\d{8}$/',\n matchDatasources: ['docker'],\n matchPackageNames: ['alpine'],\n },\n ],\n },\n grafanaDockerImageVersioning: {\n description: 'Support security releases on Grafana (product) images',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'grafana/grafana',\n 'docker.io/grafana/grafana',\n 'grafana/grafana-enterprise',\n 'docker.io/grafana/grafana-enterprise',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)\\\\.(?<patch>\\\\d+)(?:-security-(?<build>\\\\d+))?(?:-(?<compatibility>.*))?$',\n },\n ],\n },\n ignoreHttp4sDigestMilestones: {\n description: 'Ignore `http4s` digest-based `1.x` milestones.',\n packageRules: [\n {\n allowedVersions: `!/^1\\\\.0-\\\\d+-[a-fA-F0-9]{7}$/`,\n matchManagers: ['sbt'],\n matchPackageNames: ['org.http4s:**'],\n },\n ],\n },\n ignoreSpringCloudNumeric: {\n description: 'Ignore spring cloud `1.x` releases.',\n packageRules: [\n {\n allowedVersions: '/^[A-Z]/',\n matchDatasources: ['maven'],\n matchPackageNames: [\n 'org.springframework.cloud:spring-cloud-starter-parent',\n ],\n },\n ],\n },\n ignoreWeb3jCoreWithOldReleaseTimestamp: {\n description: 'Ignore `web3j` `5.0.0` release.',\n packageRules: [\n {\n allowedVersions: '!/^5\\\\.0\\\\.0/',\n matchDatasources: ['maven'],\n matchPackageNames: ['org.web3j:core'],\n },\n ],\n },\n javaLTSVersions: {\n description: 'Limit Java runtime versions to LTS releases.',\n packageRules: [\n {\n allowedVersions: '/^(?:8|11|17|21|25)(?:\\\\.|-|$)/',\n description:\n 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.',\n matchDatasources: ['docker', 'java-version'],\n matchPackageNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jdk',\n 'java-jre',\n 'sapmachine',\n '/^azul/zulu-openjdk/',\n '/^bellsoft/liberica-openj(dk|re)-/',\n '/^cimg/openjdk/',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+)(LTS)?)?(-(?<compatibility>.*))?$',\n },\n {\n allowedVersions: '/^(?:8|11|17|21|25)(?:\\\\.|-|$)/',\n description:\n 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.',\n matchDatasources: ['docker', 'java-version'],\n matchDepNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jre',\n 'sapmachine',\n ],\n versioning:\n 'regex:^(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+)(LTS)?)?(-(?<compatibility>.*))?$',\n },\n {\n description:\n 'Use docker versioning for major-only Java image tags so rolling tags (e.g. 21-jre) are not upgraded to full-precision tags (e.g. 21.0.11_10-jre).',\n matchCurrentValue: '/^\\\\d+(-|$)/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jdk',\n 'java-jre',\n 'sapmachine',\n '/^azul/zulu-openjdk/',\n '/^bellsoft/liberica-openj(dk|re)-/',\n '/^cimg/openjdk/',\n ],\n versioning: 'docker',\n },\n {\n description:\n 'Use docker versioning for major-only Java image tags so rolling tags (e.g. 21-jre) are not upgraded to full-precision tags (e.g. 21.0.11_10-jre).',\n matchCurrentValue: '/^\\\\d+(-|$)/',\n matchDatasources: ['docker'],\n matchDepNames: [\n 'eclipse-temurin',\n 'amazoncorretto',\n 'adoptopenjdk',\n 'openjdk',\n 'java',\n 'java-jre',\n 'sapmachine',\n ],\n versioning: 'docker',\n },\n {\n description:\n 'Use partial semver versioning for partial mise Java versions so rolling versions (e.g. 21) are not upgraded to full-precision versions (e.g. 21.0.11+9.0.LTS).',\n matchCurrentValue: '/^\\\\d+(?:\\\\.\\\\d+)?$/',\n matchDatasources: ['java-version'],\n matchManagers: ['mise'],\n versioning: 'semver-partial',\n },\n {\n allowedVersions: '/^(?:jdk|jdk-all|jre)-(?:8|11|17|21|25)(?:\\\\.|-|$)/',\n description:\n 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n },\n ],\n },\n k3sKubernetesVersioning: {\n description: 'Use custom regex versioning for k3s-io/k3s',\n packageRules: [\n {\n matchDatasources: ['github-releases'],\n matchPackageNames: ['k3s-io/k3s'],\n versioning:\n 'regex:^v(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)\\\\.(?<patch>\\\\d+)(?:-(?<prerelease>[a-z]+\\\\d+))?(?<compatibility>\\\\+k3s)(?<build>\\\\d+)$',\n },\n ],\n },\n libericaJdkDockerVersioning: {\n description:\n 'Use custom regex versioning for bellsoft/liberica-runtime-container',\n packageRules: [\n {\n description: 'Liberica JDK Lite version optimized for the Cloud',\n matchCurrentValue: '/^jdk-[^a][^l]{2}/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n versioning:\n 'regex:^jdk-(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+))?(-(?<compatibility>.*))?$',\n },\n {\n description:\n 'Liberica JDK that can be used to create a custom runtime with a help of jlink tool',\n matchCurrentValue: '/^jdk-all/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n versioning:\n 'regex:^jdk-all-(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+))?(-(?<compatibility>.*))?$',\n },\n {\n description:\n 'Liberica JRE (only the runtime without the rest of JDK tools) for running Java applications',\n matchCurrentValue: '/^jre-/',\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'bellsoft/hardened-liberica-runtime-container',\n 'bellsoft/liberica-runtime-container',\n ],\n versioning:\n 'regex:^jre-(?<major>\\\\d+)?(\\\\.(?<minor>\\\\d+))?(\\\\.(?<patch>\\\\d+))?([\\\\._+](?<build>(\\\\d\\\\.?)+))?(-(?<compatibility>.*))?$',\n },\n ],\n },\n mavenCommonsAncientVersion: {\n description: 'Fix some problems with very old Maven commons versions.',\n packageRules: [\n {\n allowedVersions: '!/^200\\\\d{5}(\\\\.\\\\d+)?/',\n matchDatasources: ['maven', 'sbt-package'],\n matchPackageNames: ['commons-**'],\n },\n ],\n },\n nodeDockerVersioning: {\n description: 'Use node versioning for `node` docker images.',\n packageRules: [\n {\n matchDatasources: ['docker'],\n // copied from https://github.com/renovatebot/renovate/blob/a471762e137619c06e73a678d6b63ca984da7dba/lib/config/presets/internal/group.ts#L351\n matchPackageNames: [\n '/(?:^|/)node$/', // node or ends with \"/node, except those below\"\n '!calico/node',\n '!docker.io/calico/node',\n '!ghcr.io/devcontainers/features/node',\n '!kindest/node',\n '!docker.io/kindest/node',\n ],\n versionCompatibility: '^(?<version>[^-]+)(?<compatibility>-.*)?$',\n versioning: 'node',\n },\n ],\n },\n rke2KubernetesVersioning: {\n description: 'Use custom regex versioning for rancher/rke2',\n packageRules: [\n {\n matchDatasources: ['github-releases'],\n matchPackageNames: ['rancher/rke2'],\n versioning:\n 'regex:^v(?<major>\\\\d+)\\\\.(?<minor>\\\\d+)\\\\.(?<patch>\\\\d+)(?:-(?<prerelease>[a-z]+\\\\d+))?(?<compatibility>\\\\+rke2r)(?<build>\\\\d+)$',\n },\n ],\n },\n supportRedHatImageVersion: {\n description:\n 'Use specific versioning for Red Hat-maintained container images.',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchPackageNames: [\n 'registry.access.redhat.com/rhel',\n 'registry.access.redhat.com/rhel-atomic',\n 'registry.access.redhat.com/rhel-init',\n 'registry.access.redhat.com/rhel-minimal',\n 'registry.access.redhat.com/rhceph/**',\n 'registry.access.redhat.com/rhgs3/**',\n 'registry.access.redhat.com/rhel7**',\n 'registry.access.redhat.com/rhel8/**',\n 'registry.access.redhat.com/rhel9/**',\n 'registry.access.redhat.com/rhscl/**',\n 'registry.access.redhat.com/ubi*{,/}**',\n 'redhat/**',\n ],\n versioning: 'redhat',\n },\n ],\n },\n typesNodeVersioning: {\n description: 'Use node versioning for `@types/node`.',\n packageRules: [\n {\n matchManagers: ['npm'],\n matchPackageNames: ['@types/node'],\n versioning: `node`,\n },\n ],\n },\n ubuntuDockerVersioning: {\n description: 'Use ubuntu versioning for `ubuntu` docker images.',\n packageRules: [\n {\n matchDatasources: ['docker'],\n matchDepNames: ['ubuntu'],\n versioning: 'ubuntu',\n },\n ],\n },\n};\n"],"mappings":";AAEA,MAAa,UAAkC;CAC7C,KAAK;EACH,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,qBAAqB,CACnB,mEACF;CACF;CACA,8BAA8B;EAC5B,aAAa;EACb,cAAc,CACZ;GACE,mBACE;GACF,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB;IACjB;IACA;IACA;IACA;GACF;GACA,YACE;EACJ,CACF;CACF;CACA,6BAA6B;EAC3B,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB,CAAC,iBAAiB,sBAAsB;GAC3D,YACE;EACJ,CACF;CACF;CACA,eAAe;EACb,aAAa;EACb,cAAc,CACZ;GACE,aACE;GACF,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB,CACjB,+DACF;GACA,YAAY;EACd,CACF;CACF;CACA,gCAAgC;EAC9B,aAAa;EACb,cAAc,CACZ;GACE,SAAS;GACT,kBAAkB,CAAC,OAAO;GAC1B,mBAAmB,CAAC,mCAAmC;EACzD,CACF;CACF;CACA,2BAA2B;EACzB,aAAa;EACb,cAAc,CACZ;GACE,SAAS;GACT,eAAe,CAAC,QAAQ;GACxB,kBAAkB,CAAC,aAAa;EAClC,CACF;CACF;CACA,wBAAwB;EACtB,aACE;EACF,cAAc,CACZ;GACE,SAAS;GACT,eAAe,CAAC,aAAa;GAC7B,eAAe,CAAC,OAAO;EACzB,CACF;CACF;CACA,oCAAoC;EAClC,aAAa;EACb,cAAc,CACZ;GACE,iBAAiB;GACjB,qBAAqB;GACrB,kBAAkB,CAAC,QAAQ;GAC3B,eAAe,CAAC,QAAQ;EAC1B,GACA;GACE,iBAAiB;GACjB,qBAAqB;GACrB,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB,CAAC,QAAQ;EAC9B,CACF;CACF;CACA,8BAA8B;EAC5B,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB;IACjB;IACA;IACA;IACA;GACF;GACA,YACE;EACJ,CACF;CACF;CACA,8BAA8B;EAC5B,aAAa;EACb,cAAc,CACZ;GACE,iBAAiB;GACjB,eAAe,CAAC,KAAK;GACrB,mBAAmB,CAAC,eAAe;EACrC,CACF;CACF;CACA,0BAA0B;EACxB,aAAa;EACb,cAAc,CACZ;GACE,iBAAiB;GACjB,kBAAkB,CAAC,OAAO;GAC1B,mBAAmB,CACjB,uDACF;EACF,CACF;CACF;CACA,wCAAwC;EACtC,aAAa;EACb,cAAc,CACZ;GACE,iBAAiB;GACjB,kBAAkB,CAAC,OAAO;GAC1B,mBAAmB,CAAC,gBAAgB;EACtC,CACF;CACF;CACA,iBAAiB;EACf,aAAa;EACb,cAAc;GACZ;IACE,iBAAiB;IACjB,aACE;IACF,kBAAkB,CAAC,UAAU,cAAc;IAC3C,mBAAmB;KACjB;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YACE;GACJ;GACA;IACE,iBAAiB;IACjB,aACE;IACF,kBAAkB,CAAC,UAAU,cAAc;IAC3C,eAAe;KACb;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YACE;GACJ;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB;KACjB;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YAAY;GACd;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,eAAe;KACb;KACA;KACA;KACA;KACA;KACA;KACA;IACF;IACA,YAAY;GACd;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,cAAc;IACjC,eAAe,CAAC,MAAM;IACtB,YAAY;GACd;GACA;IACE,iBAAiB;IACjB,aACE;IACF,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;GACF;EACF;CACF;CACA,yBAAyB;EACvB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,iBAAiB;GACpC,mBAAmB,CAAC,YAAY;GAChC,YACE;EACJ,CACF;CACF;CACA,6BAA6B;EAC3B,aACE;EACF,cAAc;GACZ;IACE,aAAa;IACb,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;IACA,YACE;GACJ;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;IACA,YACE;GACJ;GACA;IACE,aACE;IACF,mBAAmB;IACnB,kBAAkB,CAAC,QAAQ;IAC3B,mBAAmB,CACjB,gDACA,qCACF;IACA,YACE;GACJ;EACF;CACF;CACA,4BAA4B;EAC1B,aAAa;EACb,cAAc,CACZ;GACE,iBAAiB;GACjB,kBAAkB,CAAC,SAAS,aAAa;GACzC,mBAAmB,CAAC,YAAY;EAClC,CACF;CACF;CACA,sBAAsB;EACpB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAE3B,mBAAmB;IACjB;IACA;IACA;IACA;IACA;IACA;GACF;GACA,sBAAsB;GACtB,YAAY;EACd,CACF;CACF;CACA,0BAA0B;EACxB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,iBAAiB;GACpC,mBAAmB,CAAC,cAAc;GAClC,YACE;EACJ,CACF;CACF;CACA,2BAA2B;EACzB,aACE;EACF,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAC3B,mBAAmB;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,YAAY;EACd,CACF;CACF;CACA,qBAAqB;EACnB,aAAa;EACb,cAAc,CACZ;GACE,eAAe,CAAC,KAAK;GACrB,mBAAmB,CAAC,aAAa;GACjC,YAAY;EACd,CACF;CACF;CACA,wBAAwB;EACtB,aAAa;EACb,cAAc,CACZ;GACE,kBAAkB,CAAC,QAAQ;GAC3B,eAAe,CAAC,QAAQ;GACxB,YAAY;EACd,CACF;CACF;AACF"}
@@ -54,10 +54,18 @@ function validateRegexManagerFields(customManager, currentPath, errors) {
54
54
  topic: ConfigValidationTopic.Error,
55
55
  message: "Each Custom Manager `matchStrings` array must have at least one item."
56
56
  });
57
- for (const field of ["currentValue", "datasource"]) if (!hasField(customManager, field)) errors.push({
57
+ for (const field of ["datasource"]) if (!hasField(customManager, field)) errors.push({
58
58
  topic: ConfigValidationTopic.Error,
59
59
  message: `Regex Managers must contain ${field}Template configuration or regex group named ${field}`
60
60
  });
61
+ const versionFields = ["currentValue", "currentDigest"];
62
+ if (!versionFields.some((field) => hasField(customManager, field))) {
63
+ const templateFields = versionFields.map((field) => `${field}Template`).join(" or ");
64
+ errors.push({
65
+ topic: ConfigValidationTopic.Error,
66
+ message: `Regex Managers must contain ${versionFields.join(" or ")}, their template variants (${templateFields}) or regex groups named after configuration fields`
67
+ });
68
+ }
61
69
  if (!["depName", "packageName"].some((field) => hasField(customManager, field))) errors.push({
62
70
  topic: ConfigValidationTopic.Error,
63
71
  message: `Regex Managers must contain depName or packageName regex groups or templates`
@@ -81,10 +89,15 @@ function validateJSONataManagerFields(customManager, currentPath, errors) {
81
89
  topic: ConfigValidationTopic.Error,
82
90
  message: `Each Custom Manager must contain a non-empty matchStrings array`
83
91
  });
84
- for (const field of ["currentValue", "datasource"]) if (!hasField(customManager, field)) errors.push({
92
+ for (const field of ["datasource"]) if (!hasField(customManager, field)) errors.push({
85
93
  topic: ConfigValidationTopic.Error,
86
94
  message: `JSONata Managers must contain ${field}Template configuration or ${field} in the query `
87
95
  });
96
+ const versionFields = ["currentValue", "currentDigest"];
97
+ if (!versionFields.some((field) => hasField(customManager, field))) errors.push({
98
+ topic: ConfigValidationTopic.Error,
99
+ message: `JSONata Managers must contain ${versionFields.join(" or ")} in the query or their templates`
100
+ });
88
101
  if (!["depName", "packageName"].some((field) => hasField(customManager, field))) errors.push({
89
102
  topic: ConfigValidationTopic.Error,
90
103
  message: `JSONata Managers must contain depName or packageName in the query or their templates`
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../../lib/config/validation-helpers/utils.ts"],"sourcesContent":["import {\n isNonEmptyArray,\n isNonEmptyString,\n isNumber,\n isString,\n} from '@sindresorhus/is';\nimport jsonata from 'jsonata';\nimport { logger } from '../../logger/index.ts';\nimport type { RegexManagerTemplates } from '../../modules/manager/custom/regex/types.ts';\nimport type { CustomManager } from '../../modules/manager/custom/types.ts';\nimport { regEx } from '../../util/regex.ts';\nimport type { ValidationMessage } from '../types.ts';\nimport { ConfigValidationTopic } from './types.ts';\n\nexport function getParentName(parentPath: string | undefined): string {\n return parentPath\n ? parentPath\n .replace(regEx(/\\.?encrypted$/), '')\n .replace(regEx(/\\[\\d+\\]$/), '')\n .split('.')\n .pop()!\n : '.';\n}\n\nexport function validatePlainObject(\n val: Record<string, unknown>,\n): true | string {\n for (const [key, value] of Object.entries(val)) {\n if (!isString(value)) {\n return key;\n }\n }\n return true;\n}\n\nexport function validateNumber(\n key: string,\n val: unknown,\n allowsNegative: boolean,\n currentPath?: string,\n subKey?: string,\n): ValidationMessage[] {\n const errors: ValidationMessage[] = [];\n const path = `${currentPath}${subKey ? `.${subKey}` : ''}`;\n if (isNumber(val)) {\n if (val < 0 && !allowsNegative) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Configuration option \\`${path}\\` should be a positive integer. Found negative value instead.`,\n });\n }\n } else {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Configuration option \\`${path}\\` should be an integer. Found: ${JSON.stringify(\n val,\n )} (${typeof val}).`,\n });\n }\n\n return errors;\n}\n\n/** An option is a false global if it has the same name as a global only option\n * but is actually just the field of a non global option or field an children of the non global option\n * eg. token: it's global option used as Renovate's token as well and\n * also it can be the token used for a platform inside the hostRules configuration\n */\nexport function isFalseGlobal(\n optionName: string,\n parentPath?: string,\n): boolean {\n // v8 ignore else -- TODO: add test #40625\n if (\n parentPath?.includes('hostRules') &&\n (optionName === 'token' ||\n optionName === 'username' ||\n optionName === 'password')\n ) {\n return true;\n }\n\n return false;\n}\n\nfunction hasField(customManager: CustomManager, field: string): boolean {\n const templateField = `${field}Template` as keyof RegexManagerTemplates;\n const fieldStr =\n customManager.customType === 'regex' ? `(?<${field}>` : field;\n return !!(\n customManager[templateField] ??\n customManager.matchStrings?.some((matchString) =>\n matchString.includes(fieldStr),\n )\n );\n}\n\nexport function validateRegexManagerFields(\n customManager: CustomManager,\n currentPath: string,\n errors: ValidationMessage[],\n): void {\n if (isNonEmptyArray(customManager.matchStrings)) {\n for (const matchString of customManager.matchStrings) {\n try {\n regEx(matchString);\n } catch (err) {\n logger.debug(\n { err },\n 'customManager.matchStrings regEx validation error',\n );\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Invalid regExp for ${currentPath}: \\`${matchString}\\``,\n });\n }\n }\n } else {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message:\n 'Each Custom Manager `matchStrings` array must have at least one item.',\n });\n }\n\n const mandatoryFields = ['currentValue', 'datasource'];\n for (const field of mandatoryFields) {\n if (!hasField(customManager, field)) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Regex Managers must contain ${field}Template configuration or regex group named ${field}`,\n });\n }\n }\n\n const nameFields = ['depName', 'packageName'];\n if (!nameFields.some((field) => hasField(customManager, field))) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Regex Managers must contain depName or packageName regex groups or templates`,\n });\n }\n}\n\nexport function validateJSONataManagerFields(\n customManager: CustomManager,\n currentPath: string,\n errors: ValidationMessage[],\n): void {\n if (!isNonEmptyString(customManager.fileFormat)) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: 'Each JSONata manager must contain a fileFormat field.',\n });\n }\n\n if (isNonEmptyArray(customManager.matchStrings)) {\n for (const matchString of customManager.matchStrings) {\n try {\n jsonata(matchString);\n } catch (err) {\n logger.debug(\n { err },\n 'customManager.matchStrings JSONata query validation error',\n );\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Invalid JSONata query for ${currentPath}: \\`${matchString}\\``,\n });\n }\n }\n } else {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Each Custom Manager must contain a non-empty matchStrings array`,\n });\n }\n\n const mandatoryFields = ['currentValue', 'datasource'];\n for (const field of mandatoryFields) {\n if (!hasField(customManager, field)) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `JSONata Managers must contain ${field}Template configuration or ${field} in the query `,\n });\n }\n }\n\n const nameFields = ['depName', 'packageName'];\n if (!nameFields.some((field) => hasField(customManager, field))) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `JSONata Managers must contain depName or packageName in the query or their templates`,\n });\n }\n}\n"],"mappings":";;;;;;AAcA,SAAgB,cAAc,YAAwC;CACpE,OAAO,aACH,WACG,QAAQ,MAAM,eAAe,GAAG,EAAE,CAAC,CACnC,QAAQ,MAAM,UAAU,GAAG,EAAE,CAAC,CAC9B,MAAM,GAAG,CAAC,CACV,IAAI,IACP;AACN;AAEA,SAAgB,oBACd,KACe;CACf,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG,GAC3C,IAAI,CAAC,SAAS,KAAK,GACjB,OAAO;CAGX,OAAO;AACT;AAEA,SAAgB,eACd,KACA,KACA,gBACA,aACA,QACqB;CACrB,MAAM,SAA8B,CAAC;CACrC,MAAM,OAAO,GAAG,cAAc,SAAS,IAAI,WAAW;CACtD,IAAI,SAAS,GAAG,GACV;MAAA,MAAM,KAAK,CAAC,gBACd,OAAO,KAAK;GACV,OAAO,sBAAsB;GAC7B,SAAS,0BAA0B,KAAK;EAC1C,CAAC;CAAA,OAGH,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AAO,sBAAsB;EAC7B,SAAS;CACX,CAAC;CAGH,IAAI,gBAAgB,cAAc,YAAY,GAC5C,KAAK,MAAM,eAAe,cAAc,cACtC,IAAI;EACF,QAAQ,WAAW;CACrB,SAAS,KAAK;EACZ,OAAO,MACL,EAAE,IAAI,GACN,2DACF;EACA,OAAO,KAAK;GACV,OAAO,sBAAsB;GAC7B,SAAS,6BAA6B,YAAY,MAAM,YAAY;EACtE,CAAC;CACH;MAGF,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS;CACX,CAAC;CAIH,KAAK,MAAM,SAAS,CADK,gBAAgB,YACP,GAChC,IAAI,CAAC,SAAS,eAAe,KAAK,GAChC,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS,iCAAiC,MAAM,4BAA4B,MAAM;CACpF,CAAC;CAKL,IAAI,CAAC,CADe,WAAW,aACjB,CAAC,CAAC,MAAM,UAAU,SAAS,eAAe,KAAK,CAAC,GAC5D,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS;CACX,CAAC;AAEL"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../lib/config/validation-helpers/utils.ts"],"sourcesContent":["import {\n isNonEmptyArray,\n isNonEmptyString,\n isNumber,\n isString,\n} from '@sindresorhus/is';\nimport jsonata from 'jsonata';\nimport { logger } from '../../logger/index.ts';\nimport type { RegexManagerTemplates } from '../../modules/manager/custom/regex/types.ts';\nimport type { CustomManager } from '../../modules/manager/custom/types.ts';\nimport { regEx } from '../../util/regex.ts';\nimport type { ValidationMessage } from '../types.ts';\nimport { ConfigValidationTopic } from './types.ts';\n\nexport function getParentName(parentPath: string | undefined): string {\n return parentPath\n ? parentPath\n .replace(regEx(/\\.?encrypted$/), '')\n .replace(regEx(/\\[\\d+\\]$/), '')\n .split('.')\n .pop()!\n : '.';\n}\n\nexport function validatePlainObject(\n val: Record<string, unknown>,\n): true | string {\n for (const [key, value] of Object.entries(val)) {\n if (!isString(value)) {\n return key;\n }\n }\n return true;\n}\n\nexport function validateNumber(\n key: string,\n val: unknown,\n allowsNegative: boolean,\n currentPath?: string,\n subKey?: string,\n): ValidationMessage[] {\n const errors: ValidationMessage[] = [];\n const path = `${currentPath}${subKey ? `.${subKey}` : ''}`;\n if (isNumber(val)) {\n if (val < 0 && !allowsNegative) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Configuration option \\`${path}\\` should be a positive integer. Found negative value instead.`,\n });\n }\n } else {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Configuration option \\`${path}\\` should be an integer. Found: ${JSON.stringify(\n val,\n )} (${typeof val}).`,\n });\n }\n\n return errors;\n}\n\n/** An option is a false global if it has the same name as a global only option\n * but is actually just the field of a non global option or field an children of the non global option\n * eg. token: it's global option used as Renovate's token as well and\n * also it can be the token used for a platform inside the hostRules configuration\n */\nexport function isFalseGlobal(\n optionName: string,\n parentPath?: string,\n): boolean {\n // v8 ignore else -- TODO: add test #40625\n if (\n parentPath?.includes('hostRules') &&\n (optionName === 'token' ||\n optionName === 'username' ||\n optionName === 'password')\n ) {\n return true;\n }\n\n return false;\n}\n\nfunction hasField(customManager: CustomManager, field: string): boolean {\n const templateField = `${field}Template` as keyof RegexManagerTemplates;\n const fieldStr =\n customManager.customType === 'regex' ? `(?<${field}>` : field;\n return !!(\n customManager[templateField] ??\n customManager.matchStrings?.some((matchString) =>\n matchString.includes(fieldStr),\n )\n );\n}\n\nexport function validateRegexManagerFields(\n customManager: CustomManager,\n currentPath: string,\n errors: ValidationMessage[],\n): void {\n if (isNonEmptyArray(customManager.matchStrings)) {\n for (const matchString of customManager.matchStrings) {\n try {\n regEx(matchString);\n } catch (err) {\n logger.debug(\n { err },\n 'customManager.matchStrings regEx validation error',\n );\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Invalid regExp for ${currentPath}: \\`${matchString}\\``,\n });\n }\n }\n } else {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message:\n 'Each Custom Manager `matchStrings` array must have at least one item.',\n });\n }\n\n const mandatoryFields = ['datasource'];\n for (const field of mandatoryFields) {\n if (!hasField(customManager, field)) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Regex Managers must contain ${field}Template configuration or regex group named ${field}`,\n });\n }\n }\n\n const versionFields = ['currentValue', 'currentDigest'];\n if (!versionFields.some((field) => hasField(customManager, field))) {\n const templateFields = versionFields\n .map((field) => `${field}Template`)\n .join(' or ');\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Regex Managers must contain ${versionFields.join(' or ')}, their template variants (${templateFields}) or regex groups named after configuration fields`,\n });\n }\n\n const nameFields = ['depName', 'packageName'];\n if (!nameFields.some((field) => hasField(customManager, field))) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Regex Managers must contain depName or packageName regex groups or templates`,\n });\n }\n}\n\nexport function validateJSONataManagerFields(\n customManager: CustomManager,\n currentPath: string,\n errors: ValidationMessage[],\n): void {\n if (!isNonEmptyString(customManager.fileFormat)) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: 'Each JSONata manager must contain a fileFormat field.',\n });\n }\n\n if (isNonEmptyArray(customManager.matchStrings)) {\n for (const matchString of customManager.matchStrings) {\n try {\n jsonata(matchString);\n } catch (err) {\n logger.debug(\n { err },\n 'customManager.matchStrings JSONata query validation error',\n );\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Invalid JSONata query for ${currentPath}: \\`${matchString}\\``,\n });\n }\n }\n } else {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `Each Custom Manager must contain a non-empty matchStrings array`,\n });\n }\n\n const mandatoryFields = ['datasource'];\n for (const field of mandatoryFields) {\n if (!hasField(customManager, field)) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `JSONata Managers must contain ${field}Template configuration or ${field} in the query `,\n });\n }\n }\n\n const versionFields = ['currentValue', 'currentDigest'];\n if (!versionFields.some((field) => hasField(customManager, field))) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `JSONata Managers must contain ${versionFields.join(' or ')} in the query or their templates`,\n });\n }\n\n const nameFields = ['depName', 'packageName'];\n if (!nameFields.some((field) => hasField(customManager, field))) {\n errors.push({\n topic: ConfigValidationTopic.Error,\n message: `JSONata Managers must contain depName or packageName in the query or their templates`,\n });\n }\n}\n"],"mappings":";;;;;;AAcA,SAAgB,cAAc,YAAwC;CACpE,OAAO,aACH,WACG,QAAQ,MAAM,eAAe,GAAG,EAAE,CAAC,CACnC,QAAQ,MAAM,UAAU,GAAG,EAAE,CAAC,CAC9B,MAAM,GAAG,CAAC,CACV,IAAI,IACP;AACN;AAEA,SAAgB,oBACd,KACe;CACf,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG,GAC3C,IAAI,CAAC,SAAS,KAAK,GACjB,OAAO;CAGX,OAAO;AACT;AAEA,SAAgB,eACd,KACA,KACA,gBACA,aACA,QACqB;CACrB,MAAM,SAA8B,CAAC;CACrC,MAAM,OAAO,GAAG,cAAc,SAAS,IAAI,WAAW;CACtD,IAAI,SAAS,GAAG,GACV;MAAA,MAAM,KAAK,CAAC,gBACd,OAAO,KAAK;GACV,OAAO,sBAAsB;GAC7B,SAAS,0BAA0B,KAAK;EAC1C,CAAC;CAAA,OAGH,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS,0BAA0B,KAAK,kCAAkC,KAAK,UAC7E,GACF,EAAE,IAAI,OAAO,IAAI;CACnB,CAAC;CAGH,OAAO;AACT;;;;;;AAOA,SAAgB,cACd,YACA,YACS;;CAET,IACE,YAAY,SAAS,WAAW,MAC/B,eAAe,WACd,eAAe,cACf,eAAe,aAEjB,OAAO;CAGT,OAAO;AACT;AAEA,SAAS,SAAS,eAA8B,OAAwB;CACtE,MAAM,gBAAgB,GAAG,MAAM;CAC/B,MAAM,WACJ,cAAc,eAAe,UAAU,MAAM,MAAM,KAAK;CAC1D,OAAO,CAAC,EACN,cAAc,kBACd,cAAc,cAAc,MAAM,gBAChC,YAAY,SAAS,QAAQ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IAAI,GACN,2DACF;EACA,OAAO,KAAK;GACV,OAAO,sBAAsB;GAC7B,SAAS,6BAA6B,YAAY,MAAM,YAAY;EACtE,CAAC;CACH;MAGF,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS;CACX,CAAC;CAIH,KAAK,MAAM,SAAS,CADK,YACS,GAChC,IAAI,CAAC,SAAS,eAAe,KAAK,GAChC,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS,iCAAiC,MAAM,4BAA4B,MAAM;CACpF,CAAC;CAIL,MAAM,gBAAgB,CAAC,gBAAgB,eAAe;CACtD,IAAI,CAAC,cAAc,MAAM,UAAU,SAAS,eAAe,KAAK,CAAC,GAC/D,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS,iCAAiC,cAAc,KAAK,MAAM,EAAE;CACvE,CAAC;CAIH,IAAI,CAAC,CADe,WAAW,aACjB,CAAC,CAAC,MAAM,UAAU,SAAS,eAAe,KAAK,CAAC,GAC5D,OAAO,KAAK;EACV,OAAO,sBAAsB;EAC7B,SAAS;CACX,CAAC;AAEL"}
@@ -15,7 +15,7 @@ async function postprocessRelease(config, release) {
15
15
  logger.once.warn({ datasource }, "Release postprocessing is not supported for empty `packageName` field");
16
16
  return release;
17
17
  }
18
- const registryUrl = config.registryUrl ?? config.registryUrls?.at(0) ?? null;
18
+ const registryUrl = release.registryUrl ?? config.registryUrl ?? config.registryUrls?.at(0) ?? null;
19
19
  try {
20
20
  const result = await ds.postprocessRelease({
21
21
  packageName,
@@ -1 +1 @@
1
- {"version":3,"file":"postprocess-release.js","names":[],"sources":["../../../lib/modules/datasource/postprocess-release.ts"],"sourcesContent":["import { logger } from '../../logger/index.ts';\nimport type {\n LookupUpdateConfig,\n UpdateResult,\n} from '../../workers/repository/process/lookup/types.ts';\nimport { getDatasourceFor } from './common.ts';\nimport { Datasource } from './datasource.ts';\nimport type { Release } from './types.ts';\n\ntype Config = Partial<LookupUpdateConfig & UpdateResult>;\n\nexport async function postprocessRelease(\n config: Config,\n release: Release,\n): Promise<Release | null> {\n const { datasource } = config;\n\n const ds = datasource && getDatasourceFor(datasource);\n if (!ds) {\n logger.once.warn(\n { datasource },\n 'Failed to resolve datasource during release postprocessing',\n );\n return release;\n }\n\n if (\n ds.constructor.prototype.postprocessRelease ===\n Datasource.prototype.postprocessRelease\n ) {\n return release;\n }\n\n const { packageName } = config;\n if (!packageName) {\n logger.once.warn(\n { datasource },\n 'Release postprocessing is not supported for empty `packageName` field',\n );\n return release;\n }\n\n const registryUrl = config.registryUrl ?? config.registryUrls?.at(0) ?? null;\n\n try {\n const result = await ds.postprocessRelease(\n { packageName, registryUrl },\n release,\n );\n\n if (result === 'reject') {\n logger.debug(\n {\n datasource,\n packageName,\n registryUrl,\n version: release.version,\n versionOrig: release.versionOrig,\n },\n 'Rejected release',\n );\n return null;\n }\n\n return result;\n } catch (err) {\n logger.once.warn({ err, datasource }, 'Release interceptor failed');\n return release;\n }\n}\n"],"mappings":";;;;AAWA,eAAsB,mBACpB,QACA,SACyB;CACzB,MAAM,EAAE,eAAe;CAEvB,MAAM,KAAK,cAAc,iBAAiB,UAAU;CACpD,IAAI,CAAC,IAAI;EACP,OAAO,KAAK,KACV,EAAE,WAAW,GACb,4DACF;EACA,OAAO;CACT;CAEA,IACE,GAAG,YAAY,UAAU,uBACzB,WAAW,UAAU,oBAErB,OAAO;CAGT,MAAM,EAAE,gBAAgB;CACxB,IAAI,CAAC,aAAa;EAChB,OAAO,KAAK,KACV,EAAE,WAAW,GACb,uEACF;EACA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,eAAe,OAAO,cAAc,GAAG,CAAC,KAAK;CAExE,IAAI;EACF,MAAM,SAAS,MAAM,GAAG,mBACtB;GAAE;GAAa;EAAY,GAC3B,OACF;EAEA,IAAI,WAAW,UAAU;GACvB,OAAO,MACL;IACE;IACA;IACA;IACA,SAAS,QAAQ;IACjB,aAAa,QAAQ;GACvB,GACA,kBACF;GACA,OAAO;EACT;EAEA,OAAO;CACT,SAAS,KAAK;EACZ,OAAO,KAAK,KAAK;GAAE;GAAK;EAAW,GAAG,4BAA4B;EAClE,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"postprocess-release.js","names":[],"sources":["../../../lib/modules/datasource/postprocess-release.ts"],"sourcesContent":["import { logger } from '../../logger/index.ts';\nimport type {\n LookupUpdateConfig,\n UpdateResult,\n} from '../../workers/repository/process/lookup/types.ts';\nimport { getDatasourceFor } from './common.ts';\nimport { Datasource } from './datasource.ts';\nimport type { Release } from './types.ts';\n\ntype Config = Partial<LookupUpdateConfig & UpdateResult>;\n\nexport async function postprocessRelease(\n config: Config,\n release: Release,\n): Promise<Release | null> {\n const { datasource } = config;\n\n const ds = datasource && getDatasourceFor(datasource);\n if (!ds) {\n logger.once.warn(\n { datasource },\n 'Failed to resolve datasource during release postprocessing',\n );\n return release;\n }\n\n if (\n ds.constructor.prototype.postprocessRelease ===\n Datasource.prototype.postprocessRelease\n ) {\n return release;\n }\n\n const { packageName } = config;\n if (!packageName) {\n logger.once.warn(\n { datasource },\n 'Release postprocessing is not supported for empty `packageName` field',\n );\n return release;\n }\n\n // Prefer the registry that actually reported this release (set by `mergeRegistries`\n // for the `merge` registryStrategy) over the configured/default registry, otherwise\n // we may probe a registry that never had this artifact and wrongly reject it.\n const registryUrl =\n release.registryUrl ??\n config.registryUrl ??\n config.registryUrls?.at(0) ??\n null;\n\n try {\n const result = await ds.postprocessRelease(\n { packageName, registryUrl },\n release,\n );\n\n if (result === 'reject') {\n logger.debug(\n {\n datasource,\n packageName,\n registryUrl,\n version: release.version,\n versionOrig: release.versionOrig,\n },\n 'Rejected release',\n );\n return null;\n }\n\n return result;\n } catch (err) {\n logger.once.warn({ err, datasource }, 'Release interceptor failed');\n return release;\n }\n}\n"],"mappings":";;;;AAWA,eAAsB,mBACpB,QACA,SACyB;CACzB,MAAM,EAAE,eAAe;CAEvB,MAAM,KAAK,cAAc,iBAAiB,UAAU;CACpD,IAAI,CAAC,IAAI;EACP,OAAO,KAAK,KACV,EAAE,WAAW,GACb,4DACF;EACA,OAAO;CACT;CAEA,IACE,GAAG,YAAY,UAAU,uBACzB,WAAW,UAAU,oBAErB,OAAO;CAGT,MAAM,EAAE,gBAAgB;CACxB,IAAI,CAAC,aAAa;EAChB,OAAO,KAAK,KACV,EAAE,WAAW,GACb,uEACF;EACA,OAAO;CACT;CAKA,MAAM,cACJ,QAAQ,eACR,OAAO,eACP,OAAO,cAAc,GAAG,CAAC,KACzB;CAEF,IAAI;EACF,MAAM,SAAS,MAAM,GAAG,mBACtB;GAAE;GAAa;EAAY,GAC3B,OACF;EAEA,IAAI,WAAW,UAAU;GACvB,OAAO,MACL;IACE;IACA;IACA;IACA,SAAS,QAAQ;IACjB,aAAa,QAAQ;GACvB,GACA,kBACF;GACA,OAAO;EACT;EAEA,OAAO;CACT,SAAS,KAAK;EACZ,OAAO,KAAK,KAAK;GAAE;GAAK;EAAW,GAAG,4BAA4B;EAClE,OAAO;CACT;AACF"}
@@ -3,38 +3,38 @@ const hashMap = /* @__PURE__ */ new Map();
3
3
  hashMap.set("ansible", "a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81");
4
4
  hashMap.set("ansible-galaxy", "0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f");
5
5
  hashMap.set("ant", "2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17");
6
- hashMap.set("apm", "5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d");
6
+ hashMap.set("apm", "146e023bced69a0625adfac29148a5254d9457ad5a48931c7047299f6452cb43");
7
7
  hashMap.set("argocd", "5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce");
8
8
  hashMap.set("asdf", "430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb");
9
9
  hashMap.set("azure-pipelines", "6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5");
10
- hashMap.set("batect", "bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e");
10
+ hashMap.set("batect", "375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d");
11
11
  hashMap.set("batect-wrapper", "d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939");
12
- hashMap.set("bazel", "c7dfa54a413ea26288a0d8e0557267d36735a725442eb1da6c3ce0e49448b6d0");
13
- hashMap.set("bazel-module", "f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414");
14
- hashMap.set("bazelisk", "d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef");
12
+ hashMap.set("bazel", "ef00591c6f09069550ef97ff7ff5e387b9dd3df51cdecc9ef941169b19315396");
13
+ hashMap.set("bazel-module", "65e6cb3d6c0d9b3b1fda22388b6c72148c518cd06e8c434b46e4645384381bad");
14
+ hashMap.set("bazelisk", "a83328e3c5b4c3f5af2e425f680b4852c08ef5c6d035a248e09577136cf3b14d");
15
15
  hashMap.set("bicep", "7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db");
16
16
  hashMap.set("bitbucket-pipelines", "59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd");
17
17
  hashMap.set("bitrise", "478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42");
18
18
  hashMap.set("buildkite", "b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c");
19
19
  hashMap.set("buildpacks", "6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f");
20
- hashMap.set("bun", "691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94");
20
+ hashMap.set("bun", "3d40239b69d462ab843562ff8ee5bfacbc46d4976d38d0af17d037973f174e3e");
21
21
  hashMap.set("bun-version", "df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4");
22
- hashMap.set("bundler", "c2f33e8d0bc5563ee5defdc4f7dbbd7c941d32cc92a55c43526a4d1aa48faa7b");
23
- hashMap.set("cake", "ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1");
24
- hashMap.set("cargo", "60b94dc32c46d83fd52b11a4c4b5fc7832e819fe05fbfe64b82bc82fe7aa8ebd");
22
+ hashMap.set("bundler", "9c5b8a2e7b84a545bbd6cc74c1fd9422f167da67c41bcc9bfb4cc2098b41de0c");
23
+ hashMap.set("cake", "9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad");
24
+ hashMap.set("cargo", "e8f43c68e874a9f3e684c2f3323b77a2799c49a1a538495ae75fb3a3bdd1f786");
25
25
  hashMap.set("cdnurl", "9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2");
26
26
  hashMap.set("circleci", "91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85");
27
27
  hashMap.set("cloudbuild", "f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c");
28
- hashMap.set("cocoapods", "45af57840b4c967a073202df4660b6dbf792f9b72e9a95b58b4e0920f8db62e3");
29
- hashMap.set("composer", "9d93074ac61a0ca9594ba063510e9a9b6d5298c18869e09734e655c050dc8e2e");
30
- hashMap.set("conan", "74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd");
31
- hashMap.set("copier", "4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5");
28
+ hashMap.set("cocoapods", "f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba");
29
+ hashMap.set("composer", "3906e56e8decf5d5e51cccdb46d2ce4eb4ff8efc8b0596b859f0f7210e13ed45");
30
+ hashMap.set("conan", "1cfe3887dba15d974fbbad3c0f49b7b745a6bad194ff95f067976ce3ae47d2bf");
31
+ hashMap.set("copier", "d70688a4a74d7239229a69eb1e3c5af19da0a38d12b9324c92ff86776fa0dec7");
32
32
  hashMap.set("cpanfile", "07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3");
33
33
  hashMap.set("crossplane", "5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40");
34
34
  hashMap.set("crow", "eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0");
35
- hashMap.set("deno", "517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282");
35
+ hashMap.set("deno", "8f7d06d6e9de36f92d6939097d2c04c1cd87d6901f3ed36ea355bdb0da8a9734");
36
36
  hashMap.set("deps-edn", "7b6ac92be04b44fdf1da8755550a6417bb294908158119c8fff10adeb05048d2");
37
- hashMap.set("devbox", "a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9");
37
+ hashMap.set("devbox", "abca7468e2363c04b7e4b85bfdbc75e11ed38e9d3b84b9ccc6d1a4c34a8fc1fb");
38
38
  hashMap.set("devcontainer", "24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec");
39
39
  hashMap.set("docker-compose", "a9c27711356fbda8dd14f21e046936e1e43f18c5528325b468d89937f76fe1e7");
40
40
  hashMap.set("dockerfile", "84e3949ac7e9ac94451a103545dc1e8f1a99147283e56d816430efed4bec6cc8");
@@ -42,55 +42,55 @@ hashMap.set("droneci", "e2039bb37c2d63c53027b188d1f0faa7c8923dcbfe6cf3851fba8d4e
42
42
  hashMap.set("fleet", "6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925");
43
43
  hashMap.set("flux", "70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5");
44
44
  hashMap.set("fvm", "9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90");
45
- hashMap.set("git-submodules", "f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815");
46
- hashMap.set("github-actions", "05df25da4c176ea71d37112c2e7f7807c975e237e1cc5b74e17d331fb828f4dd");
47
- hashMap.set("gitlabci", "3e12f64e13d492416cf31210ba230635252bbd81da1065c1b2c61cbf6aa9747b");
45
+ hashMap.set("git-submodules", "df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f");
46
+ hashMap.set("github-actions", "28532556bb676239d3af375c21af30cfe392ff029f8a695391e0fc1203fc0cab");
47
+ hashMap.set("gitlabci", "a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672");
48
48
  hashMap.set("gitlabci-include", "8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351");
49
49
  hashMap.set("glasskube", "93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30");
50
- hashMap.set("gleam", "02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39");
51
- hashMap.set("gomod", "e7986458f07fefa59e65c9f2e08d7b04e15264404d7f82a9b18b759243657da4");
52
- hashMap.set("gradle", "1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c");
53
- hashMap.set("gradle-wrapper", "f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142");
50
+ hashMap.set("gleam", "a3bd05c4814eb57872d39979a40342a8ee23e61a85e2ab25e84346e8215dadc1");
51
+ hashMap.set("gomod", "1ed58f0af452a6776ae1899466851bab659f8287c90cff96619068d8184048d5");
52
+ hashMap.set("gradle", "ef9db616bf60e9a3623fff0e41df274a457333a37f37c24f3841a3ca3a531449");
53
+ hashMap.set("gradle-wrapper", "77f7e75be2597b847fc821ff8ff5bb4b3e37ab3cc4e780e22ce75e0342becac8");
54
54
  hashMap.set("haskell-cabal", "f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2");
55
55
  hashMap.set("helm-requirements", "7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a");
56
56
  hashMap.set("helm-values", "01069e887d4f3b55ca62a3c0dc66d8620264e1426207be9eb240a10c1ad5e412");
57
- hashMap.set("helmfile", "3cb0b1b61fcd5539d10c78ded6f254109b65590a77434e02d83a467b30d693a9");
57
+ hashMap.set("helmfile", "433d1d0fd4a81f191a0b553ab52419627b1d7aa0eb3099d53f7ae4a1d076c221");
58
58
  hashMap.set("helmsman", "c4af380756eae8dc988d24c91e9749ce0a97b201daa55f59d2394c1c90d73779");
59
- hashMap.set("helmv3", "068bb746f805e9178ec42dc46371a26ec44500bf3d76c019804bd84ad161a266");
60
- hashMap.set("hermit", "61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6");
59
+ hashMap.set("helmv3", "cc9396b650a7226eeae1bed6b620cfb6d12e6a8ad52faf80b527ffaeb2b68066");
60
+ hashMap.set("hermit", "0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071");
61
61
  hashMap.set("homeassistant-manifest", "05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f");
62
62
  hashMap.set("homebrew", "9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367");
63
63
  hashMap.set("html", "81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f");
64
64
  hashMap.set("jenkins", "7bfb09418a132e052579196633bac78ac947cf93f1e70748ea1b3da929874b87");
65
- hashMap.set("jsonnet-bundler", "dcecce3da2ac4bf1e370beef6407c201acf7365b9695b26bc06000c638a4f5d3");
65
+ hashMap.set("jsonnet-bundler", "06d163b939b258e1e2847a12a1249cb7d68d77c7bcf13c6d1a0a916744eba5cc");
66
66
  hashMap.set("kotlin-script", "95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564");
67
67
  hashMap.set("kubernetes", "321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de");
68
- hashMap.set("kustomize", "bdbbc89e3ddfee017d6b60dae9ba22f5d9c14a4fab66e62c6c0f6ea970df15b2");
68
+ hashMap.set("kustomize", "558fcfe5b20f1eb4aba0d3c755a060bb4561611e99db7000786ce4edcd3f7894");
69
69
  hashMap.set("leiningen", "a7295160ce901e08e12be75cb3aaf6b9a199de811eb60b618feb773f7c552bba");
70
- hashMap.set("maven", "f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead");
70
+ hashMap.set("maven", "c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d");
71
71
  hashMap.set("maven-wrapper", "db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a");
72
72
  hashMap.set("meteor", "4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776");
73
73
  hashMap.set("mint", "248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e");
74
- hashMap.set("mise", "8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b");
75
- hashMap.set("mix", "a1e3bfe963f2539092554092fefcc1c412d641ebfd99b12f1ba7740526946d14");
76
- hashMap.set("nix", "f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7");
74
+ hashMap.set("mise", "945209877bb6672328a5af520ff6928840ada16df6910655b60b6aa9609b080c");
75
+ hashMap.set("mix", "473bb870c00b270faae93c4614873f644ad516f762acf07f773b12a7b8e01d19");
76
+ hashMap.set("nix", "a9d4ae3f9f01abb71dc9ebc12a9cd8bec237ad9d2dabfbf4f5ffd59e56c9a612");
77
77
  hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
78
- hashMap.set("npm", "423bfa5765d6406571013855442663543933717d9df01a73045ae74b0ca4d1a0");
79
- hashMap.set("nuget", "a6ab146fd132698d38920b90b40125f948abf44ce8d39f934e92dacf5c76da23");
78
+ hashMap.set("npm", "e60c7151bffb3c34c2400389558d36575875d66bd9bc5802c89e58989e2dda79");
79
+ hashMap.set("nuget", "136bc3226e77b8fe65940454dc2c858fde86c2e0da6dbbdf71a5269ab137caee");
80
80
  hashMap.set("nvm", "3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322");
81
81
  hashMap.set("ocb", "032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca");
82
82
  hashMap.set("osgi", "d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024");
83
- hashMap.set("pep621", "db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9");
83
+ hashMap.set("pep621", "2908e3287941e0d111b492140b56863915f8ed8601a7728de39ff9f878400210");
84
84
  hashMap.set("pep723", "b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1");
85
- hashMap.set("pip-compile", "a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048");
86
- hashMap.set("pip_requirements", "64da88a4737def525b13a4e94eb82c648cf40b120aed9ba40515c07ac171d9a1");
85
+ hashMap.set("pip-compile", "ad43905a365c677315d2dcba725aef9b82c677d6ff30ee358f890f10faeb035f");
86
+ hashMap.set("pip_requirements", "953af0f3b41c2c1027327a8b1f37675c72892a8b03fdfbc3862ab63a1c3c72bf");
87
87
  hashMap.set("pip_setup", "df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79");
88
- hashMap.set("pipenv", "f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2");
89
- hashMap.set("pixi", "3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393");
90
- hashMap.set("poetry", "affd12cd183c18f8fa52b160910eb4d3385b6db2282c46d3e42a1251646d7022");
88
+ hashMap.set("pipenv", "fc2fd2e06753fada34958eb190c6d9236271b81a8a4cf1a354937a209cef06a9");
89
+ hashMap.set("pixi", "35630a711b242af39f01911835efc8fd19605e564e0e4ede5a18dab7e38fec3e");
90
+ hashMap.set("poetry", "33dfbd8bddcf2aca101be8c869cca7ba8d33a7224c7b86296718814fde8241cb");
91
91
  hashMap.set("pre-commit", "a8fa968d6308947c8a6eedd799ea449e548e918971acdc250b627e86a446dc23");
92
92
  hashMap.set("proto", "412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843");
93
- hashMap.set("pub", "3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b");
93
+ hashMap.set("pub", "d0c11bb1076c7b84a3f30458d8747d5cdfd0126cc52a8d8218ab77c46287219b");
94
94
  hashMap.set("puppet", "ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45");
95
95
  hashMap.set("pyenv", "9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182");
96
96
  hashMap.set("quadlet", "e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d");
@@ -104,8 +104,8 @@ hashMap.set("setup-cfg", "4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25
104
104
  hashMap.set("smithy", "9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100");
105
105
  hashMap.set("sveltos", "e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5");
106
106
  hashMap.set("swift", "5ebd875ee7a541b4725f6263789ea9a7c77a4b7c40b2119f894e67b588cfa672");
107
- hashMap.set("tekton", "e89a148274d29d465e1e9b76c437697372371dd14a6965f862bae7fdb772381a");
108
- hashMap.set("terraform", "f1b16cf43344496d02feddc212a15d5be3be1482092617a02e5ea324558a943f");
107
+ hashMap.set("tekton", "33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9");
108
+ hashMap.set("terraform", "369872bc79b8c0424d68345b2cec69d71534c0a4a42113af8ee7f04c32ad95a2");
109
109
  hashMap.set("terraform-version", "ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa");
110
110
  hashMap.set("terragrunt", "ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118");
111
111
  hashMap.set("terragrunt-version", "eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d");
@@ -114,7 +114,7 @@ hashMap.set("travis", "04c94f72622003195c8ea8147c8fbd93003f444ec807ce33f2ada2384
114
114
  hashMap.set("typst", "d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248");
115
115
  hashMap.set("unity3d", "f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920");
116
116
  hashMap.set("velaci", "fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de");
117
- hashMap.set("vendir", "3afc1385de78918fbb391af8063445e7908c3ec96e161d3f8820ea09bdbbd2be");
117
+ hashMap.set("vendir", "f07c508ef8bf0c6d74b4e3ebdc7573ab606ab7f0671f4d1e5f6002adaed84c9c");
118
118
  hashMap.set("woodpecker", "6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045");
119
119
  hashMap.set("xcodegen", "dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683");
120
120
  hashMap.set("jsonata", "416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7");
@@ -1 +1 @@
1
- {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c7dfa54a413ea26288a0d8e0557267d36735a725442eb1da6c3ce0e49448b6d0');\nhashMap.set('bazel-module','f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','c2f33e8d0bc5563ee5defdc4f7dbbd7c941d32cc92a55c43526a4d1aa48faa7b');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','60b94dc32c46d83fd52b11a4c4b5fc7832e819fe05fbfe64b82bc82fe7aa8ebd');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','45af57840b4c967a073202df4660b6dbf792f9b72e9a95b58b4e0920f8db62e3');\nhashMap.set('composer','9d93074ac61a0ca9594ba063510e9a9b6d5298c18869e09734e655c050dc8e2e');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282');\nhashMap.set('deps-edn','7b6ac92be04b44fdf1da8755550a6417bb294908158119c8fff10adeb05048d2');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','a9c27711356fbda8dd14f21e046936e1e43f18c5528325b468d89937f76fe1e7');\nhashMap.set('dockerfile','84e3949ac7e9ac94451a103545dc1e8f1a99147283e56d816430efed4bec6cc8');\nhashMap.set('droneci','e2039bb37c2d63c53027b188d1f0faa7c8923dcbfe6cf3851fba8d4e9f43a358');\nhashMap.set('fleet','6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815');\nhashMap.set('github-actions','05df25da4c176ea71d37112c2e7f7807c975e237e1cc5b74e17d331fb828f4dd');\nhashMap.set('gitlabci','3e12f64e13d492416cf31210ba230635252bbd81da1065c1b2c61cbf6aa9747b');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','e7986458f07fefa59e65c9f2e08d7b04e15264404d7f82a9b18b759243657da4');\nhashMap.set('gradle','1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c');\nhashMap.set('gradle-wrapper','f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','01069e887d4f3b55ca62a3c0dc66d8620264e1426207be9eb240a10c1ad5e412');\nhashMap.set('helmfile','3cb0b1b61fcd5539d10c78ded6f254109b65590a77434e02d83a467b30d693a9');\nhashMap.set('helmsman','c4af380756eae8dc988d24c91e9749ce0a97b201daa55f59d2394c1c90d73779');\nhashMap.set('helmv3','068bb746f805e9178ec42dc46371a26ec44500bf3d76c019804bd84ad161a266');\nhashMap.set('hermit','61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7bfb09418a132e052579196633bac78ac947cf93f1e70748ea1b3da929874b87');\nhashMap.set('jsonnet-bundler','dcecce3da2ac4bf1e370beef6407c201acf7365b9695b26bc06000c638a4f5d3');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','bdbbc89e3ddfee017d6b60dae9ba22f5d9c14a4fab66e62c6c0f6ea970df15b2');\nhashMap.set('leiningen','a7295160ce901e08e12be75cb3aaf6b9a199de811eb60b618feb773f7c552bba');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b');\nhashMap.set('mix','a1e3bfe963f2539092554092fefcc1c412d641ebfd99b12f1ba7740526946d14');\nhashMap.set('nix','f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','423bfa5765d6406571013855442663543933717d9df01a73045ae74b0ca4d1a0');\nhashMap.set('nuget','a6ab146fd132698d38920b90b40125f948abf44ce8d39f934e92dacf5c76da23');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048');\nhashMap.set('pip_requirements','64da88a4737def525b13a4e94eb82c648cf40b120aed9ba40515c07ac171d9a1');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','affd12cd183c18f8fa52b160910eb4d3385b6db2282c46d3e42a1251646d7022');\nhashMap.set('pre-commit','a8fa968d6308947c8a6eedd799ea449e548e918971acdc250b627e86a446dc23');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','2bb0c98d231bbd6c9043127bfc566a954e7e04fc8654b119c14438a63371e4a7');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5');\nhashMap.set('swift','5ebd875ee7a541b4725f6263789ea9a7c77a4b7c40b2119f894e67b588cfa672');\nhashMap.set('tekton','e89a148274d29d465e1e9b76c437697372371dd14a6965f862bae7fdb772381a');\nhashMap.set('terraform','f1b16cf43344496d02feddc212a15d5be3be1482092617a02e5ea324558a943f');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','04c94f72622003195c8ea8147c8fbd93003f444ec807ce33f2ada2384282db83');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','3afc1385de78918fbb391af8063445e7908c3ec96e161d3f8820ea09bdbbd2be');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,YAAW,kEAA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E;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
1
+ {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','146e023bced69a0625adfac29148a5254d9457ad5a48931c7047299f6452cb43');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','ef00591c6f09069550ef97ff7ff5e387b9dd3df51cdecc9ef941169b19315396');\nhashMap.set('bazel-module','65e6cb3d6c0d9b3b1fda22388b6c72148c518cd06e8c434b46e4645384381bad');\nhashMap.set('bazelisk','a83328e3c5b4c3f5af2e425f680b4852c08ef5c6d035a248e09577136cf3b14d');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','3d40239b69d462ab843562ff8ee5bfacbc46d4976d38d0af17d037973f174e3e');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','9c5b8a2e7b84a545bbd6cc74c1fd9422f167da67c41bcc9bfb4cc2098b41de0c');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','e8f43c68e874a9f3e684c2f3323b77a2799c49a1a538495ae75fb3a3bdd1f786');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','3906e56e8decf5d5e51cccdb46d2ce4eb4ff8efc8b0596b859f0f7210e13ed45');\nhashMap.set('conan','1cfe3887dba15d974fbbad3c0f49b7b745a6bad194ff95f067976ce3ae47d2bf');\nhashMap.set('copier','d70688a4a74d7239229a69eb1e3c5af19da0a38d12b9324c92ff86776fa0dec7');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','8f7d06d6e9de36f92d6939097d2c04c1cd87d6901f3ed36ea355bdb0da8a9734');\nhashMap.set('deps-edn','7b6ac92be04b44fdf1da8755550a6417bb294908158119c8fff10adeb05048d2');\nhashMap.set('devbox','abca7468e2363c04b7e4b85bfdbc75e11ed38e9d3b84b9ccc6d1a4c34a8fc1fb');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','a9c27711356fbda8dd14f21e046936e1e43f18c5528325b468d89937f76fe1e7');\nhashMap.set('dockerfile','84e3949ac7e9ac94451a103545dc1e8f1a99147283e56d816430efed4bec6cc8');\nhashMap.set('droneci','e2039bb37c2d63c53027b188d1f0faa7c8923dcbfe6cf3851fba8d4e9f43a358');\nhashMap.set('fleet','6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f');\nhashMap.set('github-actions','28532556bb676239d3af375c21af30cfe392ff029f8a695391e0fc1203fc0cab');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','a3bd05c4814eb57872d39979a40342a8ee23e61a85e2ab25e84346e8215dadc1');\nhashMap.set('gomod','1ed58f0af452a6776ae1899466851bab659f8287c90cff96619068d8184048d5');\nhashMap.set('gradle','ef9db616bf60e9a3623fff0e41df274a457333a37f37c24f3841a3ca3a531449');\nhashMap.set('gradle-wrapper','77f7e75be2597b847fc821ff8ff5bb4b3e37ab3cc4e780e22ce75e0342becac8');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','01069e887d4f3b55ca62a3c0dc66d8620264e1426207be9eb240a10c1ad5e412');\nhashMap.set('helmfile','433d1d0fd4a81f191a0b553ab52419627b1d7aa0eb3099d53f7ae4a1d076c221');\nhashMap.set('helmsman','c4af380756eae8dc988d24c91e9749ce0a97b201daa55f59d2394c1c90d73779');\nhashMap.set('helmv3','cc9396b650a7226eeae1bed6b620cfb6d12e6a8ad52faf80b527ffaeb2b68066');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7bfb09418a132e052579196633bac78ac947cf93f1e70748ea1b3da929874b87');\nhashMap.set('jsonnet-bundler','06d163b939b258e1e2847a12a1249cb7d68d77c7bcf13c6d1a0a916744eba5cc');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','558fcfe5b20f1eb4aba0d3c755a060bb4561611e99db7000786ce4edcd3f7894');\nhashMap.set('leiningen','a7295160ce901e08e12be75cb3aaf6b9a199de811eb60b618feb773f7c552bba');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','945209877bb6672328a5af520ff6928840ada16df6910655b60b6aa9609b080c');\nhashMap.set('mix','473bb870c00b270faae93c4614873f644ad516f762acf07f773b12a7b8e01d19');\nhashMap.set('nix','a9d4ae3f9f01abb71dc9ebc12a9cd8bec237ad9d2dabfbf4f5ffd59e56c9a612');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','e60c7151bffb3c34c2400389558d36575875d66bd9bc5802c89e58989e2dda79');\nhashMap.set('nuget','136bc3226e77b8fe65940454dc2c858fde86c2e0da6dbbdf71a5269ab137caee');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','2908e3287941e0d111b492140b56863915f8ed8601a7728de39ff9f878400210');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','ad43905a365c677315d2dcba725aef9b82c677d6ff30ee358f890f10faeb035f');\nhashMap.set('pip_requirements','953af0f3b41c2c1027327a8b1f37675c72892a8b03fdfbc3862ab63a1c3c72bf');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','fc2fd2e06753fada34958eb190c6d9236271b81a8a4cf1a354937a209cef06a9');\nhashMap.set('pixi','35630a711b242af39f01911835efc8fd19605e564e0e4ede5a18dab7e38fec3e');\nhashMap.set('poetry','33dfbd8bddcf2aca101be8c869cca7ba8d33a7224c7b86296718814fde8241cb');\nhashMap.set('pre-commit','a8fa968d6308947c8a6eedd799ea449e548e918971acdc250b627e86a446dc23');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','d0c11bb1076c7b84a3f30458d8747d5cdfd0126cc52a8d8218ab77c46287219b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','2bb0c98d231bbd6c9043127bfc566a954e7e04fc8654b119c14438a63371e4a7');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5');\nhashMap.set('swift','5ebd875ee7a541b4725f6263789ea9a7c77a4b7c40b2119f894e67b588cfa672');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','369872bc79b8c0424d68345b2cec69d71534c0a4a42113af8ee7f04c32ad95a2');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','04c94f72622003195c8ea8147c8fbd93003f444ec807ce33f2ada2384282db83');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','f07c508ef8bf0c6d74b4e3ebdc7573ab606ab7f0671f4d1e5f6002adaed84c9c');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,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QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
@@ -80,7 +80,7 @@ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileCon
80
80
  }, []);
81
81
  const execOptions = {
82
82
  extraEnv: { MIX_ARCHIVES: await ensureCacheDir("mix_archives") },
83
- cwdFile: packageFileName,
83
+ cwdFile: lockFileName,
84
84
  docker: {},
85
85
  toolConstraints: [{
86
86
  toolName: "erlang",
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","names":["hostRules\n .getAll","hostRules.find"],"sources":["../../../../lib/modules/manager/mix/artifacts.ts"],"sourcesContent":["import { isEmptyArray, isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport {\n deleteLocalFile,\n ensureCacheDir,\n findLocalSiblingOrParent,\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\n\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\n\nconst hexRepoUrl = 'https://hex.pm/';\nconst hexRepoOrgUrlRegex = regEx(\n `^https://hex\\\\.pm/api/repos/(?<organization>[a-z0-9_]+)/$`,\n);\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`mix.getArtifacts(${packageFileName})`);\n const { isLockFileMaintenance } = config;\n\n if (isEmptyArray(updatedDeps) && !isLockFileMaintenance) {\n logger.debug('No updated mix deps');\n return null;\n }\n\n let lockFileName = getSiblingFileName(packageFileName, 'mix.lock');\n let isUmbrella = false;\n\n let existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n const lockFileError = await checkLockFileReadError(lockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n\n const parentLockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'mix.lock',\n );\n existingLockFileContent =\n parentLockFileName && (await readLocalFile(parentLockFileName, 'utf8'));\n\n if (parentLockFileName && existingLockFileContent) {\n lockFileName = parentLockFileName;\n isUmbrella = true;\n } else if (parentLockFileName) {\n const lockFileError = await checkLockFileReadError(parentLockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n }\n }\n\n if (isLockFileMaintenance && isUmbrella) {\n logger.debug(\n `Cannot use lockFileMaintenance in an umbrella project, see ${GlobalConfig.get('productLinks').documentation}modules/manager/mix/#lockFileMaintenance`,\n );\n return null;\n }\n\n if (isLockFileMaintenance && !existingLockFileContent) {\n logger.debug(\n 'Cannot use lockFileMaintenance when no mix.lock file is present',\n );\n return null;\n }\n\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n if (isLockFileMaintenance) {\n await deleteLocalFile(lockFileName);\n }\n } catch (err) {\n logger.warn({ err }, 'mix.exs could not be written');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n\n if (!existingLockFileContent) {\n logger.debug('No mix.lock found');\n return null;\n }\n\n const organizations = new Set<string>();\n\n const hexHostRulesWithMatchHost = hostRules\n .getAll()\n .filter(\n (hostRule) =>\n !!hostRule.matchHost && hexRepoOrgUrlRegex.test(hostRule.matchHost),\n );\n\n for (const { matchHost } of hexHostRulesWithMatchHost) {\n if (matchHost) {\n const result = hexRepoOrgUrlRegex.exec(matchHost);\n\n if (result?.groups) {\n const { organization } = result.groups;\n organizations.add(organization);\n }\n }\n }\n\n for (const { packageName } of updatedDeps) {\n if (packageName) {\n const [, organization] = packageName.split(':');\n\n if (organization) {\n organizations.add(organization);\n }\n }\n }\n\n const preCommands = Array.from(organizations).reduce((acc, organization) => {\n const url = `${hexRepoUrl}api/repos/${organization}/`;\n const { token } = hostRules.find({ url });\n\n if (token) {\n logger.debug(`Authenticating to hex organization ${organization}`);\n const authCommand = `mix hex.organization auth ${quote(organization)} --key ${quote(token)}`;\n return [...acc, authCommand];\n }\n\n return acc;\n }, [] as string[]);\n\n // renovate: will update this\n const erlangVersion = '26';\n\n const execOptions: ExecOptions = {\n extraEnv: {\n // https://hexdocs.pm/mix/1.15.0/Mix.Tasks.Archive.html\n // TODO: should include a version constraint\n MIX_ARCHIVES: await ensureCacheDir('mix_archives'),\n },\n cwdFile: packageFileName,\n docker: {},\n toolConstraints: [\n {\n toolName: 'erlang',\n // https://hexdocs.pm/elixir/1.14.5/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp\n constraint: config.constraints?.erlang ?? `^${erlangVersion}`,\n },\n {\n toolName: 'elixir',\n constraint: config.constraints?.elixir,\n },\n ],\n preCommands,\n };\n\n let command: string;\n if (isLockFileMaintenance) {\n command = 'mix deps.get';\n } else {\n command = [\n 'mix',\n 'deps.update',\n ...updatedDeps\n .map((dep) => dep.depName)\n .filter(isString)\n .map((dep) => quote(dep)),\n ].join(' ');\n }\n\n try {\n await exec(command, execOptions);\n } catch (err) {\n /* v8 ignore if -- defensive rethrow of TEMPORARY_ERROR from exec, not reproduced in mix specs */\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n\n logger.debug(\n { err, message: err.message, command },\n 'Failed to update Mix lock file',\n );\n\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n\n const newMixLockContent = await readLocalFile(lockFileName, 'utf8');\n if (existingLockFileContent === newMixLockContent) {\n logger.debug('mix.lock is unchanged');\n return null;\n }\n logger.debug('Returning updated mix.lock');\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newMixLockContent,\n },\n },\n ];\n}\n\nasync function checkLockFileReadError(\n lockFileName: string,\n): Promise<UpdateArtifactsResult[] | null> {\n if (await localPathExists(lockFileName)) {\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: `Error reading ${lockFileName}`,\n },\n },\n ];\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;AAqBA,MAAM,aAAa;AACnB,MAAM,qBAAqB,MACzB,2DACF;AAEA,eAAsB,gBAAgB,EACpC,iBACA,aACA,uBACA,UAC0D;CAC1D,OAAO,MAAM,oBAAoB,gBAAgB,EAAE;CACnD,MAAM,EAAE,0BAA0B;CAElC,IAAI,aAAa,WAAW,KAAK,CAAC,uBAAuB;EACvD,OAAO,MAAM,qBAAqB;EAClC,OAAO;CACT;CAEA,IAAI,eAAe,mBAAmB,iBAAiB,UAAU;CACjE,IAAI,aAAa;CAEjB,IAAI,0BAA0B,MAAM,cAAc,cAAc,MAAM;CACtE,IAAI,CAAC,yBAAyB;EAC5B,MAAM,gBAAgB,MAAM,uBAAuB,YAAY;EAC/D,IAAI,eACF,OAAO;EAGT,MAAM,qB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AAY,GACpC,OAAO,CACL,EACE,eAAe;EACb,UAAU;EACV,QAAQ,iBAAiB;CAC3B,EACF,CACF;CAEF,OAAO;AACT"}
1
+ {"version":3,"file":"artifacts.js","names":["hostRules\n .getAll","hostRules.find"],"sources":["../../../../lib/modules/manager/mix/artifacts.ts"],"sourcesContent":["import { isEmptyArray, isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport {\n deleteLocalFile,\n ensureCacheDir,\n findLocalSiblingOrParent,\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\n\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\n\nconst hexRepoUrl = 'https://hex.pm/';\nconst hexRepoOrgUrlRegex = regEx(\n `^https://hex\\\\.pm/api/repos/(?<organization>[a-z0-9_]+)/$`,\n);\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`mix.getArtifacts(${packageFileName})`);\n const { isLockFileMaintenance } = config;\n\n if (isEmptyArray(updatedDeps) && !isLockFileMaintenance) {\n logger.debug('No updated mix deps');\n return null;\n }\n\n let lockFileName = getSiblingFileName(packageFileName, 'mix.lock');\n let isUmbrella = false;\n\n let existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n const lockFileError = await checkLockFileReadError(lockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n\n const parentLockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'mix.lock',\n );\n existingLockFileContent =\n parentLockFileName && (await readLocalFile(parentLockFileName, 'utf8'));\n\n if (parentLockFileName && existingLockFileContent) {\n lockFileName = parentLockFileName;\n isUmbrella = true;\n } else if (parentLockFileName) {\n const lockFileError = await checkLockFileReadError(parentLockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n }\n }\n\n if (isLockFileMaintenance && isUmbrella) {\n logger.debug(\n `Cannot use lockFileMaintenance in an umbrella project, see ${GlobalConfig.get('productLinks').documentation}modules/manager/mix/#lockFileMaintenance`,\n );\n return null;\n }\n\n if (isLockFileMaintenance && !existingLockFileContent) {\n logger.debug(\n 'Cannot use lockFileMaintenance when no mix.lock file is present',\n );\n return null;\n }\n\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n if (isLockFileMaintenance) {\n await deleteLocalFile(lockFileName);\n }\n } catch (err) {\n logger.warn({ err }, 'mix.exs could not be written');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n\n if (!existingLockFileContent) {\n logger.debug('No mix.lock found');\n return null;\n }\n\n const organizations = new Set<string>();\n\n const hexHostRulesWithMatchHost = hostRules\n .getAll()\n .filter(\n (hostRule) =>\n !!hostRule.matchHost && hexRepoOrgUrlRegex.test(hostRule.matchHost),\n );\n\n for (const { matchHost } of hexHostRulesWithMatchHost) {\n if (matchHost) {\n const result = hexRepoOrgUrlRegex.exec(matchHost);\n\n if (result?.groups) {\n const { organization } = result.groups;\n organizations.add(organization);\n }\n }\n }\n\n for (const { packageName } of updatedDeps) {\n if (packageName) {\n const [, organization] = packageName.split(':');\n\n if (organization) {\n organizations.add(organization);\n }\n }\n }\n\n const preCommands = Array.from(organizations).reduce((acc, organization) => {\n const url = `${hexRepoUrl}api/repos/${organization}/`;\n const { token } = hostRules.find({ url });\n\n if (token) {\n logger.debug(`Authenticating to hex organization ${organization}`);\n const authCommand = `mix hex.organization auth ${quote(organization)} --key ${quote(token)}`;\n return [...acc, authCommand];\n }\n\n return acc;\n }, [] as string[]);\n\n // renovate: will update this\n const erlangVersion = '26';\n\n const execOptions: ExecOptions = {\n extraEnv: {\n // https://hexdocs.pm/mix/1.15.0/Mix.Tasks.Archive.html\n // TODO: should include a version constraint\n MIX_ARCHIVES: await ensureCacheDir('mix_archives'),\n },\n cwdFile: lockFileName,\n docker: {},\n toolConstraints: [\n {\n toolName: 'erlang',\n // https://hexdocs.pm/elixir/1.14.5/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp\n constraint: config.constraints?.erlang ?? `^${erlangVersion}`,\n },\n {\n toolName: 'elixir',\n constraint: config.constraints?.elixir,\n },\n ],\n preCommands,\n };\n\n let command: string;\n if (isLockFileMaintenance) {\n command = 'mix deps.get';\n } else {\n command = [\n 'mix',\n 'deps.update',\n ...updatedDeps\n .map((dep) => dep.depName)\n .filter(isString)\n .map((dep) => quote(dep)),\n ].join(' ');\n }\n\n try {\n await exec(command, execOptions);\n } catch (err) {\n /* v8 ignore if -- defensive rethrow of TEMPORARY_ERROR from exec, not reproduced in mix specs */\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n\n logger.debug(\n { err, message: err.message, command },\n 'Failed to update Mix lock file',\n );\n\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n\n const newMixLockContent = await readLocalFile(lockFileName, 'utf8');\n if (existingLockFileContent === newMixLockContent) {\n logger.debug('mix.lock is unchanged');\n return null;\n }\n logger.debug('Returning updated mix.lock');\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newMixLockContent,\n },\n },\n ];\n}\n\nasync function checkLockFileReadError(\n lockFileName: string,\n): Promise<UpdateArtifactsResult[] | null> {\n if (await localPathExists(lockFileName)) {\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: `Error reading ${lockFileName}`,\n },\n },\n ];\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;AAqBA,MAAM,aAAa;AACnB,MAAM,qBAAqB,MACzB,2DACF;AAEA,eAAsB,gBAAgB,EACpC,iBACA,aACA,uBACA,UAC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;EAAQ,GACrC,gCACF;EAEA,OAAO,CACL,EACE,eAAe;GACb,UAAU;GACV,QAAQ,IAAI;EACd,EACF,CACF;CACF;CAEA,MAAM,oBAAoB,MAAM,cAAc,cAAc,MAAM;CAClE,IAAI,4BAA4B,mBAAmB;EACjD,OAAO,MAAM,uBAAuB;EACpC,OAAO;CACT;CACA,OAAO,MAAM,4BAA4B;CACzC,OAAO,CACL,EACE,MAAM;EACJ,MAAM;EACN,MAAM;EACN,UAAU;CACZ,EACF,CACF;AACF;AAEA,eAAe,uBACb,cACyC;CACzC,IAAI,MAAM,gBAAgB,YAAY,GACpC,OAAO,CACL,EACE,eAAe;EACb,UAAU;EACV,QAAQ,iBAAiB;CAC3B,EACF,CACF;CAEF,OAAO;AACT"}
@@ -18,6 +18,9 @@ import { quote } from "shlex";
18
18
  //#region lib/modules/manager/pep621/processors/uv.ts
19
19
  const uvUpdateCMD = "uv lock";
20
20
  const gitExec = withGitEnvironment(["pep621"]);
21
+ function isUvIndexSource(source) {
22
+ return "index" in source;
23
+ }
21
24
  var UvProcessor = class extends BasePyProjectProcessor {
22
25
  lockfileName = "uv.lock";
23
26
  process(project, deps) {
@@ -32,19 +35,24 @@ var UvProcessor = class extends BasePyProjectProcessor {
32
35
  /* v8 ignore next -- needs test */
33
36
  if (!dep.packageName) continue;
34
37
  if (dep.depType === "requires-python") continue;
35
- const depSource = uv.sources?.[dep.packageName];
36
- if (depSource) {
38
+ const depSources = uv.sources?.[dep.packageName];
39
+ if (depSources) {
37
40
  dep.depType = depTypes.uvSources;
38
- if ("index" in depSource) {
39
- const index = uv.index?.find(({ name }) => name === depSource.index);
40
- if (index) dep.registryUrls = [index.url];
41
- } else if ("git" in depSource) applyGitSource(dep, depSource.git, depSource.rev, depSource.tag, depSource.branch);
42
- else if ("url" in depSource) dep.skipReason = "unsupported-url";
43
- else if ("path" in depSource) dep.skipReason = "path-dependency";
44
- else if ("workspace" in depSource) dep.skipReason = "inherited-dependency";
45
- else
46
- /* v8 ignore next -- unreachable through schema */
47
- dep.skipReason = "unknown-registry";
41
+ if (depSources.every(isUvIndexSource)) {
42
+ const registryUrls = [];
43
+ for (const depSource of depSources) {
44
+ const index = uv.index?.find(({ name }) => name === depSource.index);
45
+ if (index) registryUrls.push(index.url);
46
+ }
47
+ if (registryUrls.length) dep.registryUrls = [...new Set(registryUrls)];
48
+ } else if (depSources.length === 1) {
49
+ const depSource = depSources[0];
50
+ if ("git" in depSource) applyGitSource(dep, depSource.git, depSource.rev, depSource.tag, depSource.branch);
51
+ else if ("url" in depSource) dep.skipReason = "unsupported-url";
52
+ else if ("path" in depSource) dep.skipReason = "path-dependency";
53
+ else if ("workspace" in depSource) dep.skipReason = "inherited-dependency";
54
+ else dep.skipReason = "unknown-registry";
55
+ } else dep.skipReason = "unsupported";
48
56
  } else {
49
57
  if (hasExplicitDefault) dep.registryUrls = [];
50
58
  else if (defaultIndex) dep.registryUrls = [defaultIndex.url];
@@ -1 +1 @@
1
- {"version":3,"file":"uv.js","names":[],"sources":["../../../../../lib/modules/manager/pep621/processors/uv.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../../constants/error-messages.ts';\nimport { logger } from '../../../../logger/index.ts';\nimport type { HostRule } from '../../../../types/index.ts';\nimport { coerceArray } from '../../../../util/array.ts';\nimport type {\n ExecOptions,\n ToolConstraint,\n} from '../../../../util/exec/types.ts';\nimport {\n findLocalSiblingOrParent,\n readLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../../util/git/exec.ts';\nimport { find } from '../../../../util/host-rules.ts';\nimport { regEx } from '../../../../util/regex.ts';\nimport { Result } from '../../../../util/result.ts';\nimport { parseUrl } from '../../../../util/url.ts';\nimport { PypiDatasource } from '../../../datasource/pypi/index.ts';\nimport { getGoogleAuthHostRule } from '../../../datasource/util.ts';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsResult,\n Upgrade,\n} from '../../types.ts';\nimport { applyGitSource } from '../../util.ts';\nimport { type PyProject, UvLockfile } from '../schema.ts';\nimport { depTypes } from '../utils.ts';\nimport { BasePyProjectProcessor } from './abstract.ts';\n\nconst uvUpdateCMD = 'uv lock';\nconst gitExec = withGitEnvironment(['pep621']);\n\nexport class UvProcessor extends BasePyProjectProcessor {\n override lockfileName = 'uv.lock';\n\n process(project: PyProject, deps: PackageDependency[]): PackageDependency[] {\n const uv = project.tool?.uv;\n if (!uv) {\n return deps;\n }\n\n const hasExplicitDefault = uv.index?.some(\n (index) => index.default && index.explicit,\n );\n const defaultIndex = uv.index?.find(\n (index) => index.default && !index.explicit,\n );\n const implicitIndexUrls = uv.index\n ?.filter((index) => !index.explicit && index.name !== defaultIndex?.name)\n ?.map(({ url }) => url);\n\n const devDependencies = uv['dev-dependencies'];\n if (devDependencies) {\n deps.push(...devDependencies);\n }\n\n // https://docs.astral.sh/uv/concepts/dependencies/#dependency-sources\n // Skip sources that do not make sense to handle (e.g. path).\n if (uv.sources || defaultIndex || implicitIndexUrls) {\n for (const dep of deps) {\n /* v8 ignore next -- needs test */\n if (!dep.packageName) {\n continue;\n }\n\n if (dep.depType === 'requires-python') {\n continue;\n }\n\n // Using `packageName` as it applies PEP 508 normalization, which is\n // also applied by uv when matching a source to a dependency.\n const depSource = uv.sources?.[dep.packageName];\n if (depSource) {\n // Dependency is pinned to a specific source.\n dep.depType = depTypes.uvSources;\n if ('index' in depSource) {\n const index = uv.index?.find(\n ({ name }) => name === depSource.index,\n );\n if (index) {\n dep.registryUrls = [index.url];\n }\n } else if ('git' in depSource) {\n applyGitSource(\n dep,\n depSource.git,\n depSource.rev,\n depSource.tag,\n depSource.branch,\n );\n } else if ('url' in depSource) {\n dep.skipReason = 'unsupported-url';\n } else if ('path' in depSource) {\n dep.skipReason = 'path-dependency';\n } else if ('workspace' in depSource) {\n dep.skipReason = 'inherited-dependency';\n } else {\n /* v8 ignore next -- unreachable through schema */\n dep.skipReason = 'unknown-registry';\n }\n } else {\n // Dependency is not pinned to a specific source, so we need to\n // determine the source based on the index configuration.\n if (hasExplicitDefault) {\n // don't fall back to pypi if there is an explicit default index\n dep.registryUrls = [];\n } else if (defaultIndex) {\n // There is a default index configured, so use it.\n dep.registryUrls = [defaultIndex.url];\n }\n\n if (implicitIndexUrls?.length) {\n // If there are implicit indexes, check them first and fall back\n // to the default.\n dep.registryUrls = implicitIndexUrls.concat(\n dep.registryUrls ?? PypiDatasource.defaultURL,\n );\n }\n }\n }\n }\n\n return deps;\n }\n\n async extractLockedVersions(\n project: PyProject,\n deps: PackageDependency[],\n packageFile: string,\n ): Promise<PackageDependency[]> {\n const lockFileName = await findLocalSiblingOrParent(\n packageFile,\n this.lockfileName,\n );\n if (lockFileName === null) {\n logger.debug({ packageFile }, `No uv lock file found`);\n } else {\n const lockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (lockFileContent) {\n const { val: lockFileMapping, err } = Result.parse(\n lockFileContent,\n UvLockfile,\n ).unwrap();\n\n if (err) {\n logger.debug({ packageFile, err }, `Error parsing uv lock file`);\n } else {\n for (const dep of deps) {\n const packageName = dep.packageName;\n if (packageName && packageName in lockFileMapping) {\n dep.lockedVersion = lockFileMapping[packageName];\n }\n }\n }\n }\n }\n\n return Promise.resolve(deps);\n }\n\n async updateArtifacts(\n updateArtifact: UpdateArtifact,\n project: PyProject,\n ): Promise<UpdateArtifactsResult[] | null> {\n const { config, updatedDeps, packageFileName } = updateArtifact;\n\n const { isLockFileMaintenance } = config;\n\n // abort if no lockfile is defined\n const lockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'uv.lock',\n );\n if (lockFileName === null) {\n logger.debug({ packageFileName }, `No uv lock file found`);\n return null;\n }\n try {\n const existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug('No uv.lock found');\n return null;\n }\n\n const pythonConstraint: ToolConstraint = {\n toolName: 'python',\n constraint:\n config.constraints?.python ?? project.project?.['requires-python'],\n };\n const uvConstraint: ToolConstraint = {\n toolName: 'uv',\n constraint:\n config.constraints?.uv ?? project.tool?.uv?.['required-version'],\n };\n\n const extraEnv = {\n ...(await getUvExtraIndexUrl(project, updateArtifact.updatedDeps)),\n ...(await getUvIndexCredentials(project)),\n };\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n docker: {},\n toolConstraints: [pythonConstraint, uvConstraint],\n };\n\n // on lockFileMaintenance do not specify any packages and update the complete lock file\n // else only update specific packages\n let cmd: string;\n if (isLockFileMaintenance) {\n cmd = `${uvUpdateCMD} --upgrade`;\n } else {\n cmd = generateCMD(updatedDeps);\n }\n await gitExec(cmd, execOptions);\n\n // check for changes\n const fileChanges: UpdateArtifactsResult[] = [];\n const newLockContent = await readLocalFile(lockFileName, 'utf8');\n const isLockFileChanged = existingLockFileContent !== newLockContent;\n if (isLockFileChanged) {\n fileChanges.push({\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newLockContent,\n },\n });\n } else {\n logger.debug('uv.lock is unchanged');\n }\n\n return fileChanges.length ? fileChanges : null;\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update uv lock file');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n }\n}\n\nfunction generateCMD(updatedDeps: Upgrade[]): string {\n const deps: string[] = [];\n\n for (const dep of updatedDeps) {\n switch (dep.depType) {\n case depTypes.optionalDependencies: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.uvDevDependencies:\n case depTypes.uvSources: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.buildSystemRequires:\n // build requirements are not locked in the lock files, no need to update.\n break;\n default: {\n deps.push(dep.packageName!);\n }\n }\n }\n\n return `${uvUpdateCMD} ${deps.map((dep) => `--upgrade-package ${quote(dep)}`).join(' ')}`;\n}\n\nfunction getMatchingHostRule(url: string | undefined): HostRule {\n return find({ hostType: PypiDatasource.id, url });\n}\n\nasync function getUsernamePassword(\n url: URL,\n): Promise<{ username?: string; password?: string }> {\n const rule = getMatchingHostRule(url.toString());\n if (rule.username || rule.password) {\n return rule;\n }\n\n if (url.hostname.endsWith('.pkg.dev')) {\n const hostRule = await getGoogleAuthHostRule();\n if (hostRule) {\n return hostRule;\n }\n logger.once.debug({ url }, 'Could not get Google access token');\n }\n\n return {};\n}\n\nasync function getUvExtraIndexUrl(\n project: PyProject,\n deps: Upgrade[],\n): Promise<NodeJS.ProcessEnv> {\n const pyPiRegistryUrls = deps\n .filter((dep) => dep.datasource === PypiDatasource.id)\n .filter((dep) => {\n // Remove dependencies that are pinned to a specific index\n const sources = project.tool?.uv?.sources;\n const packageName = dep.packageName!;\n return !sources || !(packageName in sources);\n })\n .flatMap((dep) => dep.registryUrls)\n .filter(isString)\n .filter((registryUrl) => {\n // Check if the registry URL is not the default one and not already configured\n const configuredIndexUrls = coerceArray(\n project.tool?.uv?.index?.map(({ url }) => url),\n );\n return (\n registryUrl !== PypiDatasource.defaultURL &&\n !configuredIndexUrls.includes(registryUrl)\n );\n });\n\n const registryUrls = new Set(pyPiRegistryUrls);\n const extraIndexUrls: string[] = [];\n\n for (const registryUrl of registryUrls) {\n const parsedUrl = parseUrl(registryUrl);\n if (!parsedUrl) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n if (username || password) {\n if (username) {\n parsedUrl.username = username;\n }\n if (password) {\n parsedUrl.password = password;\n }\n }\n\n extraIndexUrls.push(parsedUrl.toString());\n }\n\n return {\n UV_EXTRA_INDEX_URL: extraIndexUrls.join(' '),\n };\n}\n\nasync function getUvIndexCredentials(\n project: PyProject,\n): Promise<NodeJS.ProcessEnv> {\n const uv_indexes = project.tool?.uv?.index;\n\n if (!uv_indexes) {\n return {};\n }\n\n const entries = [];\n\n for (const { name, url } of uv_indexes) {\n const parsedUrl = parseUrl(url);\n /* v8 ignore next -- needs test */\n if (!parsedUrl) {\n continue;\n }\n\n // If no name is provided for the index, authentication information must be passed through alternative methods\n if (!name) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n\n const NAME = name.toUpperCase().replace(regEx(/[^A-Z0-9]/g), '_');\n\n if (username) {\n entries.push([`UV_INDEX_${NAME}_USERNAME`, username]);\n }\n\n if (password) {\n entries.push([`UV_INDEX_${NAME}_PASSWORD`, password]);\n }\n }\n\n return Object.fromEntries(entries);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,MAAM,cAAc;AACpB,MAAM,UAAU,mBAAmB,CAAC,QAAQ,CAAC;AAE7C,IAAa,cAAb,cAAiC,uBAAuB;CACtD,eAAwB;CAExB,QAAQ,SAAoB,MAAgD;EAC1E,MAAM,KAAK,QAAQ,MAAM;EACzB,IAAI,CAAC,IACH,OAAO;EAGT,MAAM,qBAAqB,GAAG,OAAO,MAClC,UAAU,MAAM,WAAW,MAAM,QACpC;EACA,MAAM,eAAe,GAAG,OAAO,MAC5B,UAAU,MAAM,WAAW,CAAC,MAAM,QACrC;EACA,MAAM,oBAAoB,GAAG,OACzB,QAAQ,UAAU,CAAC,MAAM,YAAY,MAAM,SAAS,cAAc,IAAI,CAAC,EACvE,KAAK,EAAE,UAAU,GAAG;EAExB,MAAM,kBAAkB,GAAG;EAC3B,IAAI,iBACF,KAAK,KAAK,GAAG,eAAe;EAK9B,IAAI,GAAG,WAAW,gBAAgB,mBAChC,KAAK,MAAM,OAAO,MAAM;;GAEtB,IAAI,CAAC,IAAI,aACP;GAGF,IAAI,IAAI,YAAY,mBAClB;GAKF,MAAM,YAAY,GAAG,UAAU,IAAI;GACnC,IAAI,WAAW;IAEb,IAAI,UAAU,SAAS;IACvB,IAAI,WAAW,WAAW;KACxB,MAAM,QAAQ,GAAG,OAAO,MACrB,EAAE,WAAW,SAAS,UAAU,KACnC;KACA,IAAI,OACF,IAAI,eAAe,CAAC,MAAM,GAAG;IAEjC,OAAO,IAAI,SAAS,WAClB,eACE,KACA,UAAU,KACV,UAAU,KACV,UAAU,KACV,UAAU,MAC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,oBAAoB,eAAe,KAAK,GAAG,EAC7C;AACF;AAEA,eAAe,sBACb,SAC4B;CAC5B,MAAM,aAAa,QAAQ,MAAM,IAAI;CAErC,IAAI,CAAC,YACH,OAAO,CAAC;CAGV,MAAM,UAAU,CAAC;CAEjB,KAAK,MAAM,EAAE,MAAM,SAAS,YAAY;EACtC,MAAM,YAAY,SAAS,GAAG;;EAE9B,IAAI,CAAC,WACH;EAIF,IAAI,CAAC,MACH;EAGF,MAAM,EAAE,UAAU,aAAa,MAAM,oBAAoB,SAAS;EAElE,MAAM,OAAO,KAAK,YAAY,CAAC,CAAC,QAAQ,MAAM,YAAY,GAAG,GAAG;EAEhE,IAAI,UACF,QAAQ,KAAK,CAAC,YAAY,KAAK,YAAY,QAAQ,CAAC;EAGtD,IAAI,UACF,QAAQ,KAAK,CAAC,YAAY,KAAK,YAAY,QAAQ,CAAC;CAExD;CAEA,OAAO,OAAO,YAAY,OAAO;AACnC"}
1
+ {"version":3,"file":"uv.js","names":[],"sources":["../../../../../lib/modules/manager/pep621/processors/uv.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../../constants/error-messages.ts';\nimport { logger } from '../../../../logger/index.ts';\nimport type { HostRule } from '../../../../types/index.ts';\nimport { coerceArray } from '../../../../util/array.ts';\nimport type {\n ExecOptions,\n ToolConstraint,\n} from '../../../../util/exec/types.ts';\nimport {\n findLocalSiblingOrParent,\n readLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../../util/git/exec.ts';\nimport { find } from '../../../../util/host-rules.ts';\nimport { regEx } from '../../../../util/regex.ts';\nimport { Result } from '../../../../util/result.ts';\nimport { parseUrl } from '../../../../util/url.ts';\nimport { PypiDatasource } from '../../../datasource/pypi/index.ts';\nimport { getGoogleAuthHostRule } from '../../../datasource/util.ts';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsResult,\n Upgrade,\n} from '../../types.ts';\nimport { applyGitSource } from '../../util.ts';\nimport { type PyProject, UvLockfile, type UvSource } from '../schema.ts';\nimport { depTypes } from '../utils.ts';\nimport { BasePyProjectProcessor } from './abstract.ts';\n\nconst uvUpdateCMD = 'uv lock';\nconst gitExec = withGitEnvironment(['pep621']);\n\nfunction isUvIndexSource(\n source: UvSource,\n): source is Extract<UvSource, { index: string }> {\n return 'index' in source;\n}\n\nexport class UvProcessor extends BasePyProjectProcessor {\n override lockfileName = 'uv.lock';\n\n process(project: PyProject, deps: PackageDependency[]): PackageDependency[] {\n const uv = project.tool?.uv;\n if (!uv) {\n return deps;\n }\n\n const hasExplicitDefault = uv.index?.some(\n (index) => index.default && index.explicit,\n );\n const defaultIndex = uv.index?.find(\n (index) => index.default && !index.explicit,\n );\n const implicitIndexUrls = uv.index\n ?.filter((index) => !index.explicit && index.name !== defaultIndex?.name)\n ?.map(({ url }) => url);\n\n const devDependencies = uv['dev-dependencies'];\n if (devDependencies) {\n deps.push(...devDependencies);\n }\n\n // https://docs.astral.sh/uv/concepts/dependencies/#dependency-sources\n // Skip sources that do not make sense to handle (e.g. path).\n if (uv.sources || defaultIndex || implicitIndexUrls) {\n for (const dep of deps) {\n /* v8 ignore next -- needs test */\n if (!dep.packageName) {\n continue;\n }\n\n if (dep.depType === 'requires-python') {\n continue;\n }\n\n // Using `packageName` as it applies PEP 508 normalization, which is\n // also applied by uv when matching a source to a dependency.\n const depSources = uv.sources?.[dep.packageName];\n if (depSources) {\n // Dependency is pinned to one or more specific sources.\n dep.depType = depTypes.uvSources;\n if (depSources.every(isUvIndexSource)) {\n // Sources referencing an index, possibly disambiguated by\n // environment markers. Any of the indexes can serve the package,\n // so use all of them as registries.\n const registryUrls: string[] = [];\n for (const depSource of depSources) {\n const index = uv.index?.find(\n ({ name }) => name === depSource.index,\n );\n if (index) {\n registryUrls.push(index.url);\n }\n }\n if (registryUrls.length) {\n dep.registryUrls = [...new Set(registryUrls)];\n }\n } else if (depSources.length === 1) {\n const depSource = depSources[0];\n if ('git' in depSource) {\n applyGitSource(\n dep,\n depSource.git,\n depSource.rev,\n depSource.tag,\n depSource.branch,\n );\n } else if ('url' in depSource) {\n dep.skipReason = 'unsupported-url';\n } else if ('path' in depSource) {\n dep.skipReason = 'path-dependency';\n } else if ('workspace' in depSource) {\n dep.skipReason = 'inherited-dependency';\n } else {\n dep.skipReason = 'unknown-registry';\n }\n } else {\n // Multiple sources that are not all indexes (e.g. a git source\n // per platform) cannot be represented as a single update.\n dep.skipReason = 'unsupported';\n }\n } else {\n // Dependency is not pinned to a specific source, so we need to\n // determine the source based on the index configuration.\n if (hasExplicitDefault) {\n // don't fall back to pypi if there is an explicit default index\n dep.registryUrls = [];\n } else if (defaultIndex) {\n // There is a default index configured, so use it.\n dep.registryUrls = [defaultIndex.url];\n }\n\n if (implicitIndexUrls?.length) {\n // If there are implicit indexes, check them first and fall back\n // to the default.\n dep.registryUrls = implicitIndexUrls.concat(\n dep.registryUrls ?? PypiDatasource.defaultURL,\n );\n }\n }\n }\n }\n\n return deps;\n }\n\n async extractLockedVersions(\n project: PyProject,\n deps: PackageDependency[],\n packageFile: string,\n ): Promise<PackageDependency[]> {\n const lockFileName = await findLocalSiblingOrParent(\n packageFile,\n this.lockfileName,\n );\n if (lockFileName === null) {\n logger.debug({ packageFile }, `No uv lock file found`);\n } else {\n const lockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (lockFileContent) {\n const { val: lockFileMapping, err } = Result.parse(\n lockFileContent,\n UvLockfile,\n ).unwrap();\n\n if (err) {\n logger.debug({ packageFile, err }, `Error parsing uv lock file`);\n } else {\n for (const dep of deps) {\n const packageName = dep.packageName;\n if (packageName && packageName in lockFileMapping) {\n dep.lockedVersion = lockFileMapping[packageName];\n }\n }\n }\n }\n }\n\n return Promise.resolve(deps);\n }\n\n async updateArtifacts(\n updateArtifact: UpdateArtifact,\n project: PyProject,\n ): Promise<UpdateArtifactsResult[] | null> {\n const { config, updatedDeps, packageFileName } = updateArtifact;\n\n const { isLockFileMaintenance } = config;\n\n // abort if no lockfile is defined\n const lockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'uv.lock',\n );\n if (lockFileName === null) {\n logger.debug({ packageFileName }, `No uv lock file found`);\n return null;\n }\n try {\n const existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug('No uv.lock found');\n return null;\n }\n\n const pythonConstraint: ToolConstraint = {\n toolName: 'python',\n constraint:\n config.constraints?.python ?? project.project?.['requires-python'],\n };\n const uvConstraint: ToolConstraint = {\n toolName: 'uv',\n constraint:\n config.constraints?.uv ?? project.tool?.uv?.['required-version'],\n };\n\n const extraEnv = {\n ...(await getUvExtraIndexUrl(project, updateArtifact.updatedDeps)),\n ...(await getUvIndexCredentials(project)),\n };\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n docker: {},\n toolConstraints: [pythonConstraint, uvConstraint],\n };\n\n // on lockFileMaintenance do not specify any packages and update the complete lock file\n // else only update specific packages\n let cmd: string;\n if (isLockFileMaintenance) {\n cmd = `${uvUpdateCMD} --upgrade`;\n } else {\n cmd = generateCMD(updatedDeps);\n }\n await gitExec(cmd, execOptions);\n\n // check for changes\n const fileChanges: UpdateArtifactsResult[] = [];\n const newLockContent = await readLocalFile(lockFileName, 'utf8');\n const isLockFileChanged = existingLockFileContent !== newLockContent;\n if (isLockFileChanged) {\n fileChanges.push({\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newLockContent,\n },\n });\n } else {\n logger.debug('uv.lock is unchanged');\n }\n\n return fileChanges.length ? fileChanges : null;\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update uv lock file');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n }\n}\n\nfunction generateCMD(updatedDeps: Upgrade[]): string {\n const deps: string[] = [];\n\n for (const dep of updatedDeps) {\n switch (dep.depType) {\n case depTypes.optionalDependencies: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.uvDevDependencies:\n case depTypes.uvSources: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.buildSystemRequires:\n // build requirements are not locked in the lock files, no need to update.\n break;\n default: {\n deps.push(dep.packageName!);\n }\n }\n }\n\n return `${uvUpdateCMD} ${deps.map((dep) => `--upgrade-package ${quote(dep)}`).join(' ')}`;\n}\n\nfunction getMatchingHostRule(url: string | undefined): HostRule {\n return find({ hostType: PypiDatasource.id, url });\n}\n\nasync function getUsernamePassword(\n url: URL,\n): Promise<{ username?: string; password?: string }> {\n const rule = getMatchingHostRule(url.toString());\n if (rule.username || rule.password) {\n return rule;\n }\n\n if (url.hostname.endsWith('.pkg.dev')) {\n const hostRule = await getGoogleAuthHostRule();\n if (hostRule) {\n return hostRule;\n }\n logger.once.debug({ url }, 'Could not get Google access token');\n }\n\n return {};\n}\n\nasync function getUvExtraIndexUrl(\n project: PyProject,\n deps: Upgrade[],\n): Promise<NodeJS.ProcessEnv> {\n const pyPiRegistryUrls = deps\n .filter((dep) => dep.datasource === PypiDatasource.id)\n .filter((dep) => {\n // Remove dependencies that are pinned to a specific index\n const sources = project.tool?.uv?.sources;\n const packageName = dep.packageName!;\n return !sources || !(packageName in sources);\n })\n .flatMap((dep) => dep.registryUrls)\n .filter(isString)\n .filter((registryUrl) => {\n // Check if the registry URL is not the default one and not already configured\n const configuredIndexUrls = coerceArray(\n project.tool?.uv?.index?.map(({ url }) => url),\n );\n return (\n registryUrl !== PypiDatasource.defaultURL &&\n !configuredIndexUrls.includes(registryUrl)\n );\n });\n\n const registryUrls = new Set(pyPiRegistryUrls);\n const extraIndexUrls: string[] = [];\n\n for (const registryUrl of registryUrls) {\n const parsedUrl = parseUrl(registryUrl);\n if (!parsedUrl) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n if (username || password) {\n if (username) {\n parsedUrl.username = username;\n }\n if (password) {\n parsedUrl.password = password;\n }\n }\n\n extraIndexUrls.push(parsedUrl.toString());\n }\n\n return {\n UV_EXTRA_INDEX_URL: extraIndexUrls.join(' '),\n };\n}\n\nasync function getUvIndexCredentials(\n project: PyProject,\n): Promise<NodeJS.ProcessEnv> {\n const uv_indexes = project.tool?.uv?.index;\n\n if (!uv_indexes) {\n return {};\n }\n\n const entries = [];\n\n for (const { name, url } of uv_indexes) {\n const parsedUrl = parseUrl(url);\n /* v8 ignore next -- needs test */\n if (!parsedUrl) {\n continue;\n }\n\n // If no name is provided for the index, authentication information must be passed through alternative methods\n if (!name) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n\n const NAME = name.toUpperCase().replace(regEx(/[^A-Z0-9]/g), '_');\n\n if (username) {\n entries.push([`UV_INDEX_${NAME}_USERNAME`, username]);\n }\n\n if (password) {\n entries.push([`UV_INDEX_${NAME}_PASSWORD`, password]);\n }\n }\n\n return Object.fromEntries(entries);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,MAAM,cAAc;AACpB,MAAM,UAAU,mBAAmB,CAAC,QAAQ,CAAC;AAE7C,SAAS,gBACP,QACgD;CAChD,OAAO,WAAW;AACpB;AAEA,IAAa,cAAb,cAAiC,uBAAuB;CACtD,eAAwB;CAExB,QAAQ,SAAoB,MAAgD;EAC1E,MAAM,KAAK,QAAQ,MAAM;EACzB,IAAI,CAAC,IACH,OAAO;EAGT,MAAM,qBAAqB,GAAG,OAAO,MAClC,UAAU,MAAM,WAAW,MAAM,QACpC;EACA,MAAM,eAAe,GAAG,OAAO,MAC5B,UAAU,MAAM,WAAW,CAAC,MAAM,QACrC;EACA,MAAM,oBAAoB,GAAG,OACzB,QAAQ,UAAU,CAAC,MAAM,YAAY,MAAM,SAAS,cAAc,IAAI,CAAC,EACvE,KAAK,EAAE,UAAU,GAAG;EAExB,MAAM,kBAAkB,GAAG;EAC3B,IAAI,iBACF,KAAK,KAAK,GAAG,eAAe;EAK9B,IAAI,GAAG,WAAW,gBAAgB,mBAChC,KAAK,MAAM,O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WorkspaceSource
79
79
  ]);
80
+ const UvSources = z.union([UvSource, z.array(UvSource).min(1)]).transform((source) => Array.isArray(source) ? source : [source]);
80
81
  const UvConfig = z.object({
81
82
  "dev-dependencies": LooseArray(Pep508Dependency(depTypes.uvDevDependencies)).catch([]),
82
83
  "required-version": z.string().optional(),
83
- sources: LooseRecord(z.string().transform((source) => normalizePythonDepName(source)), UvSource).optional(),
84
+ sources: LooseRecord(z.string().transform((source) => normalizePythonDepName(source)), UvSources).optional(),
84
85
  index: z.array(z.object({
85
86
  name: z.string().optional(),
86
87
  url: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/manager/pep621/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport {\n LooseArray,\n LooseRecord,\n Toml,\n} from '../../../util/schema-utils/index.ts';\nimport { normalizePythonDepName } from '../../datasource/pypi/common.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport type { PackageDependency } from '../types.ts';\nimport { depTypes, pep508ToPackageDependency } from './utils.ts';\n\ntype Pep508Dependency = z.ZodType<PackageDependency>;\n\nfunction Pep508Dependency(depType: string): Pep508Dependency {\n return z.string().transform((x, ctx) => {\n const res = pep508ToPackageDependency(depType, x);\n\n if (!res) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'should be a valid PEP508 dependency',\n fatal: true,\n });\n\n return z.NEVER;\n }\n\n return res;\n }) as Pep508Dependency;\n}\n\ntype DependencyGroup = z.ZodType<PackageDependency[]>;\n\nexport function DependencyGroup(depType: string): DependencyGroup {\n return LooseRecord(LooseArray(Pep508Dependency(depType))).transform(\n (depGroups) => {\n const deps: PackageDependency[] = [];\n for (const [depGroup, groupDeps] of Object.entries(depGroups)) {\n for (const dep of groupDeps) {\n if (dep.packageName) {\n dep.depName = dep.packageName;\n }\n dep.managerData = { depGroup };\n deps.push(dep);\n }\n }\n return deps;\n },\n );\n}\n\nconst PdmConfig = z\n .object({\n 'dev-dependencies': DependencyGroup(depTypes.pdmDevDependencies).catch([]),\n source: LooseArray(\n z.object({\n url: z.string(),\n name: z.string(),\n }),\n )\n .transform((pdmSource) => {\n const registryUrls: string[] = [];\n\n let containsPyPiUrl = false;\n for (const source of pdmSource) {\n if (source.name === 'pypi') {\n containsPyPiUrl = true;\n }\n\n registryUrls.push(source.url);\n }\n\n // Add pypi default url, if there is no source declared with the name `pypi`\n // @see https://daobook.github.io/pdm/pyproject/tool-pdm/#specify-other-sources-for-finding-packages\n if (!containsPyPiUrl) {\n registryUrls.unshift(PypiDatasource.defaultURL);\n }\n\n return registryUrls;\n })\n .optional()\n .catch(undefined),\n })\n .transform(\n ({ 'dev-dependencies': devDependencies, source: registryUrls }) => ({\n devDependencies,\n registryUrls,\n }),\n );\n\nconst HatchConfig = z\n .object({\n envs: LooseRecord(\n z.string(),\n z.object({\n dependencies: z.unknown().optional(),\n 'extra-dependencies': z.unknown().optional(),\n }),\n ),\n })\n .catch({ envs: {} })\n .transform(({ envs }) => {\n const deps: PackageDependency[] = [];\n for (const [\n envName,\n { dependencies, 'extra-dependencies': extraDependencies },\n ] of Object.entries(envs)) {\n const depType = `tool.hatch.envs.${envName}`;\n const HatchDependency = LooseArray(Pep508Dependency(depType)).catch([]);\n deps.push(\n ...HatchDependency.parse(dependencies),\n ...HatchDependency.parse(extraDependencies),\n );\n }\n return { deps };\n });\n\nconst UvIndexSource = z.object({\n index: z.string(),\n});\n\nconst UvGitSource = z.object({\n git: z.string(),\n rev: z.string().optional(),\n tag: z.string().optional(),\n branch: z.string().optional(),\n});\nexport type UvGitSource = z.infer<typeof UvGitSource>;\n\nconst UvUrlSource = z.object({\n url: z.string(),\n});\n\nconst UvPathSource = z.object({\n path: z.string(),\n});\n\nconst UvWorkspaceSource = z.object({\n workspace: z.literal(true),\n});\n\n// https://docs.astral.sh/uv/concepts/dependencies/#dependency-sources\nconst UvSource = z.union([\n UvIndexSource,\n UvGitSource,\n UvUrlSource,\n UvPathSource,\n UvWorkspaceSource,\n]);\n\nconst UvConfig = z.object({\n 'dev-dependencies': LooseArray(\n Pep508Dependency(depTypes.uvDevDependencies),\n ).catch([]),\n 'required-version': z.string().optional(),\n sources: LooseRecord(\n // uv applies the same normalization as for Python dependencies on sources\n z.string().transform((source) => normalizePythonDepName(source)),\n UvSource,\n ).optional(),\n index: z\n .array(\n z.object({\n name: z.string().optional(),\n url: z.string(),\n default: z.boolean().default(false),\n explicit: z.boolean().default(false),\n }),\n )\n .optional(),\n});\n\nexport const ProjectSection = z.object({\n version: z.string().optional().catch(undefined),\n 'requires-python': z.string().optional().catch(undefined),\n dependencies: LooseArray(Pep508Dependency(depTypes.dependencies)).catch([]),\n 'optional-dependencies': DependencyGroup(depTypes.optionalDependencies).catch(\n [],\n ),\n});\n\nconst PixiMinimalConfig = z\n .object({\n project: z\n .object({ 'requires-pixi': z.string().optional() })\n .optional()\n .catch(undefined),\n workspace: z\n .object({ 'requires-pixi': z.string().optional() })\n .optional()\n .catch(undefined),\n })\n .transform((val) => ({\n 'requires-pixi':\n val.project?.['requires-pixi'] ?? val.workspace?.['requires-pixi'],\n }))\n .optional()\n .catch(undefined);\n\nexport const PyProject = z.object({\n project: ProjectSection.optional().catch(undefined),\n 'build-system': z\n .object({\n requires: LooseArray(\n Pep508Dependency(depTypes.buildSystemRequires),\n ).catch([]),\n 'build-backend': z.string().optional().catch(undefined),\n })\n .optional()\n .catch(undefined),\n 'dependency-groups': DependencyGroup(depTypes.dependencyGroups).catch([]),\n tool: z\n .object({\n pdm: PdmConfig.optional().catch(undefined),\n hatch: HatchConfig.optional().catch(undefined),\n uv: UvConfig.optional().catch(undefined),\n pixi: PixiMinimalConfig,\n })\n .optional()\n .catch(undefined),\n});\nexport type PyProject = z.infer<typeof PyProject>;\n\nexport const PdmLockfile = Toml.pipe(\n z.object({\n package: LooseArray(\n z.object({\n name: z.string(),\n version: z.string(),\n }),\n ),\n }),\n)\n .transform(({ package: pkg }) =>\n Object.fromEntries(\n pkg.map(({ name, version }): [string, string] => [name, version]),\n ),\n )\n .transform((lock) => ({ lock }));\n\nexport const UvLockfile = Toml.pipe(\n z.object({\n package: LooseArray(\n z.object({\n name: z.string(),\n version: z.string(),\n }),\n ),\n }),\n).transform(({ package: pkg }) =>\n Object.fromEntries(\n pkg.map(({ name, version }): [string, string] => [name, version]),\n ),\n);\n"],"mappings":";;;;;;AAaA,SAAS,iBAAiB,SAAmC;CAC3D,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,GAAG,QAAQ;EACtC,MAAM,MAAM,0BAA0B,SAAS,CAAC;EAEhD,IAAI,CAAC,KAAK;GACR,IAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,SAAS;IACT,OAAO;GACT,CAAC;GAED,OAAO,EAAE;EACX;EAEA,OAAO;CACT,CAAC;AACH;AAIA,SAAgB,gBAAgB,SAAkC;CAChE,OAAO,YAAY,WAAW,iBAAiB,OAAO,CAAC,CAAC,CAAC,CAAC,WACvD,cAAc;EACb,MAAM,OAA4B,CAAC;EACnC,KAAK,MAAM,CAAC,UAAU,cAAc,OAAO,QAAQ,SAAS,GAC1D,KAAK,MAAM,OAAO,WAAW;GAC3B,IAAI,IAAI,aACN,IAAI,UAAU,IAAI;GAEpB,IAAI,cAAc,EAAE,SAAS;GAC7B,KAAK,KAAK,GAAG;EACf;EAEF,OAAO;CACT,CACF;AACF;AAEA,MAAM,YAAY,EACf,OAAO;CACN,oBAAoB,gBAAgB,SAAS,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;CACzE,QAAQ,WACN,EAAE,OAAO;EACP,KAAK,EAAE,OAAO;EACd,MAAM,EAAE,OAAO;CACjB,CAAC,CACH,CAAC,CACE,WAAW,cAAc;EACxB,MAAM,eAAyB,CAAC;EAEhC,IAAI,kBAAkB;EACtB,KAAK,MAAM,UAAU,WAAW;GAC9B,IAAI,OAAO,SAAS,QAClB,kBAAkB;GAGpB,aAAa,KAAK,OAAO,GAAG;EAC9B;EAIA,IAAI,CAAC,iBACH,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AW,EAAE,SAAS,UACtB,OAAO,YACL,IAAI,KAAK,EAAE,MAAM,cAAgC,CAAC,MAAM,OAAO,CAAC,CAClE,CACF"}
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/manager/pep621/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport {\n LooseArray,\n LooseRecord,\n Toml,\n} from '../../../util/schema-utils/index.ts';\nimport { normalizePythonDepName } from '../../datasource/pypi/common.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport type { PackageDependency } from '../types.ts';\nimport { depTypes, pep508ToPackageDependency } from './utils.ts';\n\ntype Pep508Dependency = z.ZodType<PackageDependency>;\n\nfunction Pep508Dependency(depType: string): Pep508Dependency {\n return z.string().transform((x, ctx) => {\n const res = pep508ToPackageDependency(depType, x);\n\n if (!res) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'should be a valid PEP508 dependency',\n fatal: true,\n });\n\n return z.NEVER;\n }\n\n return res;\n }) as Pep508Dependency;\n}\n\ntype DependencyGroup = z.ZodType<PackageDependency[]>;\n\nexport function DependencyGroup(depType: string): DependencyGroup {\n return LooseRecord(LooseArray(Pep508Dependency(depType))).transform(\n (depGroups) => {\n const deps: PackageDependency[] = [];\n for (const [depGroup, groupDeps] of Object.entries(depGroups)) {\n for (const dep of groupDeps) {\n if (dep.packageName) {\n dep.depName = dep.packageName;\n }\n dep.managerData = { depGroup };\n deps.push(dep);\n }\n }\n return deps;\n },\n );\n}\n\nconst PdmConfig = z\n .object({\n 'dev-dependencies': DependencyGroup(depTypes.pdmDevDependencies).catch([]),\n source: LooseArray(\n z.object({\n url: z.string(),\n name: z.string(),\n }),\n )\n .transform((pdmSource) => {\n const registryUrls: string[] = [];\n\n let containsPyPiUrl = false;\n for (const source of pdmSource) {\n if (source.name === 'pypi') {\n containsPyPiUrl = true;\n }\n\n registryUrls.push(source.url);\n }\n\n // Add pypi default url, if there is no source declared with the name `pypi`\n // @see https://daobook.github.io/pdm/pyproject/tool-pdm/#specify-other-sources-for-finding-packages\n if (!containsPyPiUrl) {\n registryUrls.unshift(PypiDatasource.defaultURL);\n }\n\n return registryUrls;\n })\n .optional()\n .catch(undefined),\n })\n .transform(\n ({ 'dev-dependencies': devDependencies, source: registryUrls }) => ({\n devDependencies,\n registryUrls,\n }),\n );\n\nconst HatchConfig = z\n .object({\n envs: LooseRecord(\n z.string(),\n z.object({\n dependencies: z.unknown().optional(),\n 'extra-dependencies': z.unknown().optional(),\n }),\n ),\n })\n .catch({ envs: {} })\n .transform(({ envs }) => {\n const deps: PackageDependency[] = [];\n for (const [\n envName,\n { dependencies, 'extra-dependencies': extraDependencies },\n ] of Object.entries(envs)) {\n const depType = `tool.hatch.envs.${envName}`;\n const HatchDependency = LooseArray(Pep508Dependency(depType)).catch([]);\n deps.push(\n ...HatchDependency.parse(dependencies),\n ...HatchDependency.parse(extraDependencies),\n );\n }\n return { deps };\n });\n\nconst UvIndexSource = z.object({\n index: z.string(),\n});\n\nconst UvGitSource = z.object({\n git: z.string(),\n rev: z.string().optional(),\n tag: z.string().optional(),\n branch: z.string().optional(),\n});\nexport type UvGitSource = z.infer<typeof UvGitSource>;\n\nconst UvUrlSource = z.object({\n url: z.string(),\n});\n\nconst UvPathSource = z.object({\n path: z.string(),\n});\n\nconst UvWorkspaceSource = z.object({\n workspace: z.literal(true),\n});\n\n// https://docs.astral.sh/uv/concepts/dependencies/#dependency-sources\nconst UvSource = z.union([\n UvIndexSource,\n UvGitSource,\n UvUrlSource,\n UvPathSource,\n UvWorkspaceSource,\n]);\nexport type UvSource = z.infer<typeof UvSource>;\n\n// A dependency can declare a single source or, when disambiguated by\n// environment markers, an array of sources. Normalize both to an array.\n// https://docs.astral.sh/uv/concepts/projects/dependencies/#multiple-sources\nconst UvSources = z\n .union([UvSource, z.array(UvSource).min(1)])\n .transform((source) => (Array.isArray(source) ? source : [source]));\n\nconst UvConfig = z.object({\n 'dev-dependencies': LooseArray(\n Pep508Dependency(depTypes.uvDevDependencies),\n ).catch([]),\n 'required-version': z.string().optional(),\n sources: LooseRecord(\n // uv applies the same normalization as for Python dependencies on sources\n z.string().transform((source) => normalizePythonDepName(source)),\n UvSources,\n ).optional(),\n index: z\n .array(\n z.object({\n name: z.string().optional(),\n url: z.string(),\n default: z.boolean().default(false),\n explicit: z.boolean().default(false),\n }),\n )\n .optional(),\n});\n\nexport const ProjectSection = z.object({\n version: z.string().optional().catch(undefined),\n 'requires-python': z.string().optional().catch(undefined),\n dependencies: LooseArray(Pep508Dependency(depTypes.dependencies)).catch([]),\n 'optional-dependencies': DependencyGroup(depTypes.optionalDependencies).catch(\n [],\n ),\n});\n\nconst PixiMinimalConfig = z\n .object({\n project: z\n .object({ 'requires-pixi': z.string().optional() })\n .optional()\n .catch(undefined),\n workspace: z\n .object({ 'requires-pixi': z.string().optional() })\n .optional()\n .catch(undefined),\n })\n .transform((val) => ({\n 'requires-pixi':\n val.project?.['requires-pixi'] ?? val.workspace?.['requires-pixi'],\n }))\n .optional()\n .catch(undefined);\n\nexport const PyProject = z.object({\n project: ProjectSection.optional().catch(undefined),\n 'build-system': z\n .object({\n requires: LooseArray(\n Pep508Dependency(depTypes.buildSystemRequires),\n ).catch([]),\n 'build-backend': z.string().optional().catch(undefined),\n })\n .optional()\n .catch(undefined),\n 'dependency-groups': DependencyGroup(depTypes.dependencyGroups).catch([]),\n tool: z\n .object({\n pdm: PdmConfig.optional().catch(undefined),\n hatch: HatchConfig.optional().catch(undefined),\n uv: UvConfig.optional().catch(undefined),\n pixi: PixiMinimalConfig,\n })\n .optional()\n .catch(undefined),\n});\nexport type PyProject = z.infer<typeof PyProject>;\n\nexport const PdmLockfile = Toml.pipe(\n z.object({\n package: LooseArray(\n z.object({\n name: z.string(),\n version: z.string(),\n }),\n ),\n }),\n)\n .transform(({ package: pkg }) =>\n Object.fromEntries(\n pkg.map(({ name, version }): [string, string] => [name, version]),\n ),\n )\n .transform((lock) => ({ lock }));\n\nexport const UvLockfile = Toml.pipe(\n z.object({\n package: LooseArray(\n z.object({\n name: z.string(),\n version: z.string(),\n }),\n ),\n }),\n).transform(({ package: pkg }) =>\n Object.fromEntries(\n pkg.map(({ name, version }): [string, string] => [name, version]),\n ),\n);\n"],"mappings":";;;;;;AAaA,SAAS,iBAAiB,SAAmC;CAC3D,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,GAAG,QAAQ;EACtC,MAAM,MAAM,0BAA0B,SAAS,CAAC;EAEhD,IAAI,CAAC,KAAK;GACR,IAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,SAAS;IACT,OAAO;GACT,CAAC;GAED,OAAO,EAAE;EACX;EAEA,OAAO;CACT,CAAC;AACH;AAIA,SAAgB,gBAAgB,SAAkC;CAChE,OAAO,YAAY,WAAW,iBAAiB,OAAO,CAAC,CAAC,CAAC,CAAC,WACvD,cAAc;EACb,MAAM,OAA4B,CAAC;EACnC,KAAK,MAAM,CAAC,UAAU,cAAc,OAAO,QAAQ,SAAS,GAC1D,KAAK,MAAM,OAAO,WAAW;GAC3B,IAAI,IAAI,aACN,IAAI,UAAU,IAAI;GAEpB,IAAI,cAAc,EAAE,SAAS;GAC7B,KAAK,KAAK,GAAG;EACf;EAEF,OAAO;CACT,CACF;AACF;AAEA,MAAM,YAAY,EACf,OAAO;CACN,oBAAoB,gBAAgB,SAAS,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;CACzE,QAAQ,WACN,EAAE,OAAO;EACP,KAAK,EAAE,OAAO;EACd,MAAM,EAAE,OAAO;CACjB,CAAC,CACH,CAAC,CACE,WAAW,cAAc;EACxB,MAAM,eAAyB,CAAC;EAEhC,IAAI,kBAAkB;EACtB,KAAK,MAAM,UAAU,WAAW;GAC9B,IAAI,OAAO,SAAS,QAClB,kBAAkB;GAGpB,aAAa,KAAK,OAAO,GAAG;EAC9B;EAIA,IAAI,CAAC,iBACH,aAAa,QAAQ,eAAe,UAAU;EAGhD,OAAO;CACT,CAAC,CAAC,CACD,SAAS,CAAC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AE,OAAO;CACP,MAAM,EAAE,OAAO;CACf,SAAS,EAAE,OAAO;AACpB,CAAC,CACH,EACF,CAAC,CACH,CAAC,CAAC,WAAW,EAAE,SAAS,UACtB,OAAO,YACL,IAAI,KAAK,EAAE,MAAM,cAAgC,CAAC,MAAM,OAAO,CAAC,CAClE,CACF"}
@@ -96,6 +96,7 @@ var NugetVersioningApi = class {
96
96
  for (const version of versions) {
97
97
  const v = parseVersion(version);
98
98
  if (!v) continue;
99
+ if (v.prerelease && !u.prerelease) continue;
99
100
  if (compare(v, u) < 0) continue;
100
101
  if (!vMax || compare(v, vMax) > 0) {
101
102
  vMax = v;
@@ -206,7 +207,10 @@ var NugetVersioningApi = class {
206
207
  const v = parseVersion(version);
207
208
  if (!v) return false;
208
209
  const u = parseVersion(range);
209
- if (u) return compare(v, u) >= 0;
210
+ if (u) {
211
+ if (v.prerelease && !u.prerelease) return false;
212
+ return compare(v, u) >= 0;
213
+ }
210
214
  const r = parseRange(range);
211
215
  if (!r) return false;
212
216
  return matches(v, r);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/versioning/nuget/index.ts"],"sourcesContent":["import type { NewValueConfig, VersioningApi } from '../types.ts';\nimport { parseRange, parseVersion } from './parser.ts';\nimport {\n coerceFloatingComponent,\n getFloatingRangeLowerBound,\n matches,\n rangeToString,\n tryBump,\n} from './range.ts';\nimport type {\n NugetBracketRange,\n NugetFloatingRange,\n NugetVersion,\n} from './types.ts';\nimport { compare, versionToString } from './version.ts';\n\nexport const id = 'nuget';\nexport const displayName = 'NuGet';\nexport const urls = [\n '[NuGet package versioning](https://learn.microsoft.com/nuget/concepts/package-versioning)',\n '[NuGet version range tool](https://nugettools.azurewebsites.net/)',\n];\nexport const supportsRanges = true;\nexport const supportedRangeStrategies = ['bump'];\n\nclass NugetVersioningApi implements VersioningApi {\n isCompatible(version: string, _current?: string): boolean {\n return this.isValid(version);\n }\n\n isSingleVersion(version: string): boolean {\n const r = parseRange(version);\n if (!r) {\n return false;\n }\n\n return r.type === 'nuget-exact-range';\n }\n\n isStable(version: string): boolean {\n const v = parseVersion(version);\n if (v) {\n return !v.prerelease;\n }\n\n const r = parseRange(version);\n if (r?.type !== 'nuget-exact-range') {\n return false;\n }\n\n return !r.version.prerelease;\n }\n\n isValid(input: string): boolean {\n const v = parseVersion(input);\n if (v) {\n return true;\n }\n\n const r = parseRange(input);\n if (r) {\n return true;\n }\n\n return false;\n }\n\n isVersion(input: string | undefined | null): boolean {\n if (!input) {\n return false;\n }\n\n const v = parseVersion(input);\n if (!v) {\n return false;\n }\n\n return true;\n }\n\n getMajor(version: string): number | null {\n const v = parseVersion(version);\n if (!v) {\n return null;\n }\n\n return v.major;\n }\n\n getMinor(version: string): number | null {\n const v = parseVersion(version);\n if (!v) {\n return null;\n }\n\n return v.minor ?? null;\n }\n\n getPatch(version: string): number | null {\n const v = parseVersion(version);\n if (!v) {\n return null;\n }\n\n return v.patch ?? null;\n }\n\n equals(version: string, other: string): boolean {\n const x = parseVersion(version);\n const y = parseVersion(other);\n if (!x || !y) {\n return false;\n }\n\n return compare(x, y) === 0;\n }\n\n isGreaterThan(version: string, other: string): boolean {\n const x = parseVersion(version);\n const y = parseVersion(other);\n if (!x || !y) {\n return false;\n }\n\n return compare(x, y) > 0;\n }\n\n isLessThanRange(version: string, range: string): boolean {\n const v = parseVersion(version);\n if (!v) {\n return false;\n }\n\n const u = parseVersion(range);\n if (u) {\n return compare(v, u) < 0;\n }\n\n const r = parseRange(range);\n if (!r) {\n return false;\n }\n\n if (r.type === 'nuget-exact-range') {\n return compare(v, r.version) < 0;\n }\n\n if (r.type === 'nuget-bracket-range') {\n if (!r.min) {\n return false;\n }\n\n const minBound =\n r.min.type === 'nuget-version'\n ? r.min\n : getFloatingRangeLowerBound(r.min);\n const cmp = compare(v, minBound);\n return r.minInclusive ? cmp < 0 : cmp <= 0;\n }\n\n const minBound = getFloatingRangeLowerBound(r);\n return compare(v, minBound) < 0;\n }\n\n getSatisfyingVersion(versions: string[], range: string): string | null {\n const r = parseRange(range);\n if (r) {\n let result: string | null = null;\n let vMax: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n if (!matches(v, r)) {\n continue;\n }\n\n if (!vMax || compare(v, vMax) > 0) {\n vMax = v;\n result = version;\n }\n }\n\n return result;\n }\n\n const u = parseVersion(range);\n if (u) {\n let result: string | null = null;\n let vMax: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n if (compare(v, u) < 0) {\n continue;\n }\n\n if (!vMax || compare(v, vMax) > 0) {\n vMax = v;\n result = version;\n }\n }\n\n return result;\n }\n\n return null;\n }\n\n minSatisfyingVersion(versions: string[], range: string): string | null {\n const r = parseRange(range);\n if (r) {\n let result: string | null = null;\n let vMin: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n if (!matches(v, r)) {\n continue;\n }\n\n if (!vMin || compare(v, vMin) < 0) {\n result = version;\n vMin = v;\n }\n }\n\n return result;\n }\n\n const u = parseVersion(range);\n if (u) {\n let result: string | null = null;\n let vMin: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n if (compare(v, u) < 0) {\n continue;\n }\n\n if (!vMin || compare(v, vMin) < 0) {\n result = version;\n vMin = v;\n }\n }\n\n return result;\n }\n\n return null;\n }\n\n getPinnedValue(newVersion: string): string {\n const v = parseVersion(newVersion);\n if (!v) {\n return '';\n }\n return rangeToString({ type: 'nuget-exact-range', version: v });\n }\n\n getNewValue({ currentValue, newVersion }: NewValueConfig): string | null {\n const v = parseVersion(newVersion);\n if (!v) {\n return null;\n }\n\n if (this.isVersion(currentValue)) {\n return newVersion;\n }\n\n const r = parseRange(currentValue);\n if (!r) {\n return null;\n }\n\n if (this.isLessThanRange(newVersion, currentValue)) {\n return currentValue;\n }\n\n if (r.type === 'nuget-exact-range') {\n return rangeToString({ type: 'nuget-exact-range', version: v });\n }\n\n if (r.type === 'nuget-floating-range') {\n const floating = r.floating;\n if (!floating) {\n return versionToString(v);\n }\n\n const res: NugetFloatingRange = { ...r };\n\n if (floating === 'major') {\n res.major = coerceFloatingComponent(v.major);\n return tryBump(res, v, currentValue);\n }\n res.major = v.major;\n\n if (floating === 'minor') {\n res.minor = coerceFloatingComponent(v.minor);\n return tryBump(res, v, currentValue);\n }\n res.minor = v.minor ?? 0;\n\n if (floating === 'patch') {\n res.patch = coerceFloatingComponent(v.patch);\n return tryBump(res, v, currentValue);\n }\n res.patch = v.patch ?? 0;\n\n res.revision = coerceFloatingComponent(v.revision);\n return tryBump(res, v, currentValue);\n }\n\n const res: NugetBracketRange = { ...r };\n\n if (!r.max) {\n res.min = v;\n res.minInclusive = true;\n return rangeToString(res);\n }\n\n if (matches(v, r)) {\n return currentValue;\n }\n\n if (!r.min) {\n res.max = v;\n res.maxInclusive = true;\n return rangeToString(res);\n }\n\n res.max = v;\n res.maxInclusive = true;\n return rangeToString(res);\n }\n\n sortVersions(version: string, other: string): number {\n const x = parseVersion(version);\n const y = parseVersion(other);\n if (!x || !y) {\n return 0;\n }\n\n return compare(x, y);\n }\n\n matches(version: string, range: string): boolean {\n const v = parseVersion(version);\n if (!v) {\n return false;\n }\n\n const u = parseVersion(range);\n if (u) {\n return compare(v, u) >= 0;\n }\n\n const r = parseRange(range);\n if (!r) {\n return false;\n }\n\n return matches(v, r);\n }\n}\n\nexport const api: VersioningApi = new NugetVersioningApi();\n\nexport default api;\n"],"mappings":";;;;AAgBA,MAAa,KAAK;AASlB,IAAM,qBAAN,MAAkD;CAChD,aAAa,SAAiB,UAA4B;EACxD,OAAO,KAAK,QAAQ,OAAO;CAC7B;CAEA,gBAAgB,SAA0B;EACxC,MAAM,IAAI,WAAW,OAAO;EAC5B,IAAI,CAAC,GACH,OAAO;EAGT,OAAO,EAAE,SAAS;CACpB;CAEA,SAAS,SAA0B;EACjC,MAAM,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names":[],"sources":["../../../../lib/modules/versioning/nuget/index.ts"],"sourcesContent":["import type { NewValueConfig, VersioningApi } from '../types.ts';\nimport { parseRange, parseVersion } from './parser.ts';\nimport {\n coerceFloatingComponent,\n getFloatingRangeLowerBound,\n matches,\n rangeToString,\n tryBump,\n} from './range.ts';\nimport type {\n NugetBracketRange,\n NugetFloatingRange,\n NugetVersion,\n} from './types.ts';\nimport { compare, versionToString } from './version.ts';\n\nexport const id = 'nuget';\nexport const displayName = 'NuGet';\nexport const urls = [\n '[NuGet package versioning](https://learn.microsoft.com/nuget/concepts/package-versioning)',\n '[NuGet version range tool](https://nugettools.azurewebsites.net/)',\n];\nexport const supportsRanges = true;\nexport const supportedRangeStrategies = ['bump'];\n\nclass NugetVersioningApi implements VersioningApi {\n isCompatible(version: string, _current?: string): boolean {\n return this.isValid(version);\n }\n\n isSingleVersion(version: string): boolean {\n const r = parseRange(version);\n if (!r) {\n return false;\n }\n\n return r.type === 'nuget-exact-range';\n }\n\n isStable(version: string): boolean {\n const v = parseVersion(version);\n if (v) {\n return !v.prerelease;\n }\n\n const r = parseRange(version);\n if (r?.type !== 'nuget-exact-range') {\n return false;\n }\n\n return !r.version.prerelease;\n }\n\n isValid(input: string): boolean {\n const v = parseVersion(input);\n if (v) {\n return true;\n }\n\n const r = parseRange(input);\n if (r) {\n return true;\n }\n\n return false;\n }\n\n isVersion(input: string | undefined | null): boolean {\n if (!input) {\n return false;\n }\n\n const v = parseVersion(input);\n if (!v) {\n return false;\n }\n\n return true;\n }\n\n getMajor(version: string): number | null {\n const v = parseVersion(version);\n if (!v) {\n return null;\n }\n\n return v.major;\n }\n\n getMinor(version: string): number | null {\n const v = parseVersion(version);\n if (!v) {\n return null;\n }\n\n return v.minor ?? null;\n }\n\n getPatch(version: string): number | null {\n const v = parseVersion(version);\n if (!v) {\n return null;\n }\n\n return v.patch ?? null;\n }\n\n equals(version: string, other: string): boolean {\n const x = parseVersion(version);\n const y = parseVersion(other);\n if (!x || !y) {\n return false;\n }\n\n return compare(x, y) === 0;\n }\n\n isGreaterThan(version: string, other: string): boolean {\n const x = parseVersion(version);\n const y = parseVersion(other);\n if (!x || !y) {\n return false;\n }\n\n return compare(x, y) > 0;\n }\n\n isLessThanRange(version: string, range: string): boolean {\n const v = parseVersion(version);\n if (!v) {\n return false;\n }\n\n const u = parseVersion(range);\n if (u) {\n return compare(v, u) < 0;\n }\n\n const r = parseRange(range);\n if (!r) {\n return false;\n }\n\n if (r.type === 'nuget-exact-range') {\n return compare(v, r.version) < 0;\n }\n\n if (r.type === 'nuget-bracket-range') {\n if (!r.min) {\n return false;\n }\n\n const minBound =\n r.min.type === 'nuget-version'\n ? r.min\n : getFloatingRangeLowerBound(r.min);\n const cmp = compare(v, minBound);\n return r.minInclusive ? cmp < 0 : cmp <= 0;\n }\n\n const minBound = getFloatingRangeLowerBound(r);\n return compare(v, minBound) < 0;\n }\n\n getSatisfyingVersion(versions: string[], range: string): string | null {\n const r = parseRange(range);\n if (r) {\n let result: string | null = null;\n let vMax: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n if (!matches(v, r)) {\n continue;\n }\n\n if (!vMax || compare(v, vMax) > 0) {\n vMax = v;\n result = version;\n }\n }\n\n return result;\n }\n\n const u = parseVersion(range);\n if (u) {\n let result: string | null = null;\n let vMax: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n // A bare version acts as a min-version range, but it should\n // still respect stability: a stable pin must not match a\n // pre-release version.\n if (v.prerelease && !u.prerelease) {\n continue;\n }\n\n if (compare(v, u) < 0) {\n continue;\n }\n\n if (!vMax || compare(v, vMax) > 0) {\n vMax = v;\n result = version;\n }\n }\n\n return result;\n }\n\n return null;\n }\n\n minSatisfyingVersion(versions: string[], range: string): string | null {\n const r = parseRange(range);\n if (r) {\n let result: string | null = null;\n let vMin: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n if (!matches(v, r)) {\n continue;\n }\n\n if (!vMin || compare(v, vMin) < 0) {\n result = version;\n vMin = v;\n }\n }\n\n return result;\n }\n\n const u = parseVersion(range);\n if (u) {\n let result: string | null = null;\n let vMin: NugetVersion | undefined;\n for (const version of versions) {\n const v = parseVersion(version);\n if (!v) {\n continue;\n }\n\n if (compare(v, u) < 0) {\n continue;\n }\n\n if (!vMin || compare(v, vMin) < 0) {\n result = version;\n vMin = v;\n }\n }\n\n return result;\n }\n\n return null;\n }\n\n getPinnedValue(newVersion: string): string {\n const v = parseVersion(newVersion);\n if (!v) {\n return '';\n }\n return rangeToString({ type: 'nuget-exact-range', version: v });\n }\n\n getNewValue({ currentValue, newVersion }: NewValueConfig): string | null {\n const v = parseVersion(newVersion);\n if (!v) {\n return null;\n }\n\n if (this.isVersion(currentValue)) {\n return newVersion;\n }\n\n const r = parseRange(currentValue);\n if (!r) {\n return null;\n }\n\n if (this.isLessThanRange(newVersion, currentValue)) {\n return currentValue;\n }\n\n if (r.type === 'nuget-exact-range') {\n return rangeToString({ type: 'nuget-exact-range', version: v });\n }\n\n if (r.type === 'nuget-floating-range') {\n const floating = r.floating;\n if (!floating) {\n return versionToString(v);\n }\n\n const res: NugetFloatingRange = { ...r };\n\n if (floating === 'major') {\n res.major = coerceFloatingComponent(v.major);\n return tryBump(res, v, currentValue);\n }\n res.major = v.major;\n\n if (floating === 'minor') {\n res.minor = coerceFloatingComponent(v.minor);\n return tryBump(res, v, currentValue);\n }\n res.minor = v.minor ?? 0;\n\n if (floating === 'patch') {\n res.patch = coerceFloatingComponent(v.patch);\n return tryBump(res, v, currentValue);\n }\n res.patch = v.patch ?? 0;\n\n res.revision = coerceFloatingComponent(v.revision);\n return tryBump(res, v, currentValue);\n }\n\n const res: NugetBracketRange = { ...r };\n\n if (!r.max) {\n res.min = v;\n res.minInclusive = true;\n return rangeToString(res);\n }\n\n if (matches(v, r)) {\n return currentValue;\n }\n\n if (!r.min) {\n res.max = v;\n res.maxInclusive = true;\n return rangeToString(res);\n }\n\n res.max = v;\n res.maxInclusive = true;\n return rangeToString(res);\n }\n\n sortVersions(version: string, other: string): number {\n const x = parseVersion(version);\n const y = parseVersion(other);\n if (!x || !y) {\n return 0;\n }\n\n return compare(x, y);\n }\n\n matches(version: string, range: string): boolean {\n const v = parseVersion(version);\n if (!v) {\n return false;\n }\n\n const u = parseVersion(range);\n if (u) {\n // A bare version acts as a min-version range, but it should\n // still respect stability: a stable pin must not match a\n // pre-release version.\n if (v.prerelease && !u.prerelease) {\n return false;\n }\n return compare(v, u) >= 0;\n }\n\n const r = parseRange(range);\n if (!r) {\n return false;\n }\n\n return matches(v, r);\n }\n}\n\nexport const api: VersioningApi = new NugetVersioningApi();\n\nexport default api;\n"],"mappings":";;;;AAgBA,MAAa,KAAK;AASlB,IAAM,qBAAN,MAAkD;CAChD,aAAa,SAAiB,UAA4B;EACxD,OAAO,KAAK,QAAQ,OAAO;CAC7B;CAEA,gBAAgB,SAA0B;EACxC,MAAM,IAAI,WAAW,OAAO;EAC5B,IAAI,CAAC,GACH,OAAO;EAGT,OAAO,EAAE,SAAS;CACpB;CAEA,SAAS,SAA0B;EACjC,MAAM,IAAI,aAAa,OAAO;EAC9B,IAAI,GACF,OAAO,CAAC,EAAE;EAGZ,MAAM,IAAI,WAAW,OAAO;EAC5B,IAAI,GAAG,SAAS,qBACd,OAAO;EAGT,OAAO,CAAC,EAAE,QAAQ;CACpB;CAEA,QAAQ,OAAwB;EAE9B,IADU,aAAa,KACnB,GACF,OAAO;EAIT,IADU,WAAW,KACjB,GACF,OAAO;EAGT,OAAO;CACT;CAEA,UAAU,OAA2C;EACnD,IAAI,CAAC,OACH,OAAO;EAIT,IAAI,CADM,aAAa,KAClB,GACH,OAAO;EAGT,OAAO;CACT;CAEA,SAAS,SAAgC;EACvC,MAAM,IAAI,aAAa,OAAO;EAC9B,IAAI,CAAC,GACH,OAAO;EAGT,OAAO,EAAE;CACX;CAEA,SAAS,SAAgC;EACv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,EAAE,KAAK;GACV,IAAI,MAAM;GACV,IAAI,eAAe;GACnB,OAAO,cAAc,GAAG;EAC1B;EAEA,IAAI,QAAQ,GAAG,CAAC,GACd,OAAO;EAGT,IAAI,CAAC,EAAE,KAAK;GACV,IAAI,MAAM;GACV,IAAI,eAAe;GACnB,OAAO,cAAc,GAAG;EAC1B;EAEA,IAAI,MAAM;EACV,IAAI,eAAe;EACnB,OAAO,cAAc,GAAG;CAC1B;CAEA,aAAa,SAAiB,OAAuB;EACnD,MAAM,IAAI,aAAa,OAAO;EAC9B,MAAM,IAAI,aAAa,KAAK;EAC5B,IAAI,CAAC,KAAK,CAAC,GACT,OAAO;EAGT,OAAO,QAAQ,GAAG,CAAC;CACrB;CAEA,QAAQ,SAAiB,OAAwB;EAC/C,MAAM,IAAI,aAAa,OAAO;EAC9B,IAAI,CAAC,GACH,OAAO;EAGT,MAAM,IAAI,aAAa,KAAK;EAC5B,IAAI,GAAG;GAIL,IAAI,EAAE,cAAc,CAAC,EAAE,YACrB,OAAO;GAET,OAAO,QAAQ,GAAG,CAAC,KAAK;EAC1B;EAEA,MAAM,IAAI,WAAW,KAAK;EAC1B,IAAI,CAAC,GACH,OAAO;EAGT,OAAO,QAAQ,GAAG,CAAC;CACrB;AACF;AAEA,MAAa,MAAqB,IAAI,mBAAmB"}
@@ -1,6 +1,7 @@
1
1
  import { regEx } from "../../../../util/regex.js";
2
2
  import { coerceArray } from "../../../../util/array.js";
3
3
  import { matchRegexOrGlobList } from "../../../../util/string-match.js";
4
+ import { safeStringify } from "../../../../util/stringify.js";
4
5
  import { logger } from "../../../../logger/index.js";
5
6
  import { compile } from "../../../../util/template/index.js";
6
7
  import { readLocalFile } from "../../../../util/fs/index.js";
@@ -9,8 +10,8 @@ import { getFilteredFileList } from "../../extract/file-match.js";
9
10
  import { inc } from "semver";
10
11
  //#region lib/workers/repository/update/branch/bump-versions.ts
11
12
  async function bumpVersions(config) {
12
- const bumpVersions = config.bumpVersions;
13
- if (!bumpVersions?.length) return;
13
+ const bumpVersions = getBumpVersions(config);
14
+ if (!bumpVersions.length) return;
14
15
  if (!config.updatedPackageFiles?.length && !config.updatedArtifacts?.length) return;
15
16
  const allFiles = await scm.getFileList();
16
17
  const fileList = getFilteredFileList(config, allFiles);
@@ -20,6 +21,26 @@ async function bumpVersions(config) {
20
21
  config.updatedPackageFiles = Object.values(packageFileChanges).flat();
21
22
  config.updatedArtifacts = Object.values(artifactFileChanges).flat();
22
23
  }
24
+ /**
25
+ * `config.bumpVersions` is derived from `upgrades[0]` only (see `generateBranchConfig()`), so
26
+ * relying on it alone would silently drop `bumpVersions` config attached (e.g. via a `packageRule`)
27
+ * to any upgrade other than the first one in the branch. Collect `bumpVersions` from every
28
+ * upgrade instead, de-duplicating identical entries, and fall back to the top-level value for
29
+ * back-compat (e.g. when `config.upgrades` is empty).
30
+ */
31
+ function getBumpVersions(config) {
32
+ const seen = /* @__PURE__ */ new Set();
33
+ const bumpVersions = [];
34
+ for (const upgrade of coerceArray(config.upgrades)) for (const bumpVersionConfig of coerceArray(upgrade.bumpVersions)) {
35
+ const key = safeStringify(bumpVersionConfig);
36
+ if (!seen.has(key)) {
37
+ seen.add(key);
38
+ bumpVersions.push(bumpVersionConfig);
39
+ }
40
+ }
41
+ if (!bumpVersions.length) bumpVersions.push(...coerceArray(config.bumpVersions));
42
+ return bumpVersions;
43
+ }
23
44
  async function bumpVersion(config, branchConfig, fileList, packageFiles, artifactFiles) {
24
45
  const rawBumpType = config.bumpType ?? "patch";
25
46
  const bumpVersionsDescr = config.name ? `bumpVersions(${config.name})` : "bumpVersions";
@@ -1 +1 @@
1
- {"version":3,"file":"bump-versions.js","names":[],"sources":["../../../../../lib/workers/repository/update/branch/bump-versions.ts"],"sourcesContent":["import { type ReleaseType, inc } from 'semver';\nimport type { BumpVersionConfig } from '../../../../config/types.ts';\nimport { logger } from '../../../../logger/index.ts';\nimport { scm } from '../../../../modules/platform/scm.ts';\nimport { coerceArray } from '../../../../util/array.ts';\nimport { readLocalFile } from '../../../../util/fs/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport { regEx } from '../../../../util/regex.ts';\nimport { matchRegexOrGlobList } from '../../../../util/string-match.ts';\nimport { compile } from '../../../../util/template/index.ts';\nimport type { BranchConfig } from '../../../types.ts';\nimport { getFilteredFileList } from '../../extract/file-match.ts';\n\ntype ParseFileChangesResult =\n | { state: 'modified'; content: string | null }\n | { state: 'deleted' }\n | { state: 'unmodified' };\n\nexport async function bumpVersions(config: BranchConfig): Promise<void> {\n const bumpVersions = config.bumpVersions;\n if (!bumpVersions?.length) {\n return;\n }\n\n // skip if no packageFiles or artifacts have been updated\n if (!config.updatedPackageFiles?.length && !config.updatedArtifacts?.length) {\n return;\n }\n\n const allFiles = await scm.getFileList();\n const fileList = getFilteredFileList(config, allFiles);\n\n const packageFileChanges = fileChangeListToMap(config.updatedPackageFiles);\n const artifactFileChanges = fileChangeListToMap(config.updatedArtifacts);\n\n for (const bumpVersionConfig of bumpVersions) {\n await bumpVersion(\n bumpVersionConfig,\n config,\n fileList,\n packageFileChanges,\n artifactFileChanges,\n );\n }\n\n // update the config with the new files\n config.updatedPackageFiles = Object.values(packageFileChanges).flat();\n config.updatedArtifacts = Object.values(artifactFileChanges).flat();\n}\n\nasync function bumpVersion(\n config: BumpVersionConfig,\n branchConfig: BranchConfig,\n fileList: string[],\n packageFiles: Record<string, FileChange[]>,\n artifactFiles: Record<string, FileChange[]>,\n): Promise<void> {\n const rawBumpType = config.bumpType ?? 'patch';\n\n // all log messages should be prefixed with this string to facilitate easier logLevelRemapping\n const bumpVersionsDescr = config.name\n ? `bumpVersions(${config.name})`\n : 'bumpVersions';\n\n const files: string[] = [];\n try {\n files.push(\n ...getMatchedFiles(\n bumpVersionsDescr,\n config.filePatterns,\n branchConfig,\n fileList,\n ),\n );\n } catch (e) {\n addArtifactError(\n branchConfig,\n `Failed to calculate matched files for bumpVersions: ${e.message}`,\n );\n return;\n }\n\n if (!files.length) {\n logger.debug(`${bumpVersionsDescr}: filePatterns did not match any files`);\n return;\n }\n\n logger.trace(\n { files },\n `${bumpVersionsDescr}: Found ${files.length} files to bump versions`,\n );\n\n // keeping this only for logging purposes\n const matchStrings: string[] = [];\n\n // prepare the matchStrings\n const matchStringsRegexes: RegExp[] = [];\n for (const matchString of config.matchStrings) {\n try {\n const templated = compile(matchString, branchConfig);\n matchStrings.push(templated);\n matchStringsRegexes.push(regEx(templated));\n } catch (e) {\n addArtifactError(\n branchConfig,\n `Failed to compile matchString for ${bumpVersionsDescr}: ${e.message}`,\n matchString,\n );\n }\n }\n\n logger.trace({ matchStrings }, `${bumpVersionsDescr}: Compiled matchStrings`);\n\n for (const filePath of files) {\n let fileBumped = false;\n\n const fileContents = await getFileContent(\n bumpVersionsDescr,\n filePath,\n packageFiles,\n artifactFiles,\n );\n if (!fileContents) {\n continue;\n }\n\n for (const matchStringRegex of matchStringsRegexes) {\n // extracting the version from the file\n const regexResult = matchStringRegex.exec(fileContents);\n if (!regexResult) {\n continue;\n }\n const version = regexResult.groups?.version;\n if (!version) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No version found`,\n );\n continue;\n }\n\n // getting new version\n let newVersion: string | null = null;\n try {\n const bumpType = compile(rawBumpType, branchConfig);\n\n // Handle 'sync' type - use version from branch upgrades\n if (bumpType === 'sync') {\n if (branchConfig.upgrades?.length) {\n // Use the newVersion from the first upgrade\n newVersion = branchConfig.upgrades[0].newVersion ?? null;\n if (!newVersion) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No newVersion found in branch upgrades for sync type`,\n );\n continue;\n }\n } else {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No upgrades found in branch config for sync type`,\n );\n continue;\n }\n } else {\n // Existing logic for major/minor/patch\n const parts = regEx('^(?<major>\\\\d+)(?:\\\\.(?<minor>\\\\d+))?$').exec(\n version,\n );\n if (parts?.groups) {\n const { major, minor } = parts.groups;\n if (bumpType === 'major') {\n newVersion = `${parseInt(major, 10) + 1}${minor ? `.0` : ''}`;\n } else if (bumpType === 'minor') {\n newVersion = `${major}.${parseInt(minor, 10) + 1}`;\n } else {\n throw new Error(\n `Unsupported bump type for {major}.{minor} version: ${bumpType}`,\n );\n }\n } else {\n newVersion = inc(version, bumpType as ReleaseType);\n }\n }\n } catch (e) {\n addArtifactError(\n branchConfig,\n `Failed to calculate new version for ${bumpVersionsDescr}: ${e.message}`,\n filePath,\n );\n }\n if (!newVersion) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: Could not bump version`,\n );\n continue;\n }\n\n // replace the content of the `version` group with newVersion\n const newFileContents: string = fileContents\n .toString()\n .replace(matchStringRegex, (match, ...groups) => {\n const { version } = groups.pop();\n return match.replace(version, newVersion);\n });\n\n // update the file. Add it to the buckets if exists or create a new artifact update\n if (packageFiles[filePath]) {\n packageFiles[filePath].push({\n type: 'addition',\n path: filePath,\n contents: newFileContents,\n });\n } else {\n artifactFiles[filePath] ??= [];\n artifactFiles[filePath].push({\n type: 'addition',\n path: filePath,\n contents: newFileContents,\n });\n }\n\n fileBumped = true;\n }\n\n if (!fileBumped) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No match found for bumping version`,\n );\n }\n }\n}\n\n/**\n * Get files that match ANY of the fileMatches pattern. fileMatches are compiled with the branchConfig.\n * @param bumpVersionsDescr log description for the bump version config\n * @param filePatternTemplates list of regex patterns\n * @param branchConfig compile metadata\n * @param fileList list of files to match against\n */\nfunction getMatchedFiles(\n bumpVersionsDescr: string,\n filePatternTemplates: string[],\n branchConfig: BranchConfig,\n fileList: string[],\n): string[] {\n // prepare file regex\n const filePatterns: string[] = [];\n for (const filePatternTemplateElement of filePatternTemplates) {\n const filePattern = compile(filePatternTemplateElement, branchConfig);\n filePatterns.push(filePattern);\n }\n\n logger.trace({ filePatterns }, `${bumpVersionsDescr}: Compiled filePatterns`);\n\n // get files that match the fileMatch\n const files: string[] = [];\n for (const file of fileList) {\n if (matchRegexOrGlobList(file, filePatterns)) {\n files.push(file);\n }\n }\n return files;\n}\n\nfunction fileChangeListToMap(\n list: FileChange[] | undefined,\n): Record<string, FileChange[]> {\n const record: Record<string, FileChange[]> = {};\n for (const fileChange of coerceArray(list)) {\n record[fileChange.path] ??= [];\n record[fileChange.path].push(fileChange);\n }\n return record;\n}\n\nfunction addArtifactError(\n branchConfig: BranchConfig,\n message: string,\n fileName?: string,\n): void {\n branchConfig.artifactErrors ??= [];\n branchConfig.artifactErrors.push({\n stderr: message,\n fileName,\n });\n}\n\nasync function getFileContent(\n bumpVersionsDescr: string,\n filePath: string,\n packageFiles: Record<string, FileChange[]>,\n artifactFiles: Record<string, FileChange[]>,\n): Promise<string | null> {\n const packageFileChanges = parseFileChanges(filePath, packageFiles);\n const artifactFileChanges = parseFileChanges(filePath, artifactFiles);\n\n // skip if the file is deleted as it virtually doesn't exist\n if (\n packageFileChanges.state === 'deleted' ||\n artifactFileChanges.state === 'deleted'\n ) {\n return null;\n }\n\n if (packageFileChanges.state === 'modified') {\n const lastChange = packageFileChanges.content;\n if (lastChange) {\n return lastChange;\n }\n }\n if (artifactFileChanges.state === 'modified') {\n const lastChange = artifactFileChanges.content;\n if (lastChange) {\n return lastChange;\n }\n }\n\n try {\n return await readLocalFile(filePath, 'utf8');\n } catch (e) {\n logger.warn(\n { file: filePath, bumpVersionsDescr, err: e },\n 'bumpVersions: Could not read file',\n );\n return null;\n }\n}\n\nfunction parseFileChanges(\n filePath: string,\n changeRecord: Record<string, FileChange[]>,\n): ParseFileChangesResult {\n const changes = coerceArray(changeRecord[filePath]);\n\n // skip if we can fetch from record\n if (!changes.length) {\n return { state: 'unmodified' };\n }\n\n const lastChange = changes.at(-1)!;\n if (lastChange.type === 'deletion') {\n return { state: 'deleted' };\n }\n return {\n state: 'modified',\n content: lastChange.contents?.toString() ?? null,\n };\n}\n"],"mappings":";;;;;;;;;;AAkBA,eAAsB,aAAa,QAAqC;CACtE,MAAM,eAAe,OAAO;CAC5B,IAAI,CAAC,cA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sBAAsB,iBAAiB,UAAU,aAAa;CAGpE,IACE,mBAAmB,UAAU,aAC7B,oBAAoB,UAAU,WAE9B,OAAO;CAGT,IAAI,mBAAmB,UAAU,YAAY;EAC3C,MAAM,aAAa,mBAAmB;EACtC,IAAI,YACF,OAAO;CAEX;CACA,IAAI,oBAAoB,UAAU,YAAY;EAC5C,MAAM,aAAa,oBAAoB;EACvC,IAAI,YACF,OAAO;CAEX;CAEA,IAAI;EACF,OAAO,MAAM,cAAc,UAAU,MAAM;CAC7C,SAAS,GAAG;EACV,OAAO,KACL;GAAE,MAAM;GAAU;GAAmB,KAAK;EAAE,GAC5C,mCACF;EACA,OAAO;CACT;AACF;AAEA,SAAS,iBACP,UACA,cACwB;CACxB,MAAM,UAAU,YAAY,aAAa,SAAS;CAGlD,IAAI,CAAC,QAAQ,QACX,OAAO,EAAE,OAAO,aAAa;CAG/B,MAAM,aAAa,QAAQ,GAAG,EAAE;CAChC,IAAI,WAAW,SAAS,YACtB,OAAO,EAAE,OAAO,UAAU;CAE5B,OAAO;EACL,OAAO;EACP,SAAS,WAAW,UAAU,SAAS,KAAK;CAC9C;AACF"}
1
+ {"version":3,"file":"bump-versions.js","names":[],"sources":["../../../../../lib/workers/repository/update/branch/bump-versions.ts"],"sourcesContent":["import { type ReleaseType, inc } from 'semver';\nimport type { BumpVersionConfig } from '../../../../config/types.ts';\nimport { logger } from '../../../../logger/index.ts';\nimport { scm } from '../../../../modules/platform/scm.ts';\nimport { coerceArray } from '../../../../util/array.ts';\nimport { readLocalFile } from '../../../../util/fs/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport { regEx } from '../../../../util/regex.ts';\nimport { matchRegexOrGlobList } from '../../../../util/string-match.ts';\nimport { safeStringify } from '../../../../util/stringify.ts';\nimport { compile } from '../../../../util/template/index.ts';\nimport type { BranchConfig } from '../../../types.ts';\nimport { getFilteredFileList } from '../../extract/file-match.ts';\n\ntype ParseFileChangesResult =\n | { state: 'modified'; content: string | null }\n | { state: 'deleted' }\n | { state: 'unmodified' };\n\nexport async function bumpVersions(config: BranchConfig): Promise<void> {\n const bumpVersions = getBumpVersions(config);\n if (!bumpVersions.length) {\n return;\n }\n\n // skip if no packageFiles or artifacts have been updated\n if (!config.updatedPackageFiles?.length && !config.updatedArtifacts?.length) {\n return;\n }\n\n const allFiles = await scm.getFileList();\n const fileList = getFilteredFileList(config, allFiles);\n\n const packageFileChanges = fileChangeListToMap(config.updatedPackageFiles);\n const artifactFileChanges = fileChangeListToMap(config.updatedArtifacts);\n\n for (const bumpVersionConfig of bumpVersions) {\n await bumpVersion(\n bumpVersionConfig,\n config,\n fileList,\n packageFileChanges,\n artifactFileChanges,\n );\n }\n\n // update the config with the new files\n config.updatedPackageFiles = Object.values(packageFileChanges).flat();\n config.updatedArtifacts = Object.values(artifactFileChanges).flat();\n}\n\n/**\n * `config.bumpVersions` is derived from `upgrades[0]` only (see `generateBranchConfig()`), so\n * relying on it alone would silently drop `bumpVersions` config attached (e.g. via a `packageRule`)\n * to any upgrade other than the first one in the branch. Collect `bumpVersions` from every\n * upgrade instead, de-duplicating identical entries, and fall back to the top-level value for\n * back-compat (e.g. when `config.upgrades` is empty).\n */\nfunction getBumpVersions(config: BranchConfig): BumpVersionConfig[] {\n const seen = new Set<string>();\n const bumpVersions: BumpVersionConfig[] = [];\n for (const upgrade of coerceArray(config.upgrades)) {\n for (const bumpVersionConfig of coerceArray(upgrade.bumpVersions)) {\n const key = safeStringify(bumpVersionConfig);\n if (!seen.has(key)) {\n seen.add(key);\n bumpVersions.push(bumpVersionConfig);\n }\n }\n }\n\n if (!bumpVersions.length) {\n bumpVersions.push(...coerceArray(config.bumpVersions));\n }\n\n return bumpVersions;\n}\n\nasync function bumpVersion(\n config: BumpVersionConfig,\n branchConfig: BranchConfig,\n fileList: string[],\n packageFiles: Record<string, FileChange[]>,\n artifactFiles: Record<string, FileChange[]>,\n): Promise<void> {\n const rawBumpType = config.bumpType ?? 'patch';\n\n // all log messages should be prefixed with this string to facilitate easier logLevelRemapping\n const bumpVersionsDescr = config.name\n ? `bumpVersions(${config.name})`\n : 'bumpVersions';\n\n const files: string[] = [];\n try {\n files.push(\n ...getMatchedFiles(\n bumpVersionsDescr,\n config.filePatterns,\n branchConfig,\n fileList,\n ),\n );\n } catch (e) {\n addArtifactError(\n branchConfig,\n `Failed to calculate matched files for bumpVersions: ${e.message}`,\n );\n return;\n }\n\n if (!files.length) {\n logger.debug(`${bumpVersionsDescr}: filePatterns did not match any files`);\n return;\n }\n\n logger.trace(\n { files },\n `${bumpVersionsDescr}: Found ${files.length} files to bump versions`,\n );\n\n // keeping this only for logging purposes\n const matchStrings: string[] = [];\n\n // prepare the matchStrings\n const matchStringsRegexes: RegExp[] = [];\n for (const matchString of config.matchStrings) {\n try {\n const templated = compile(matchString, branchConfig);\n matchStrings.push(templated);\n matchStringsRegexes.push(regEx(templated));\n } catch (e) {\n addArtifactError(\n branchConfig,\n `Failed to compile matchString for ${bumpVersionsDescr}: ${e.message}`,\n matchString,\n );\n }\n }\n\n logger.trace({ matchStrings }, `${bumpVersionsDescr}: Compiled matchStrings`);\n\n for (const filePath of files) {\n let fileBumped = false;\n\n const fileContents = await getFileContent(\n bumpVersionsDescr,\n filePath,\n packageFiles,\n artifactFiles,\n );\n if (!fileContents) {\n continue;\n }\n\n for (const matchStringRegex of matchStringsRegexes) {\n // extracting the version from the file\n const regexResult = matchStringRegex.exec(fileContents);\n if (!regexResult) {\n continue;\n }\n const version = regexResult.groups?.version;\n if (!version) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No version found`,\n );\n continue;\n }\n\n // getting new version\n let newVersion: string | null = null;\n try {\n const bumpType = compile(rawBumpType, branchConfig);\n\n // Handle 'sync' type - use version from branch upgrades\n if (bumpType === 'sync') {\n if (branchConfig.upgrades?.length) {\n // Use the newVersion from the first upgrade\n newVersion = branchConfig.upgrades[0].newVersion ?? null;\n if (!newVersion) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No newVersion found in branch upgrades for sync type`,\n );\n continue;\n }\n } else {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No upgrades found in branch config for sync type`,\n );\n continue;\n }\n } else {\n // Existing logic for major/minor/patch\n const parts = regEx('^(?<major>\\\\d+)(?:\\\\.(?<minor>\\\\d+))?$').exec(\n version,\n );\n if (parts?.groups) {\n const { major, minor } = parts.groups;\n if (bumpType === 'major') {\n newVersion = `${parseInt(major, 10) + 1}${minor ? `.0` : ''}`;\n } else if (bumpType === 'minor') {\n newVersion = `${major}.${parseInt(minor, 10) + 1}`;\n } else {\n throw new Error(\n `Unsupported bump type for {major}.{minor} version: ${bumpType}`,\n );\n }\n } else {\n newVersion = inc(version, bumpType as ReleaseType);\n }\n }\n } catch (e) {\n addArtifactError(\n branchConfig,\n `Failed to calculate new version for ${bumpVersionsDescr}: ${e.message}`,\n filePath,\n );\n }\n if (!newVersion) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: Could not bump version`,\n );\n continue;\n }\n\n // replace the content of the `version` group with newVersion\n const newFileContents: string = fileContents\n .toString()\n .replace(matchStringRegex, (match, ...groups) => {\n const { version } = groups.pop();\n return match.replace(version, newVersion);\n });\n\n // update the file. Add it to the buckets if exists or create a new artifact update\n if (packageFiles[filePath]) {\n packageFiles[filePath].push({\n type: 'addition',\n path: filePath,\n contents: newFileContents,\n });\n } else {\n artifactFiles[filePath] ??= [];\n artifactFiles[filePath].push({\n type: 'addition',\n path: filePath,\n contents: newFileContents,\n });\n }\n\n fileBumped = true;\n }\n\n if (!fileBumped) {\n logger.debug(\n { file: filePath },\n `${bumpVersionsDescr}: No match found for bumping version`,\n );\n }\n }\n}\n\n/**\n * Get files that match ANY of the fileMatches pattern. fileMatches are compiled with the branchConfig.\n * @param bumpVersionsDescr log description for the bump version config\n * @param filePatternTemplates list of regex patterns\n * @param branchConfig compile metadata\n * @param fileList list of files to match against\n */\nfunction getMatchedFiles(\n bumpVersionsDescr: string,\n filePatternTemplates: string[],\n branchConfig: BranchConfig,\n fileList: string[],\n): string[] {\n // prepare file regex\n const filePatterns: string[] = [];\n for (const filePatternTemplateElement of filePatternTemplates) {\n const filePattern = compile(filePatternTemplateElement, branchConfig);\n filePatterns.push(filePattern);\n }\n\n logger.trace({ filePatterns }, `${bumpVersionsDescr}: Compiled filePatterns`);\n\n // get files that match the fileMatch\n const files: string[] = [];\n for (const file of fileList) {\n if (matchRegexOrGlobList(file, filePatterns)) {\n files.push(file);\n }\n }\n return files;\n}\n\nfunction fileChangeListToMap(\n list: FileChange[] | undefined,\n): Record<string, FileChange[]> {\n const record: Record<string, FileChange[]> = {};\n for (const fileChange of coerceArray(list)) {\n record[fileChange.path] ??= [];\n record[fileChange.path].push(fileChange);\n }\n return record;\n}\n\nfunction addArtifactError(\n branchConfig: BranchConfig,\n message: string,\n fileName?: string,\n): void {\n branchConfig.artifactErrors ??= [];\n branchConfig.artifactErrors.push({\n stderr: message,\n fileName,\n });\n}\n\nasync function getFileContent(\n bumpVersionsDescr: string,\n filePath: string,\n packageFiles: Record<string, FileChange[]>,\n artifactFiles: Record<string, FileChange[]>,\n): Promise<string | null> {\n const packageFileChanges = parseFileChanges(filePath, packageFiles);\n const artifactFileChanges = parseFileChanges(filePath, artifactFiles);\n\n // skip if the file is deleted as it virtually doesn't exist\n if (\n packageFileChanges.state === 'deleted' ||\n artifactFileChanges.state === 'deleted'\n ) {\n return null;\n }\n\n if (packageFileChanges.state === 'modified') {\n const lastChange = packageFileChanges.content;\n if (lastChange) {\n return lastChange;\n }\n }\n if (artifactFileChanges.state === 'modified') {\n const lastChange = artifactFileChanges.content;\n if (lastChange) {\n return lastChange;\n }\n }\n\n try {\n return await readLocalFile(filePath, 'utf8');\n } catch (e) {\n logger.warn(\n { file: filePath, bumpVersionsDescr, err: e },\n 'bumpVersions: Could not read file',\n );\n return null;\n }\n}\n\nfunction parseFileChanges(\n filePath: string,\n changeRecord: Record<string, FileChange[]>,\n): ParseFileChangesResult {\n const changes = coerceArray(changeRecord[filePath]);\n\n // skip if we can fetch from record\n if (!changes.length) {\n return { state: 'unmodified' };\n }\n\n const lastChange = changes.at(-1)!;\n if (lastChange.type === 'deletion') {\n return { state: 'deleted' };\n }\n return {\n state: 'modified',\n content: lastChange.contents?.toString() ?? null,\n };\n}\n"],"mappings":";;;;;;;;;;;AAmBA,eAAsB,aAAa,QAAqC;CACtE,MAAM,eAAe,gBAAgB,MAAM;CAC3C,IAAI,CAAC,aAAa,QAChB;CAIF,IAAI,CAAC,OAAO,qBAAqB,UAAU,CAAC,OAAO,kBAAkB,QACnE;CAGF,MAAM,WAAW,MAAM,IAAI,YAAY;CACvC,MAAM,WAAW,oBAAoB,QAAQ,QAAQ;CAErD,MAAM,qBAAqB,oBAAoB,OAAO,mBAAmB;CACzE,MAAM,sBAAsB,oBAAoB,OAAO,gBAAgB;CAEvE,KAAK,MAAM,qBAAqB,cAC9B,MAAM,YACJ,mBACA,QACA,UACA,oBACA,mBACF;CAIF,OAAO,sBAAsB,OAAO,OAAO,kBAAkB,CAAC,CAAC,KAAK;CACpE,OAAO,mBAAmB,OAAO,OAAO,mBAAmB,CAAC,CAAC,KAAK;AACpE;;;;;;;;AASA,SAAS,gBAAgB,QAA2C;CAClE,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,eAAoC,CAAC;CAC3C,KAAK,MAAM,WAAW,YAAY,OAAO,QAAQ,GAC/C,KAAK,MAAM,qBAAqB,YAAY,QAAQ,YAAY,GAAG;EACjE,MAAM,MAAM,cAAc,iBAAiB;EAC3C,IAAI,CAAC,KAAK,IAAI,GAAG,GAAG;GAClB,KAAK,IAAI,GAAG;GACZ,aAAa,KAAK,iBAAiB;EACrC;CACF;CAGF,IAAI,CAAC,aAAa,QAChB,aAAa,KAAK,GAAG,YAAY,OAAO,YAAY,CAAC;CAGvD,OAAO;AACT;AAEA,eAAe,YACb,QACA,cACA,UACA,cACA,eACe;CACf,MAAM,cAAc,OAAO,YAAY;CAGvC,MAAM,oBAAoB,OAA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O,aAAa;CAG/B,MAAM,aAAa,QAAQ,GAAG,EAAE;CAChC,IAAI,WAAW,SAAS,YACtB,OAAO,EAAE,OAAO,UAAU;CAE5B,OAAO;EACL,OAAO;EACP,SAAS,WAAW,UAAU,SAAS,KAAK;CAC9C;AACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "renovate",
3
3
  "description": "Automated dependency updates. Flexible so you don't need to be.",
4
- "version": "44.62.0",
4
+ "version": "44.62.2",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$id": "https://docs.renovatebot.com/renovate-schema.json",
3
- "title": "JSON schema for Renovate 44.62.0 config files (https://renovatebot.com/)",
3
+ "title": "JSON schema for Renovate 44.62.2 config files (https://renovatebot.com/)",
4
4
  "$schema": "http://json-schema.org/draft-07/schema#",
5
- "x-renovate-version": "44.62.0",
5
+ "x-renovate-version": "44.62.2",
6
6
  "allowComments": true,
7
7
  "type": "object",
8
8
  "definitions": {