renovate 44.127.1 → 44.128.0

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.
Files changed (31) hide show
  1. package/dist/modules/datasource/go/index.js +1 -1
  2. package/dist/modules/datasource/go/index.js.map +1 -1
  3. package/dist/modules/datasource/go/releases-goproxy.js +25 -19
  4. package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
  5. package/dist/modules/manager/bun/index.js +1 -1
  6. package/dist/modules/manager/fingerprint.generated.js +3 -3
  7. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  8. package/dist/modules/manager/npm/artifacts.js +37 -23
  9. package/dist/modules/manager/npm/artifacts.js.map +1 -1
  10. package/dist/modules/manager/npm/dep-types.js +10 -0
  11. package/dist/modules/manager/npm/dep-types.js.map +1 -1
  12. package/dist/modules/manager/npm/extract/common/dependency.js +5 -2
  13. package/dist/modules/manager/npm/extract/common/dependency.js.map +1 -1
  14. package/dist/modules/manager/npm/extract/common/package-file.js +30 -3
  15. package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
  16. package/dist/modules/manager/npm/extract/index.js +4 -4
  17. package/dist/modules/manager/npm/extract/index.js.map +1 -1
  18. package/dist/modules/manager/npm/extract/pnpm.js +1 -1
  19. package/dist/modules/manager/npm/extract/post/locked-versions.js +3 -3
  20. package/dist/modules/manager/npm/extract/post/locked-versions.js.map +1 -1
  21. package/dist/modules/manager/npm/index.js +2 -2
  22. package/dist/modules/manager/npm/post-update/utils.js +5 -5
  23. package/dist/modules/manager/npm/post-update/utils.js.map +1 -1
  24. package/dist/modules/manager/npm/post-update/yarn.js +1 -1
  25. package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
  26. package/dist/modules/manager/npm/update/dependency/index.js +73 -0
  27. package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
  28. package/dist/modules/manager/npm/update/dependency/pnpm.js +1 -1
  29. package/dist/modules/manager/npm/update/dependency/yarn.js +1 -1
  30. package/package.json +1 -1
  31. package/renovate-schema.json +2 -2
@@ -30,7 +30,7 @@ var GoDatasource = class GoDatasource extends Datasource {
30
30
  return false;
31
31
  }
32
32
  releaseTimestampSupport = true;
33
- releaseTimestampNote = "If the release timestamp is not returned from the respective datasoure used to fetch the releases, then Renovate uses the `Time` field in the results instead. For modules hosted on GitHub, a later GitHub Release publication time takes precedence over both.";
33
+ releaseTimestampNote = "If the release timestamp is not returned from the respective datasoure used to fetch the releases, then Renovate uses the `Time` field in the results instead. For modules hosted on GitHub, a later GitHub Release publication time or git tag creation time takes precedence over both.";
34
34
  sourceUrlSupport = "package";
35
35
  sourceUrlNote = "The source URL is determined from the `packageName` and `registryUrl`.";
36
36
  goproxy = new GoProxyDatasource();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["semverId"],"sources":["../../../../lib/modules/datasource/go/index.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { addSecretForSanitizing } from '../../../util/sanitize.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport { id as semverId } from '../../versioning/semver/index.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GitTagsDatasource } from '../git-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport type {\n DigestConfig,\n GetReleasesConfig,\n ReleaseResult,\n} from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { isPublicGoPackage } from './common.ts';\nimport { parseGoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { GoProxyDatasource } from './releases-goproxy.ts';\n\nexport class GoDatasource extends Datasource {\n static readonly id = 'go';\n\n override readonly defaultVersioning = semverId;\n\n constructor() {\n super(GoDatasource.id);\n }\n\n override readonly defaultConfig = {\n commitMessageTopic: 'module {{depName}}',\n };\n\n override supportsCustomRegistry(_packageName: string): boolean {\n return false;\n }\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'If the release timestamp is not returned from the respective datasoure used to fetch the releases, then Renovate uses the `Time` field in the results instead. For modules hosted on GitHub, a later GitHub Release publication time takes precedence over both.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `packageName` and `registryUrl`.';\n\n readonly goproxy = new GoProxyDatasource();\n readonly direct = new GoDirectDatasource();\n\n // Pseudo versions https://go.dev/ref/mod#pseudo-versions\n static readonly pversionRegexp = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?\\d{14}-(?<digest>[a-f0-9]{12})/,\n );\n\n private _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n return this.goproxy.getReleases(config);\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n const constraintsFilteringKey =\n config.constraintsFiltering && config.constraintsFiltering !== 'none'\n ? `@@${config.constraintsFiltering}`\n : '';\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n // TODO: types (#22198)\n key: `getReleases:${config.packageName}@@${constraintsFilteringKey}`,\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * go.getDigest\n *\n * This datasource resolves a go module URL into its source repository\n * and then fetches the digest if it is on GitHub.\n *\n * This function will:\n * - Determine the source URL for the module\n * - Call the respective getDigest in github to retrieve the commit hash\n */\n private async _getDigest(\n { packageName }: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n if (parseGoproxy().some(({ url }) => url === 'off')) {\n logger.debug(\n `Skip digest fetch for ${packageName} with GOPROXY containing \"off\"`,\n );\n return null;\n }\n\n const source = await BaseGoDatasource.getDatasource(packageName);\n if (!source) {\n return null;\n }\n\n // ignore vX.Y.Z-(0.)? pseudo versions that are used Go Modules - look up default branch instead\n // ignore v0.0.0 versions to fetch the digest of default branch, not the commit of non-existing tag `v0.0.0`\n const tag =\n newValue &&\n !GoDatasource.pversionRegexp.test(newValue) &&\n newValue !== 'v0.0.0'\n ? newValue\n : undefined;\n\n switch (source.datasource) {\n case ForgejoTagsDatasource.id: {\n return this.direct.forgejo.getDigest(source, tag);\n }\n case GitTagsDatasource.id: {\n return this.direct.git.getDigest(source, tag);\n }\n case GiteaTagsDatasource.id: {\n return this.direct.gitea.getDigest(source, tag);\n }\n case GithubTagsDatasource.id: {\n return this.direct.github.getDigest(source, tag);\n }\n case BitbucketTagsDatasource.id: {\n return this.direct.bitbucket.getDigest(source, tag);\n }\n case GitlabTagsDatasource.id: {\n return this.direct.gitlab.getDigest(source, tag);\n }\n /* v8 ignore next: can never happen, makes lint happy */\n default: {\n return null;\n }\n }\n }\n\n override getDigest(\n config: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n key: `getDigest:${config.packageName}:${newValue}`,\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getDigest(config, newValue),\n );\n }\n}\n\nconst env = getEnv();\n/* v8 ignore if -- hard to test */\nif (isString(env.GOPROXY)) {\n const uri = parseUrl(env.GOPROXY);\n if (uri?.password) {\n addSecretForSanitizing(uri.password, 'global');\n } else if (uri?.username) {\n addSecretForSanitizing(uri.username, 'global');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,eAAb,MAAa,qBAAqB,WAAW;CAC3C,OAAgB,KAAK;CAErB,oBAAsCA;CAEtC,cAAc;EACZ,MAAM,aAAa,EAAE;CACvB;CAEA,gBAAkC,EAChC,oBAAoB,qBACtB;CAEA,uBAAgC,cAA+B;EAC7D,OAAO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QAAQ,GAAG;;GAGjD,SACE,OAAO;EAEX;CACF;CAEA,UACE,QACA,UACwB;EACxB,OAAO,UACL;GACE,WAAW,cAAc,aAAa;GACtC,KAAK,aAAa,OAAO,YAAY,GAAG;GACxC,WAAW,kBAAkB,OAAO,WAAW;GAC/C,UAAU;EACZ,SACM,KAAK,WAAW,QAAQ,QAAQ,CACxC;CACF;AACF;AAEA,MAAM,MAAM,OAAO;;AAEnB,IAAI,SAAS,IAAI,OAAO,GAAG;CACzB,MAAM,MAAM,SAAS,IAAI,OAAO;CAChC,IAAI,KAAK,UACP,uBAAuB,IAAI,UAAU,QAAQ;MACxC,IAAI,KAAK,UACd,uBAAuB,IAAI,UAAU,QAAQ;AAEjD"}
1
+ {"version":3,"file":"index.js","names":["semverId"],"sources":["../../../../lib/modules/datasource/go/index.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { addSecretForSanitizing } from '../../../util/sanitize.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport { id as semverId } from '../../versioning/semver/index.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GitTagsDatasource } from '../git-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport type {\n DigestConfig,\n GetReleasesConfig,\n ReleaseResult,\n} from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { isPublicGoPackage } from './common.ts';\nimport { parseGoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { GoProxyDatasource } from './releases-goproxy.ts';\n\nexport class GoDatasource extends Datasource {\n static readonly id = 'go';\n\n override readonly defaultVersioning = semverId;\n\n constructor() {\n super(GoDatasource.id);\n }\n\n override readonly defaultConfig = {\n commitMessageTopic: 'module {{depName}}',\n };\n\n override supportsCustomRegistry(_packageName: string): boolean {\n return false;\n }\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'If the release timestamp is not returned from the respective datasoure used to fetch the releases, then Renovate uses the `Time` field in the results instead. For modules hosted on GitHub, a later GitHub Release publication time or git tag creation time takes precedence over both.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `packageName` and `registryUrl`.';\n\n readonly goproxy = new GoProxyDatasource();\n readonly direct = new GoDirectDatasource();\n\n // Pseudo versions https://go.dev/ref/mod#pseudo-versions\n static readonly pversionRegexp = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?\\d{14}-(?<digest>[a-f0-9]{12})/,\n );\n\n private _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n return this.goproxy.getReleases(config);\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n const constraintsFilteringKey =\n config.constraintsFiltering && config.constraintsFiltering !== 'none'\n ? `@@${config.constraintsFiltering}`\n : '';\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n // TODO: types (#22198)\n key: `getReleases:${config.packageName}@@${constraintsFilteringKey}`,\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * go.getDigest\n *\n * This datasource resolves a go module URL into its source repository\n * and then fetches the digest if it is on GitHub.\n *\n * This function will:\n * - Determine the source URL for the module\n * - Call the respective getDigest in github to retrieve the commit hash\n */\n private async _getDigest(\n { packageName }: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n if (parseGoproxy().some(({ url }) => url === 'off')) {\n logger.debug(\n `Skip digest fetch for ${packageName} with GOPROXY containing \"off\"`,\n );\n return null;\n }\n\n const source = await BaseGoDatasource.getDatasource(packageName);\n if (!source) {\n return null;\n }\n\n // ignore vX.Y.Z-(0.)? pseudo versions that are used Go Modules - look up default branch instead\n // ignore v0.0.0 versions to fetch the digest of default branch, not the commit of non-existing tag `v0.0.0`\n const tag =\n newValue &&\n !GoDatasource.pversionRegexp.test(newValue) &&\n newValue !== 'v0.0.0'\n ? newValue\n : undefined;\n\n switch (source.datasource) {\n case ForgejoTagsDatasource.id: {\n return this.direct.forgejo.getDigest(source, tag);\n }\n case GitTagsDatasource.id: {\n return this.direct.git.getDigest(source, tag);\n }\n case GiteaTagsDatasource.id: {\n return this.direct.gitea.getDigest(source, tag);\n }\n case GithubTagsDatasource.id: {\n return this.direct.github.getDigest(source, tag);\n }\n case BitbucketTagsDatasource.id: {\n return this.direct.bitbucket.getDigest(source, tag);\n }\n case GitlabTagsDatasource.id: {\n return this.direct.gitlab.getDigest(source, tag);\n }\n /* v8 ignore next: can never happen, makes lint happy */\n default: {\n return null;\n }\n }\n }\n\n override getDigest(\n config: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n key: `getDigest:${config.packageName}:${newValue}`,\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getDigest(config, newValue),\n );\n }\n}\n\nconst env = getEnv();\n/* v8 ignore if -- hard to test */\nif (isString(env.GOPROXY)) {\n const uri = parseUrl(env.GOPROXY);\n if (uri?.password) {\n addSecretForSanitizing(uri.password, 'global');\n } else if (uri?.username) {\n addSecretForSanitizing(uri.username, 'global');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,eAAb,MAAa,qBAAqB,WAAW;CAC3C,OAAgB,KAAK;CAErB,oBAAsCA;CAEtC,cAAc;EACZ,MAAM,aAAa,EAAE;CACvB;CAEA,gBAAkC,EAChC,oBAAoB,qBACtB;CAEA,uBAAgC,cAA+B;EAC7D,OAAO;CACT;CAE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AG;;GAGjD,SACE,OAAO;EAEX;CACF;CAEA,UACE,QACA,UACwB;EACxB,OAAO,UACL;GACE,WAAW,cAAc,aAAa;GACtC,KAAK,aAAa,OAAO,YAAY,GAAG;GACxC,WAAW,kBAAkB,OAAO,WAAW;GAC/C,UAAU;EACZ,SACM,KAAK,WAAW,QAAQ,QAAQ,CACxC;CACF;AACF;AAEA,MAAM,MAAM,OAAO;;AAEnB,IAAI,SAAS,IAAI,OAAO,GAAG;CACzB,MAAM,MAAM,SAAS,IAAI,OAAO;CAChC,IAAI,KAAK,UACP,uBAAuB,IAAI,UAAU,QAAQ;MACxC,IAAI,KAAK,UACd,uBAAuB,IAAI,UAAU,QAAQ;AAEjD"}
@@ -13,7 +13,7 @@ import { asTimestamp } from "../../../util/timestamp.js";
13
13
  import { Datasource } from "../datasource.js";
14
14
  import { map } from "../../../util/promises.js";
15
15
  import { GithubHttp } from "../../../util/http/github.js";
16
- import { queryReleases } from "../../../util/github/graphql/index.js";
16
+ import { queryReleases, queryTags } from "../../../util/github/graphql/index.js";
17
17
  import { GithubReleasesDatasource } from "../github-releases/index.js";
18
18
  import { BaseGoDatasource } from "./base.js";
19
19
  import { parseGoproxy, parseNoproxy } from "./goproxy-parser.js";
@@ -112,38 +112,44 @@ var GoProxyDatasource = class GoProxyDatasource extends Datasource {
112
112
  } catch (err) {
113
113
  logger.trace({ err }, `Can't get datasource for ${packageName}`);
114
114
  }
115
- if (result?.sourceUrl && servedByProxy) await this.addGithubReleaseTimestamps(packageName, result.sourceUrl, result.releases);
115
+ if (result?.sourceUrl && servedByProxy) await this.addGithubTimestamps(packageName, result.sourceUrl, result.releases);
116
116
  return result;
117
117
  }
118
118
  /**
119
119
  * A Go proxy reports the commit time of the tagged commit as a version's `Time`, which can be much earlier than the point at which that version was released.
120
120
  *
121
- * When the module is hosted on GitHub and the version has a GitHub Release, the Release's publication time is a better indicator of when the version became available.
121
+ * When the module is hosted on GitHub, a GitHub Release's publication time, or - if there's no Release - the git tag's own creation time (distinct from the commit time for an annotated tag), is a better indicator of when the version became available. A Release is preferred over a tag when both exist for the same version.
122
122
  */
123
- async addGithubReleaseTimestamps(packageName, sourceUrl, releases) {
123
+ async addGithubTimestamps(packageName, sourceUrl, releases) {
124
124
  if (detectPlatform(sourceUrl) !== "github") return;
125
125
  const parsedUrl = parseUrl(sourceUrl);
126
126
  /* v8 ignore next -- detectPlatform only returns a platform for parseable URLs */
127
127
  if (!parsedUrl) return;
128
- const repository = trimTrailingSlash(trimLeadingSlash(parsedUrl.pathname)).replace(regEx(/\.git$/), "");
129
- try {
130
- const githubReleases = await queryReleases({
131
- packageName: repository,
132
- registryUrl: parsedUrl.origin
133
- }, this.githubHttp);
134
- const timestamps = /* @__PURE__ */ new Map();
135
- for (const { version, releaseTimestamp } of githubReleases) timestamps.set(version, releaseTimestamp);
136
- const tagPrefix = getTagPrefix(packageName, timestamps.keys());
137
- for (const release of releases) {
138
- const version = release.version.replace(incompatibleSuffixRegex, "");
139
- const releaseTimestamp = timestamps.get(`${tagPrefix}${version}`);
140
- if (releaseTimestamp && (!release.releaseTimestamp || releaseTimestamp > release.releaseTimestamp)) release.releaseTimestamp = releaseTimestamp;
141
- }
142
- } catch (err) {
128
+ const githubConfig = {
129
+ packageName: trimTrailingSlash(trimLeadingSlash(parsedUrl.pathname)).replace(regEx(/\.git$/), ""),
130
+ registryUrl: parsedUrl.origin
131
+ };
132
+ const [githubTags, githubReleases] = await Promise.all([queryTags(githubConfig, this.githubHttp).catch((err) => {
133
+ logger.debug({
134
+ err,
135
+ packageName
136
+ }, "Error fetching GitHub Tags for Go module");
137
+ return [];
138
+ }), queryReleases(githubConfig, this.githubHttp).catch((err) => {
143
139
  logger.debug({
144
140
  err,
145
141
  packageName
146
142
  }, "Error fetching GitHub Releases for Go module");
143
+ return [];
144
+ })]);
145
+ const timestamps = /* @__PURE__ */ new Map();
146
+ for (const { version, releaseTimestamp } of githubTags) timestamps.set(version, releaseTimestamp);
147
+ for (const { version, releaseTimestamp } of githubReleases) timestamps.set(version, releaseTimestamp);
148
+ const tagPrefix = getTagPrefix(packageName, timestamps.keys());
149
+ for (const release of releases) {
150
+ const version = release.version.replace(incompatibleSuffixRegex, "");
151
+ const releaseTimestamp = timestamps.get(`${tagPrefix}${version}`);
152
+ if (releaseTimestamp && (!release.releaseTimestamp || releaseTimestamp > release.releaseTimestamp)) release.releaseTimestamp = releaseTimestamp;
147
153
  }
148
154
  }
149
155
  getReleases(config) {
@@ -1 +1 @@
1
- {"version":3,"file":"releases-goproxy.js","names":["p.map","HttpError","goVersioning"],"sources":["../../../../lib/modules/datasource/go/releases-goproxy.ts"],"sourcesContent":["import {\n isNonEmptyString,\n isNonEmptyStringAndNotWhitespace,\n isTruthy,\n} from '@sindresorhus/is';\nimport type { ConstraintsFilter } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport { queryReleases } from '../../../util/github/graphql/index.ts';\nimport { GithubHttp } from '../../../util/http/github.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport type { Timestamp } from '../../../util/timestamp.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport {\n joinUrlParts,\n parseUrl,\n trimLeadingSlash,\n trimTrailingSlash,\n} from '../../../util/url.ts';\nimport goVersioning from '../../versioning/go-mod-directive/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { GithubReleasesDatasource } from '../github-releases/index.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl, isPublicGoPackage, publicGoproxyUrl } from './common.ts';\nimport { parseGoproxy, parseNoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { VersionInfo } from './schema.ts';\nimport { GoVersionTimestampCache } from './timestamp-cache.ts';\n\n/** TODO #42566 */\nconst goVersionRegex = regEx(/^\\s*go\\s+(?<version>[^\\s]+)\\s*$/);\n\nconst modRegex = regEx(/^(?<baseMod>.*?)(?:[./]v(?<majorVersion>\\d+))?$/);\n\nconst versionTagRegex = regEx(/^v\\d/);\n\n/**\n * Modules with a major version of v2 or above which have no `go.mod` are reported by a Go proxy with a `+incompatible` suffix, which is absent from the tag they were published as.\n *\n * @see https://go.dev/ref/mod#non-module-compat\n */\nconst incompatibleSuffixRegex = regEx(/\\+incompatible$/);\n\n/**\n * @see https://go.dev/ref/mod#pseudo-versions\n */\nconst pseudoVersionRegex = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?(?<timestamp>\\d{14})-(?<digest>[a-f0-9]{12})/i,\n);\n\nexport function pseudoVersionToRelease(pseudoVersion: string): Release | null {\n const match = pseudoVersion.match(pseudoVersionRegex)?.groups;\n if (!match) {\n return null;\n }\n\n const { digest: newDigest, timestamp } = match;\n const releaseTimestamp = asTimestamp(timestamp);\n\n return {\n version: pseudoVersion,\n newDigest,\n releaseTimestamp,\n };\n}\n\n/**\n * A Go module which lives in a subdirectory of its repository is tagged with that subdirectory as a prefix, so `github.com/aws/aws-sdk-go-v2/service/s3` publishes `v1.2.3` as the tag `service/s3/v1.2.3`.\n *\n * @see https://go.dev/ref/mod#vcs-version\n *\n * Because we can't tell from the module path alone where the repository ends and the subdirectory begins, we try each candidate prefix - longest first - against the tags we actually found, in the same way as `filterByPrefix` does for direct lookups.\n */\nexport function getTagPrefix(goModule: string, tags: Iterable<string>): string {\n const nameParts = goModule\n .replace(regEx(/\\/v\\d+$/), '')\n .split('/')\n .slice(1);\n const tagNames = [...tags];\n\n while (nameParts.length) {\n const prefix = `${nameParts.join('/')}/`;\n\n const isUsed = tagNames.some(\n (tag) =>\n tag.startsWith(prefix) &&\n versionTagRegex.test(tag.slice(prefix.length)),\n );\n if (isUsed) {\n return prefix;\n }\n\n nameParts.shift();\n }\n\n return '';\n}\n\nexport class GoProxyDatasource extends Datasource {\n static readonly id = 'go-proxy';\n\n constructor() {\n super(GoProxyDatasource.id);\n }\n\n readonly direct = new GoDirectDatasource();\n\n private readonly githubHttp = new GithubHttp(GithubReleasesDatasource.id);\n\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n logger.trace(`goproxy.getReleases(${packageName})`);\n const goproxy = getEnv().GOPROXY ?? `${publicGoproxyUrl},direct`;\n if (goproxy === 'direct') {\n return this.direct.getReleases(config);\n }\n const proxyList = parseGoproxy(goproxy);\n const noproxy = parseNoproxy();\n\n let result: ReleaseResult | null = null;\n let servedByProxy = false;\n\n if (noproxy?.test(packageName)) {\n logger.debug(`Fetching ${packageName} via GONOPROXY match`);\n result = await this.direct.getReleases(config);\n return result;\n }\n\n for (const { url, fallback } of proxyList) {\n try {\n if (url === 'off') {\n break;\n } else if (url === 'direct') {\n result = await this.direct.getReleases(config);\n break;\n }\n\n const res = await this.getVersionsWithInfo(\n url,\n packageName,\n config.constraintsFiltering,\n );\n if (res.releases.length) {\n result = res;\n servedByProxy = true;\n break;\n }\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const statusCode = potentialHttpError?.response?.statusCode;\n const canFallback =\n fallback === '|' ? true : statusCode === 404 || statusCode === 410;\n if (!canFallback) {\n logger.debug(\n { err },\n 'Goproxy error: not falling back to other URLs provided with GOPROXY, rethrowing',\n );\n this.handleGenericErrors(err);\n }\n logger.debug(\n { err },\n 'Goproxy error: trying next URL provided with GOPROXY',\n );\n }\n }\n\n if (result && !result.sourceUrl) {\n try {\n const datasource = await BaseGoDatasource.getDatasource(packageName);\n const sourceUrl = getSourceUrl(datasource);\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n } catch (err) {\n logger.trace({ err }, `Can't get datasource for ${packageName}`);\n }\n }\n\n if (result?.sourceUrl && servedByProxy) {\n await this.addGithubReleaseTimestamps(\n packageName,\n result.sourceUrl,\n result.releases,\n );\n }\n\n return result;\n }\n\n /**\n * A Go proxy reports the commit time of the tagged commit as a version's `Time`, which can be much earlier than the point at which that version was released.\n *\n * When the module is hosted on GitHub and the version has a GitHub Release, the Release's publication time is a better indicator of when the version became available.\n */\n async addGithubReleaseTimestamps(\n packageName: string,\n sourceUrl: string,\n releases: Release[],\n ): Promise<void> {\n if (detectPlatform(sourceUrl) !== 'github') {\n return;\n }\n\n const parsedUrl = parseUrl(sourceUrl);\n /* v8 ignore next -- detectPlatform only returns a platform for parseable URLs */\n if (!parsedUrl) {\n return;\n }\n\n const repository = trimTrailingSlash(\n trimLeadingSlash(parsedUrl.pathname),\n ).replace(regEx(/\\.git$/), '');\n\n try {\n const githubReleases = await queryReleases(\n {\n packageName: repository,\n registryUrl: parsedUrl.origin,\n },\n this.githubHttp,\n );\n\n const timestamps = new Map<string, Timestamp>();\n for (const { version, releaseTimestamp } of githubReleases) {\n timestamps.set(version, releaseTimestamp);\n }\n\n const tagPrefix = getTagPrefix(packageName, timestamps.keys());\n for (const release of releases) {\n const version = release.version.replace(incompatibleSuffixRegex, '');\n const releaseTimestamp = timestamps.get(`${tagPrefix}${version}`);\n if (\n releaseTimestamp &&\n (!release.releaseTimestamp ||\n releaseTimestamp > release.releaseTimestamp)\n ) {\n release.releaseTimestamp = releaseTimestamp;\n }\n }\n } catch (err) {\n logger.debug(\n { err, packageName },\n 'Error fetching GitHub Releases for Go module',\n );\n }\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getCacheKey(config),\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Avoid ambiguity when serving from case-insensitive file systems.\n *\n * @see https://golang.org/ref/mod#goproxy-protocol\n */\n encodeCase(input: string): string {\n return input.replace(regEx(/(?:[A-Z])/g), (x) => `!${x.toLowerCase()}`);\n }\n\n async listVersions(baseUrl: string, packageName: string): Promise<Release[]> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n 'list',\n );\n const { body } = await this.http.getText(url);\n return filterMap(body.split(newlineRegex), (str) => {\n if (!isNonEmptyStringAndNotWhitespace(str)) {\n return null;\n }\n\n const [version, timestamp] = str.trim().split(regEx(/\\s+/));\n const release: Release = pseudoVersionToRelease(version) ?? { version };\n\n const releaseTimestamp = asTimestamp(timestamp);\n if (releaseTimestamp) {\n release.releaseTimestamp = releaseTimestamp;\n }\n\n return release;\n });\n }\n\n async versionInfo(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<Release> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.info`,\n );\n const res = await this.http.getJson(url, VersionInfo);\n\n const result: Release = {\n version: res.body.Version,\n };\n\n const releaseTimestamp = asTimestamp(res.body.Time);\n if (releaseTimestamp) {\n result.releaseTimestamp = releaseTimestamp;\n }\n\n return result;\n }\n\n /**\n * Retrieve the `go` directive for a given Go Module.\n *\n * NOTE that this means the `go` directive, not the `toolchain` directive.\n */\n async retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getVersionedCacheKey(packageName, version),\n // a module's `go.mod` should /never/ change after it's published. If going via the Go Proxy and the Go Checksum Database, a change in this value will result in build failures.\n ttlMinutes: 100 * 24 * 60,\n cacheable: isPublicGoPackage(packageName),\n },\n () => this._retrieveGoDirectiveForModule(baseUrl, packageName, version),\n );\n }\n\n async _retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.mod`,\n );\n const res = await this.http.getText(url);\n\n let goDirective: string | undefined = undefined;\n\n for (const line of res.body.split('\\n')) {\n const goVersionMatches = goVersionRegex.exec(line)?.groups;\n if (goVersionMatches) {\n goDirective = goVersionMatches.version;\n break;\n }\n }\n\n if (!goDirective) {\n return goDirective;\n }\n\n // always return it in full SemVer format, which can then be matched on using `semver` or `semver-coerced`\n const parts = goDirective.split('.');\n if (parts.length === 1) {\n return `${parts[0]}.0.0`;\n }\n if (parts.length === 2) {\n return `${parts[0]}.${parts[1]}.0`;\n }\n return `${parts[0]}.${parts[1]}.${parts[2]}`;\n }\n\n async getLatestVersion(\n baseUrl: string,\n packageName: string,\n ): Promise<{ version: string; sourceUrl?: string } | null> {\n try {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@latest',\n );\n const res = await this.http.getJson(url, VersionInfo);\n const { Version: version, Origin: origin } = res.body;\n // Extract sourceUrl from GOPROXY Origin when present, avoiding go-get to\n // vanity hosts (https://github.com/renovatebot/renovate/discussions/44898)\n const sourceUrl =\n origin?.VCS === 'git' && isNonEmptyString(origin.URL)\n ? origin.URL.replace(regEx(/\\.git$/), '')\n : undefined;\n return { version, sourceUrl };\n } catch (err) {\n logger.trace({ err }, 'Failed to get latest version');\n return null;\n }\n }\n\n async getVersionsWithInfo(\n baseUrl: string,\n packageName: string,\n constraintsFiltering: ConstraintsFilter | undefined,\n ): Promise<ReleaseResult> {\n const isGopkgin = packageName.startsWith('gopkg.in/');\n const majorSuffixSeparator = isGopkgin ? '.' : '/';\n const modParts = packageName.match(modRegex)?.groups;\n /* v8 ignore start: defensive - modRegex matches any non-empty package name, so baseMod is always set */\n const baseMod = modParts?.baseMod ?? packageName;\n /* v8 ignore stop */\n const packageMajor = parseInt(modParts?.majorVersion ?? '0', 10);\n\n const result: ReleaseResult = { releases: [] };\n for (let major = packageMajor; ; major += 1) {\n let pkg = `${baseMod}${majorSuffixSeparator}v${major}`;\n if (!isGopkgin && major < 2) {\n pkg = baseMod;\n major += 1; // v0 and v1 are the same module\n }\n\n let releases: Release[] = [];\n\n try {\n const res = await this.listVersions(baseUrl, pkg);\n\n // Artifactory returns all versions in any major (past and future),\n // so starting from v2, we filter them in order to avoid the infinite loop\n const filteredReleases = res.filter(({ version }) => {\n if (major < 2) {\n return true;\n }\n\n return (\n version.split(regEx(/[^\\d]+/)).find(isTruthy) === major.toString()\n );\n });\n\n const timestamps = await GoVersionTimestampCache.init(baseUrl, pkg);\n\n releases = await p.map(filteredReleases, async (versionInfo) => {\n const { version, newDigest, releaseTimestamp } = versionInfo;\n\n if (releaseTimestamp) {\n return { version, newDigest, releaseTimestamp };\n }\n\n const cachedTimestamp = timestamps.get(version);\n if (cachedTimestamp) {\n return { version, releaseTimestamp: cachedTimestamp };\n }\n\n try {\n const release = await this.versionInfo(baseUrl, pkg, version);\n if (release.releaseTimestamp) {\n timestamps.set(version, release.releaseTimestamp);\n }\n return release;\n } catch (err) {\n logger.trace({ err }, `Can't obtain data from ${baseUrl}`);\n return { version };\n }\n });\n\n await timestamps.save();\n\n if (constraintsFiltering === 'strict') {\n releases = await p.map(releases, async (rel) => {\n try {\n const goDirective = await this.retrieveGoDirectiveForModule(\n baseUrl,\n pkg,\n rel.version,\n );\n if (goDirective) {\n rel.constraints ??= {};\n rel.constraints['%goMod'] ??= [];\n rel.constraints['%goMod'].push(goDirective);\n }\n } catch (err) {\n logger.trace(\n { err },\n `Can't obtain \\`go\\` directive from ${baseUrl}`,\n );\n }\n\n return rel;\n });\n }\n\n result.releases.push(...releases);\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const status = potentialHttpError.response?.statusCode;\n if (\n potentialHttpError instanceof HttpError &&\n (status === 404 || status === 403) &&\n major !== packageMajor\n ) {\n break;\n }\n\n throw err;\n }\n\n const latest = await this.getLatestVersion(baseUrl, pkg);\n if (latest) {\n const { version: latestVersion, sourceUrl } = latest;\n result.tags ??= {};\n result.tags.latest ??= latestVersion;\n if (goVersioning.isGreaterThan(latestVersion, result.tags.latest)) {\n result.tags.latest = latestVersion;\n }\n if (sourceUrl) {\n result.sourceUrl ??= sourceUrl;\n }\n if (!result.releases.length) {\n const releaseFromLatest = pseudoVersionToRelease(latestVersion);\n // v8 ignore else -- needs an empty version list plus a non-pseudo latest\n if (releaseFromLatest) {\n result.releases.push(releaseFromLatest);\n }\n }\n }\n\n if (!releases.length) {\n break;\n }\n }\n\n return result;\n }\n\n static getCacheKey({\n packageName,\n constraintsFiltering,\n }: GetReleasesConfig): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n const constraintsFilteringKey =\n constraintsFiltering && constraintsFiltering !== 'none'\n ? `@@${constraintsFiltering}`\n : '';\n // TODO: types (#22198)\n return `${packageName}@@${goproxy}@@${noproxy?.toString()}${constraintsFilteringKey}`;\n }\n\n static getVersionedCacheKey(packageName: string, version: string): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n // TODO: types (#22198)\n return `${packageName}@@${version}@@${goproxy}@@${noproxy?.toString()}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,iBAAiB,MAAM,iCAAiC;AAE9D,MAAM,WAAW,MAAM,iDAAiD;AAExE,MAAM,kBAAkB,MAAM,MAAM;;;;;;AAOpC,MAAM,0BAA0B,MAAM,iBAAiB;;;;AAKvD,MAAM,qBAAqB,MACzB,gFACF;AAEA,SAAgB,uBAAuB,eAAuC;CAC5E,MAAM,QAAQ,cAAc,MAAM,kBAAkB,CAAC,EAAE;CACvD,IAAI,CAAC,OACH,OAAO;CAGT,MAAM,EAAE,QAAQ,WAAW,cAAc;CAGzC,OAAO;EACL,SAAS;EACT;EACA,kBALuB,YAAY,SAKpB;CACjB;AACF;;;;;;;;AASA,SAAgB,aAAa,UAAkB,MAAgC;CAC7E,MAAM,YAAY,SACf,QAAQ,MAAM,SAAS,GAAG,EAAE,CAAC,CAC7B,MAAM,GAAG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OAAO,CAAC,CAAC,QAGqB,IAF9B,aAEwC,CAAC,EAAE,SAAS;CACtE;AACF"}
1
+ {"version":3,"file":"releases-goproxy.js","names":["p.map","HttpError","goVersioning"],"sources":["../../../../lib/modules/datasource/go/releases-goproxy.ts"],"sourcesContent":["import {\n isNonEmptyString,\n isNonEmptyStringAndNotWhitespace,\n isTruthy,\n} from '@sindresorhus/is';\nimport type { ConstraintsFilter } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport {\n queryReleases,\n queryTags,\n} from '../../../util/github/graphql/index.ts';\nimport { GithubHttp } from '../../../util/http/github.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport type { Timestamp } from '../../../util/timestamp.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport {\n joinUrlParts,\n parseUrl,\n trimLeadingSlash,\n trimTrailingSlash,\n} from '../../../util/url.ts';\nimport goVersioning from '../../versioning/go-mod-directive/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { GithubReleasesDatasource } from '../github-releases/index.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl, isPublicGoPackage, publicGoproxyUrl } from './common.ts';\nimport { parseGoproxy, parseNoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { VersionInfo } from './schema.ts';\nimport { GoVersionTimestampCache } from './timestamp-cache.ts';\n\n/** TODO #42566 */\nconst goVersionRegex = regEx(/^\\s*go\\s+(?<version>[^\\s]+)\\s*$/);\n\nconst modRegex = regEx(/^(?<baseMod>.*?)(?:[./]v(?<majorVersion>\\d+))?$/);\n\nconst versionTagRegex = regEx(/^v\\d/);\n\n/**\n * Modules with a major version of v2 or above which have no `go.mod` are reported by a Go proxy with a `+incompatible` suffix, which is absent from the tag they were published as.\n *\n * @see https://go.dev/ref/mod#non-module-compat\n */\nconst incompatibleSuffixRegex = regEx(/\\+incompatible$/);\n\n/**\n * @see https://go.dev/ref/mod#pseudo-versions\n */\nconst pseudoVersionRegex = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?(?<timestamp>\\d{14})-(?<digest>[a-f0-9]{12})/i,\n);\n\nexport function pseudoVersionToRelease(pseudoVersion: string): Release | null {\n const match = pseudoVersion.match(pseudoVersionRegex)?.groups;\n if (!match) {\n return null;\n }\n\n const { digest: newDigest, timestamp } = match;\n const releaseTimestamp = asTimestamp(timestamp);\n\n return {\n version: pseudoVersion,\n newDigest,\n releaseTimestamp,\n };\n}\n\n/**\n * A Go module which lives in a subdirectory of its repository is tagged with that subdirectory as a prefix, so `github.com/aws/aws-sdk-go-v2/service/s3` publishes `v1.2.3` as the tag `service/s3/v1.2.3`.\n *\n * @see https://go.dev/ref/mod#vcs-version\n *\n * Because we can't tell from the module path alone where the repository ends and the subdirectory begins, we try each candidate prefix - longest first - against the tags we actually found, in the same way as `filterByPrefix` does for direct lookups.\n */\nexport function getTagPrefix(goModule: string, tags: Iterable<string>): string {\n const nameParts = goModule\n .replace(regEx(/\\/v\\d+$/), '')\n .split('/')\n .slice(1);\n const tagNames = [...tags];\n\n while (nameParts.length) {\n const prefix = `${nameParts.join('/')}/`;\n\n const isUsed = tagNames.some(\n (tag) =>\n tag.startsWith(prefix) &&\n versionTagRegex.test(tag.slice(prefix.length)),\n );\n if (isUsed) {\n return prefix;\n }\n\n nameParts.shift();\n }\n\n return '';\n}\n\nexport class GoProxyDatasource extends Datasource {\n static readonly id = 'go-proxy';\n\n constructor() {\n super(GoProxyDatasource.id);\n }\n\n readonly direct = new GoDirectDatasource();\n\n private readonly githubHttp = new GithubHttp(GithubReleasesDatasource.id);\n\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n logger.trace(`goproxy.getReleases(${packageName})`);\n const goproxy = getEnv().GOPROXY ?? `${publicGoproxyUrl},direct`;\n if (goproxy === 'direct') {\n return this.direct.getReleases(config);\n }\n const proxyList = parseGoproxy(goproxy);\n const noproxy = parseNoproxy();\n\n let result: ReleaseResult | null = null;\n let servedByProxy = false;\n\n if (noproxy?.test(packageName)) {\n logger.debug(`Fetching ${packageName} via GONOPROXY match`);\n result = await this.direct.getReleases(config);\n return result;\n }\n\n for (const { url, fallback } of proxyList) {\n try {\n if (url === 'off') {\n break;\n } else if (url === 'direct') {\n result = await this.direct.getReleases(config);\n break;\n }\n\n const res = await this.getVersionsWithInfo(\n url,\n packageName,\n config.constraintsFiltering,\n );\n if (res.releases.length) {\n result = res;\n servedByProxy = true;\n break;\n }\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const statusCode = potentialHttpError?.response?.statusCode;\n const canFallback =\n fallback === '|' ? true : statusCode === 404 || statusCode === 410;\n if (!canFallback) {\n logger.debug(\n { err },\n 'Goproxy error: not falling back to other URLs provided with GOPROXY, rethrowing',\n );\n this.handleGenericErrors(err);\n }\n logger.debug(\n { err },\n 'Goproxy error: trying next URL provided with GOPROXY',\n );\n }\n }\n\n if (result && !result.sourceUrl) {\n try {\n const datasource = await BaseGoDatasource.getDatasource(packageName);\n const sourceUrl = getSourceUrl(datasource);\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n } catch (err) {\n logger.trace({ err }, `Can't get datasource for ${packageName}`);\n }\n }\n\n if (result?.sourceUrl && servedByProxy) {\n await this.addGithubTimestamps(\n packageName,\n result.sourceUrl,\n result.releases,\n );\n }\n\n return result;\n }\n\n /**\n * A Go proxy reports the commit time of the tagged commit as a version's `Time`, which can be much earlier than the point at which that version was released.\n *\n * When the module is hosted on GitHub, a GitHub Release's publication time, or - if there's no Release - the git tag's own creation time (distinct from the commit time for an annotated tag), is a better indicator of when the version became available. A Release is preferred over a tag when both exist for the same version.\n */\n async addGithubTimestamps(\n packageName: string,\n sourceUrl: string,\n releases: Release[],\n ): Promise<void> {\n if (detectPlatform(sourceUrl) !== 'github') {\n return;\n }\n\n const parsedUrl = parseUrl(sourceUrl);\n /* v8 ignore next -- detectPlatform only returns a platform for parseable URLs */\n if (!parsedUrl) {\n return;\n }\n\n const repository = trimTrailingSlash(\n trimLeadingSlash(parsedUrl.pathname),\n ).replace(regEx(/\\.git$/), '');\n const githubConfig = {\n packageName: repository,\n registryUrl: parsedUrl.origin,\n };\n\n const [githubTags, githubReleases] = await Promise.all([\n queryTags(githubConfig, this.githubHttp).catch((err) => {\n logger.debug(\n { err, packageName },\n 'Error fetching GitHub Tags for Go module',\n );\n return [];\n }),\n queryReleases(githubConfig, this.githubHttp).catch((err) => {\n logger.debug(\n { err, packageName },\n 'Error fetching GitHub Releases for Go module',\n );\n return [];\n }),\n ]);\n\n const timestamps = new Map<string, Timestamp>();\n for (const { version, releaseTimestamp } of githubTags) {\n timestamps.set(version, releaseTimestamp);\n }\n for (const { version, releaseTimestamp } of githubReleases) {\n timestamps.set(version, releaseTimestamp);\n }\n\n const tagPrefix = getTagPrefix(packageName, timestamps.keys());\n for (const release of releases) {\n const version = release.version.replace(incompatibleSuffixRegex, '');\n const releaseTimestamp = timestamps.get(`${tagPrefix}${version}`);\n if (\n releaseTimestamp &&\n (!release.releaseTimestamp ||\n releaseTimestamp > release.releaseTimestamp)\n ) {\n release.releaseTimestamp = releaseTimestamp;\n }\n }\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getCacheKey(config),\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Avoid ambiguity when serving from case-insensitive file systems.\n *\n * @see https://golang.org/ref/mod#goproxy-protocol\n */\n encodeCase(input: string): string {\n return input.replace(regEx(/(?:[A-Z])/g), (x) => `!${x.toLowerCase()}`);\n }\n\n async listVersions(baseUrl: string, packageName: string): Promise<Release[]> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n 'list',\n );\n const { body } = await this.http.getText(url);\n return filterMap(body.split(newlineRegex), (str) => {\n if (!isNonEmptyStringAndNotWhitespace(str)) {\n return null;\n }\n\n const [version, timestamp] = str.trim().split(regEx(/\\s+/));\n const release: Release = pseudoVersionToRelease(version) ?? { version };\n\n const releaseTimestamp = asTimestamp(timestamp);\n if (releaseTimestamp) {\n release.releaseTimestamp = releaseTimestamp;\n }\n\n return release;\n });\n }\n\n async versionInfo(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<Release> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.info`,\n );\n const res = await this.http.getJson(url, VersionInfo);\n\n const result: Release = {\n version: res.body.Version,\n };\n\n const releaseTimestamp = asTimestamp(res.body.Time);\n if (releaseTimestamp) {\n result.releaseTimestamp = releaseTimestamp;\n }\n\n return result;\n }\n\n /**\n * Retrieve the `go` directive for a given Go Module.\n *\n * NOTE that this means the `go` directive, not the `toolchain` directive.\n */\n async retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getVersionedCacheKey(packageName, version),\n // a module's `go.mod` should /never/ change after it's published. If going via the Go Proxy and the Go Checksum Database, a change in this value will result in build failures.\n ttlMinutes: 100 * 24 * 60,\n cacheable: isPublicGoPackage(packageName),\n },\n () => this._retrieveGoDirectiveForModule(baseUrl, packageName, version),\n );\n }\n\n async _retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.mod`,\n );\n const res = await this.http.getText(url);\n\n let goDirective: string | undefined = undefined;\n\n for (const line of res.body.split('\\n')) {\n const goVersionMatches = goVersionRegex.exec(line)?.groups;\n if (goVersionMatches) {\n goDirective = goVersionMatches.version;\n break;\n }\n }\n\n if (!goDirective) {\n return goDirective;\n }\n\n // always return it in full SemVer format, which can then be matched on using `semver` or `semver-coerced`\n const parts = goDirective.split('.');\n if (parts.length === 1) {\n return `${parts[0]}.0.0`;\n }\n if (parts.length === 2) {\n return `${parts[0]}.${parts[1]}.0`;\n }\n return `${parts[0]}.${parts[1]}.${parts[2]}`;\n }\n\n async getLatestVersion(\n baseUrl: string,\n packageName: string,\n ): Promise<{ version: string; sourceUrl?: string } | null> {\n try {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@latest',\n );\n const res = await this.http.getJson(url, VersionInfo);\n const { Version: version, Origin: origin } = res.body;\n // Extract sourceUrl from GOPROXY Origin when present, avoiding go-get to\n // vanity hosts (https://github.com/renovatebot/renovate/discussions/44898)\n const sourceUrl =\n origin?.VCS === 'git' && isNonEmptyString(origin.URL)\n ? origin.URL.replace(regEx(/\\.git$/), '')\n : undefined;\n return { version, sourceUrl };\n } catch (err) {\n logger.trace({ err }, 'Failed to get latest version');\n return null;\n }\n }\n\n async getVersionsWithInfo(\n baseUrl: string,\n packageName: string,\n constraintsFiltering: ConstraintsFilter | undefined,\n ): Promise<ReleaseResult> {\n const isGopkgin = packageName.startsWith('gopkg.in/');\n const majorSuffixSeparator = isGopkgin ? '.' : '/';\n const modParts = packageName.match(modRegex)?.groups;\n /* v8 ignore start: defensive - modRegex matches any non-empty package name, so baseMod is always set */\n const baseMod = modParts?.baseMod ?? packageName;\n /* v8 ignore stop */\n const packageMajor = parseInt(modParts?.majorVersion ?? '0', 10);\n\n const result: ReleaseResult = { releases: [] };\n for (let major = packageMajor; ; major += 1) {\n let pkg = `${baseMod}${majorSuffixSeparator}v${major}`;\n if (!isGopkgin && major < 2) {\n pkg = baseMod;\n major += 1; // v0 and v1 are the same module\n }\n\n let releases: Release[] = [];\n\n try {\n const res = await this.listVersions(baseUrl, pkg);\n\n // Artifactory returns all versions in any major (past and future),\n // so starting from v2, we filter them in order to avoid the infinite loop\n const filteredReleases = res.filter(({ version }) => {\n if (major < 2) {\n return true;\n }\n\n return (\n version.split(regEx(/[^\\d]+/)).find(isTruthy) === major.toString()\n );\n });\n\n const timestamps = await GoVersionTimestampCache.init(baseUrl, pkg);\n\n releases = await p.map(filteredReleases, async (versionInfo) => {\n const { version, newDigest, releaseTimestamp } = versionInfo;\n\n if (releaseTimestamp) {\n return { version, newDigest, releaseTimestamp };\n }\n\n const cachedTimestamp = timestamps.get(version);\n if (cachedTimestamp) {\n return { version, releaseTimestamp: cachedTimestamp };\n }\n\n try {\n const release = await this.versionInfo(baseUrl, pkg, version);\n if (release.releaseTimestamp) {\n timestamps.set(version, release.releaseTimestamp);\n }\n return release;\n } catch (err) {\n logger.trace({ err }, `Can't obtain data from ${baseUrl}`);\n return { version };\n }\n });\n\n await timestamps.save();\n\n if (constraintsFiltering === 'strict') {\n releases = await p.map(releases, async (rel) => {\n try {\n const goDirective = await this.retrieveGoDirectiveForModule(\n baseUrl,\n pkg,\n rel.version,\n );\n if (goDirective) {\n rel.constraints ??= {};\n rel.constraints['%goMod'] ??= [];\n rel.constraints['%goMod'].push(goDirective);\n }\n } catch (err) {\n logger.trace(\n { err },\n `Can't obtain \\`go\\` directive from ${baseUrl}`,\n );\n }\n\n return rel;\n });\n }\n\n result.releases.push(...releases);\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const status = potentialHttpError.response?.statusCode;\n if (\n potentialHttpError instanceof HttpError &&\n (status === 404 || status === 403) &&\n major !== packageMajor\n ) {\n break;\n }\n\n throw err;\n }\n\n const latest = await this.getLatestVersion(baseUrl, pkg);\n if (latest) {\n const { version: latestVersion, sourceUrl } = latest;\n result.tags ??= {};\n result.tags.latest ??= latestVersion;\n if (goVersioning.isGreaterThan(latestVersion, result.tags.latest)) {\n result.tags.latest = latestVersion;\n }\n if (sourceUrl) {\n result.sourceUrl ??= sourceUrl;\n }\n if (!result.releases.length) {\n const releaseFromLatest = pseudoVersionToRelease(latestVersion);\n // v8 ignore else -- needs an empty version list plus a non-pseudo latest\n if (releaseFromLatest) {\n result.releases.push(releaseFromLatest);\n }\n }\n }\n\n if (!releases.length) {\n break;\n }\n }\n\n return result;\n }\n\n static getCacheKey({\n packageName,\n constraintsFiltering,\n }: GetReleasesConfig): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n const constraintsFilteringKey =\n constraintsFiltering && constraintsFiltering !== 'none'\n ? `@@${constraintsFiltering}`\n : '';\n // TODO: types (#22198)\n return `${packageName}@@${goproxy}@@${noproxy?.toString()}${constraintsFilteringKey}`;\n }\n\n static getVersionedCacheKey(packageName: string, version: string): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n // TODO: types (#22198)\n return `${packageName}@@${version}@@${goproxy}@@${noproxy?.toString()}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAM,iBAAiB,MAAM,iCAAiC;AAE9D,MAAM,WAAW,MAAM,iDAAiD;AAExE,MAAM,kBAAkB,MAAM,MAAM;;;;;;AAOpC,MAAM,0BAA0B,MAAM,iBAAiB;;;;AAKvD,MAAM,qBAAqB,MACzB,gFACF;AAEA,SAAgB,uBAAuB,eAAuC;CAC5E,MAAM,QAAQ,cAAc,MAAM,kBAAkB,CAAC,EAAE;CACvD,IAAI,CAAC,OACH,OAAO;CAGT,MAAM,EAAE,QAAQ,WAAW,cAAc;CAGzC,OAAO;EACL,SAAS;EACT;EACA,kBALuB,YAAY,SAKpB;CACjB;AACF;;;;;;;;AASA,SAAgB,aAAa,UAAkB,MAAgC;CAC7E,MAAM,YAAY,SACf,QAAQ,MAAM,SAAS,GAAG,EAAE,CAAC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,EACjB,aACA,wBAC4B;EAC5B,MAAM,UAAU,OAAO,CAAC,CAAC;EACzB,MAAM,UAAU,aAAa;EAC7B,MAAM,0BACJ,wBAAwB,yBAAyB,SAC7C,KAAK,yBACL;EAEN,OAAO,GAAG,YAAY,IAAI,QAAQ,IAAI,SAAS,SAAS,IAAI;CAC9D;CAEA,OAAO,qBAAqB,aAAqB,SAAyB;EAIxE,OAAO,GAAG,YAAY,IAAI,QAAQ,IAHlB,OAAO,CAAC,CAAC,QAGqB,IAF9B,aAEwC,CAAC,EAAE,SAAS;CACtE;AACF"}
@@ -1,8 +1,8 @@
1
1
  import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
2
2
  import { GithubTagsDatasource } from "../../datasource/github-tags/index.js";
3
3
  import { NpmDatasource } from "../../datasource/npm/index.js";
4
- import { getRangeStrategy } from "../npm/range.js";
5
4
  import { updateDependency } from "../npm/update/dependency/index.js";
5
+ import { getRangeStrategy } from "../npm/range.js";
6
6
  import "../npm/index.js";
7
7
  import { updateArtifacts } from "./artifacts.js";
8
8
  import { extractAllPackageFiles } from "./extract.js";
@@ -17,7 +17,7 @@ hashMap.set("bitbucket-pipelines", "59c0503494ab1442b127914503c01b97ac17b6742b19
17
17
  hashMap.set("bitrise", "478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42");
18
18
  hashMap.set("buildkite", "b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c");
19
19
  hashMap.set("buildpacks", "6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f");
20
- hashMap.set("bun", "5820cfb6ebe018b8c336d481ea9ae319daaee6a2e368c45196fc8bc67cb3e755");
20
+ hashMap.set("bun", "6789cc6499c77cdf44d4fb306198274bb72241e6d0ef7ceda7e916d7022d864c");
21
21
  hashMap.set("bun-version", "df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4");
22
22
  hashMap.set("bundler", "6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5");
23
23
  hashMap.set("cake", "9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad");
@@ -48,7 +48,7 @@ hashMap.set("gitlabci", "a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98
48
48
  hashMap.set("gitlabci-include", "8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351");
49
49
  hashMap.set("glasskube", "93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30");
50
50
  hashMap.set("gleam", "5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3");
51
- hashMap.set("gomod", "c4aaa76f1a679e5ae8a547db33452e4adec6473e24432ee5ba56662b42a2fb2e");
51
+ hashMap.set("gomod", "89899292f917777b79f8ce1714e54c4e61cf151fb75f87f1ddb1d1ccd6a4e6f7");
52
52
  hashMap.set("gradle", "9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064");
53
53
  hashMap.set("gradle-wrapper", "73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87");
54
54
  hashMap.set("haskell-cabal", "f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2");
@@ -75,7 +75,7 @@ hashMap.set("mise", "59c691024c34cb4be4d9b4f811019ae9b22410df0da54977cdcecea261f
75
75
  hashMap.set("mix", "0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872");
76
76
  hashMap.set("nix", "9cbd96a29fe96e3df7418e422256380202f07970cf7f00b08388c181224a2b85");
77
77
  hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
78
- hashMap.set("npm", "95017de512f3679634bfe839812b84712f59738062040039bc528e40743a4101");
78
+ hashMap.set("npm", "d8989e2dd8d18506b626d71934816dac9cc03311787d12d466cda46d33ca1324");
79
79
  hashMap.set("nuget", "fb02247c67a198ffe414a44d23c7894bd114dcc53803334f82e39479e7b27f6f");
80
80
  hashMap.set("nvm", "3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322");
81
81
  hashMap.set("ocb", "032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca");
@@ -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','bdb6931cc03f4ac02ebfdb56c4b3483bb6c5250fa952545f1a25584d502bbffd');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','04a13dec4e08ba21004961c718072fde976226d65809fa3c838bf66ba93e5d5a');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c31bc0a0e23d32726bcc09aa67533ebc5058124bf89c88e09c837419f550801a');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','5820cfb6ebe018b8c336d481ea9ae319daaee6a2e368c45196fc8bc67cb3e755');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','027f60d13311b340391633eceb3685b5105eb6de88d876270d40f4666e5ef7a5');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','3976117beb9adeade088187965929d42f21f5da12c4614fd22aa92cad1083b19');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','197219e93857ad7e6701755ede245824329da08913ebdb23d1e5e854a169aafe');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','9585e4e0626cc3613c3903249972acf97942ad7e16d85fa0da6677373e445db1');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','b5faeb8f31d238e0d05a4aeebf9a837273687908ab8078b34e738bb0e369c80c');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97');\nhashMap.set('flux','842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f4e2c6ddf2fa93241665c5176faafb358eecfcb701e7478790c4d58853ed827a');\nhashMap.set('github-actions','7bd984806fa6e33e0650d2f65d88758a9f4b972f366c6cd7c7698e22e6fb3ca3');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','c4aaa76f1a679e5ae8a547db33452e4adec6473e24432ee5ba56662b42a2fb2e');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','22f61344565f87ca3512c0ba8fac32627fde8ee919b7badae07b2116e285f049');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','4e12edd848dcf258c94e9b7d4bd9fdd5674ffe12c5786bbcb51089b72bfe0ca3');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','71e9e621ba0974271f1a7effcbd364efd66767d4336e844539788f5d6bb22720');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','706cc4776ad6ec4df5bed0ac84e8324ad7328457b6743b082e444d4770756604');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','59c691024c34cb4be4d9b4f811019ae9b22410df0da54977cdcecea261fbbbf5');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','9cbd96a29fe96e3df7418e422256380202f07970cf7f00b08388c181224a2b85');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','95017de512f3679634bfe839812b84712f59738062040039bc528e40743a4101');\nhashMap.set('nuget','fb02247c67a198ffe414a44d23c7894bd114dcc53803334f82e39479e7b27f6f');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','e9dea5d591c87956b9f018414cb3dab8f2e13580a13be00550fdce198fdf08e6');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','6788a8569ba9c50c763ffa2bed952a4314ae8e696c29f93d3eb7c4a12d99ce20');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','48e2bff8d3a96e8011ee12776fe9c6e8aac4718ff47e891c294a8f12660cb1bb');\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,kEAAk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AI,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','bdb6931cc03f4ac02ebfdb56c4b3483bb6c5250fa952545f1a25584d502bbffd');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','04a13dec4e08ba21004961c718072fde976226d65809fa3c838bf66ba93e5d5a');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c31bc0a0e23d32726bcc09aa67533ebc5058124bf89c88e09c837419f550801a');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','6789cc6499c77cdf44d4fb306198274bb72241e6d0ef7ceda7e916d7022d864c');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','027f60d13311b340391633eceb3685b5105eb6de88d876270d40f4666e5ef7a5');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','3976117beb9adeade088187965929d42f21f5da12c4614fd22aa92cad1083b19');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','197219e93857ad7e6701755ede245824329da08913ebdb23d1e5e854a169aafe');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','9585e4e0626cc3613c3903249972acf97942ad7e16d85fa0da6677373e445db1');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','b5faeb8f31d238e0d05a4aeebf9a837273687908ab8078b34e738bb0e369c80c');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97');\nhashMap.set('flux','842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f4e2c6ddf2fa93241665c5176faafb358eecfcb701e7478790c4d58853ed827a');\nhashMap.set('github-actions','7bd984806fa6e33e0650d2f65d88758a9f4b972f366c6cd7c7698e22e6fb3ca3');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','89899292f917777b79f8ce1714e54c4e61cf151fb75f87f1ddb1d1ccd6a4e6f7');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','22f61344565f87ca3512c0ba8fac32627fde8ee919b7badae07b2116e285f049');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','4e12edd848dcf258c94e9b7d4bd9fdd5674ffe12c5786bbcb51089b72bfe0ca3');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','71e9e621ba0974271f1a7effcbd364efd66767d4336e844539788f5d6bb22720');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','706cc4776ad6ec4df5bed0ac84e8324ad7328457b6743b082e444d4770756604');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','59c691024c34cb4be4d9b4f811019ae9b22410df0da54977cdcecea261fbbbf5');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','9cbd96a29fe96e3df7418e422256380202f07970cf7f00b08388c181224a2b85');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','d8989e2dd8d18506b626d71934816dac9cc03311787d12d466cda46d33ca1324');\nhashMap.set('nuget','fb02247c67a198ffe414a44d23c7894bd114dcc53803334f82e39479e7b27f6f');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','e9dea5d591c87956b9f018414cb3dab8f2e13580a13be00550fdce198fdf08e6');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','6788a8569ba9c50c763ffa2bed952a4314ae8e696c29f93d3eb7c4a12d99ce20');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','48e2bff8d3a96e8011ee12776fe9c6e8aac4718ff47e891c294a8f12660cb1bb');\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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AkE;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"}
@@ -3,6 +3,7 @@ import { regEx } from "../../../util/regex.js";
3
3
  import { matchRegexOrGlob } from "../../../util/string-match.js";
4
4
  import { logger } from "../../../logger/index.js";
5
5
  import { localPathExists, readLocalFile, writeLocalFile } from "../../../util/fs/index.js";
6
+ import { updateDependency } from "./update/dependency/index.js";
6
7
  import { isEmptyArray, isNonEmptyObject, isString } from "@sindresorhus/is";
7
8
  import { isScalar, isSeq, parseDocument } from "yaml";
8
9
  import upath from "upath";
@@ -20,34 +21,47 @@ async function updateArtifacts(updateArtifactsConfig) {
20
21
  return res;
21
22
  }
22
23
  /**
23
- * Updates the corepack hash of the `packageManager` field from the new version's integrity digest.
24
+ * Updates corepack hashes in `packageManager` and `devEngines.packageManager` from the new version's integrity digest.
24
25
  * @see https://github.com/nodejs/corepack/blob/57bfb67b062ea1b8746b302bcdbf9f8e8438c526/sources/corepackUtils.ts#L300
25
26
  */
26
27
  function handlePackageManagerUpdates(updateArtifactsConfig) {
27
28
  const { packageFileName, updatedDeps, newPackageFileContent } = updateArtifactsConfig;
28
- const packageManagerUpdate = updatedDeps.find((dep) => dep.depType === "packageManager");
29
- if (!packageManagerUpdate) {
30
- logger.debug("No packageManager updates - returning null");
31
- return null;
32
- }
33
- const { currentValue, depName, newVersion, newDigest } = packageManagerUpdate;
34
- if (!currentValue || !regEx(versionWithHashRegString).test(currentValue)) return null;
35
- const sriMatch = regEx(sriRegString).exec(newDigest ?? "");
36
- if (!sriMatch?.groups) {
37
- logger.warn({
38
- packageFileName,
39
- depName,
40
- newVersion,
41
- newDigest
42
- }, "Cannot update packageManager hash: no valid digest available");
43
- return { artifactError: {
44
- fileName: packageFileName,
45
- stderr: `Cannot update packageManager hash for ${depName}@${newVersion}: no valid digest available`
46
- } };
29
+ const packageManagerUpdates = updatedDeps.filter((dep) => (dep.depType === "packageManager" || dep.depType === "devEngines.packageManager") && dep.currentValue && regEx(versionWithHashRegString).test(dep.currentValue));
30
+ let newContent = newPackageFileContent;
31
+ for (const packageManagerUpdate of packageManagerUpdates) {
32
+ const { depName, newVersion, newDigest } = packageManagerUpdate;
33
+ const sriMatch = regEx(sriRegString).exec(newDigest ?? "");
34
+ if (!sriMatch?.groups) {
35
+ logger.warn({
36
+ packageFileName,
37
+ depName,
38
+ newVersion,
39
+ newDigest
40
+ }, "Cannot update packageManager hash: no valid digest available");
41
+ return { artifactError: {
42
+ fileName: packageFileName,
43
+ stderr: `Cannot update packageManager hash for ${depName}@${newVersion}: no valid digest available`
44
+ } };
45
+ }
46
+ const { algo, hash } = sriMatch.groups;
47
+ const versionWithHash = `${newVersion}+${algo}.${Buffer.from(hash, "base64").toString("hex")}`;
48
+ if (packageManagerUpdate.depType === "packageManager") newContent = newContent.replace(regEx(packageManagerFieldRegString), `$1${depName}@${versionWithHash}"`);
49
+ else {
50
+ const updatedContent = updateDependency({
51
+ fileContent: newContent,
52
+ packageFile: packageFileName,
53
+ upgrade: {
54
+ ...packageManagerUpdate,
55
+ newValue: versionWithHash
56
+ }
57
+ });
58
+ if (!updatedContent) return { artifactError: {
59
+ fileName: packageFileName,
60
+ stderr: `Failed to apply Corepack hash for ${depName}@${newVersion}`
61
+ } };
62
+ newContent = updatedContent;
63
+ }
47
64
  }
48
- const { algo, hash } = sriMatch.groups;
49
- const newPackageManagerValue = `${depName}@${newVersion}+${algo}.${Buffer.from(hash, "base64").toString("hex")}`;
50
- const newContent = newPackageFileContent.replace(regEx(packageManagerFieldRegString), `$1${newPackageManagerValue}"`);
51
65
  if (newContent === newPackageFileContent) return null;
52
66
  logger.debug("Returning updated package.json");
53
67
  return { file: {
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","names":[],"sources":["../../../../lib/modules/manager/npm/artifacts.ts"],"sourcesContent":["import { isEmptyArray, isNonEmptyObject, isString } from '@sindresorhus/is';\nimport upath from 'upath';\nimport type { Scalar, YAMLSeq } from 'yaml';\nimport { isScalar, isSeq, parseDocument } from 'yaml';\nimport { logger } from '../../../logger/index.ts';\nimport {\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport { coerceObject } from '../../../util/object.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { matchRegexOrGlob } from '../../../util/string-match.ts';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\n\n// eg. 8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589\nconst versionWithHashRegString = '^(?<version>.*)\\\\+(?<hash>.*)';\n\n// Matches a Subresource Integrity string, eg. sha512-<base64 digest>\nconst sriRegString = '^(?<algo>sha\\\\d+)-(?<hash>[A-Za-z0-9+/]+={0,2})$';\n\nconst packageManagerFieldRegString = '(\"packageManager\"\\\\s*:\\\\s*\")[^\"]*\"';\n\nexport async function updateArtifacts(\n updateArtifactsConfig: UpdateArtifact,\n): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`npm.updateArtifacts(${updateArtifactsConfig.packageFileName})`);\n let res: UpdateArtifactsResult[] = [];\n res.push(coerceObject(handlePackageManagerUpdates(updateArtifactsConfig)));\n res.push(coerceObject(await updatePnpmWorkspace(updateArtifactsConfig)));\n\n res = res.filter(isNonEmptyObject);\n if (res.length === 0) {\n return null;\n }\n\n return res;\n}\n\n/**\n * Updates the corepack hash of the `packageManager` field from the new version's integrity digest.\n * @see https://github.com/nodejs/corepack/blob/57bfb67b062ea1b8746b302bcdbf9f8e8438c526/sources/corepackUtils.ts#L300\n */\nfunction handlePackageManagerUpdates(\n updateArtifactsConfig: UpdateArtifact,\n): UpdateArtifactsResult | null {\n const { packageFileName, updatedDeps, newPackageFileContent } =\n updateArtifactsConfig;\n const packageManagerUpdate = updatedDeps.find(\n (dep) => dep.depType === 'packageManager',\n );\n\n if (!packageManagerUpdate) {\n logger.debug('No packageManager updates - returning null');\n return null;\n }\n\n const { currentValue, depName, newVersion, newDigest } = packageManagerUpdate;\n\n // Only rewrite the hash if the current value already has one\n if (!currentValue || !regEx(versionWithHashRegString).test(currentValue)) {\n return null;\n }\n\n const sriMatch = regEx(sriRegString).exec(newDigest ?? '');\n if (!sriMatch?.groups) {\n logger.warn(\n { packageFileName, depName, newVersion, newDigest },\n 'Cannot update packageManager hash: no valid digest available',\n );\n return {\n artifactError: {\n fileName: packageFileName,\n stderr: `Cannot update packageManager hash for ${depName}@${newVersion}: no valid digest available`,\n },\n };\n }\n\n const { algo, hash } = sriMatch.groups;\n const hexHash = Buffer.from(hash, 'base64').toString('hex');\n const newPackageManagerValue = `${depName}@${newVersion}+${algo}.${hexHash}`;\n\n const newContent = newPackageFileContent.replace(\n regEx(packageManagerFieldRegString),\n `$1${newPackageManagerValue}\"`,\n );\n\n if (newContent === newPackageFileContent) {\n return null;\n }\n\n logger.debug('Returning updated package.json');\n return {\n file: {\n type: 'addition',\n path: packageFileName,\n contents: newContent,\n },\n };\n}\n\n/**\n * Update the minimumReleaseAgeExclude setting in pnpm-workspace.yaml if needed\n */\nasync function updatePnpmWorkspace(\n updateArtifactsConfig: UpdateArtifact,\n): Promise<UpdateArtifactsResult | null> {\n const upgrades = updateArtifactsConfig.updatedDeps.filter(\n (u) => u.isVulnerabilityAlert,\n );\n // return early if no security updates are present\n if (isEmptyArray(upgrades)) {\n return null;\n }\n\n const pnpmLockFile = upgrades[0].managerData?.pnpmLockFile;\n if (!isString(pnpmLockFile)) {\n logger.debug(\n 'No pnpm shrinkwrap found, not attempting to update pnpm-workspace.yaml',\n );\n return null;\n }\n const lockFileDir = upath.dirname(pnpmLockFile);\n const pnpmWorkspaceFilePath = upath.join(lockFileDir, 'pnpm-workspace.yaml');\n\n if (!(await localPathExists(pnpmWorkspaceFilePath))) {\n return null;\n }\n\n // use already-updated content when updating the workspace file itself\n const packageFileContent =\n updateArtifactsConfig.packageFileName === pnpmWorkspaceFilePath\n ? updateArtifactsConfig.newPackageFileContent\n : (await readLocalFile(pnpmWorkspaceFilePath, 'utf8'))!;\n const doc = parseDocument(packageFileContent);\n\n if (!doc.get('minimumReleaseAge')) {\n return null;\n }\n\n let updated = false;\n\n for (const upgrade of upgrades) {\n let excludeNode = doc.getIn(['minimumReleaseAgeExclude']) as YAMLSeq | null;\n // v8 ignore next -- TODO: add test #40625\n const newVersion = upgrade.newVersion ?? upgrade.newValue;\n // For pnpm overrides with range selectors (e.g. \"pkg@<=1.0.0\"), depName contains\n // the full key including the selector. Use packageName (bare package name) for\n // minimumReleaseAgeExclude entries which require exact versions only.\n const excludeDepName = upgrade.packageName ?? upgrade.depName;\n\n /* v8 ignore if -- should not happen, adding for type narrowing*/\n if (excludeNode && !isSeq(excludeNode)) {\n return null;\n }\n\n if (!excludeNode) {\n logger.debug('Adding new exclude block');\n excludeNode = doc.createNode([]);\n const newItem = doc.createNode(`${excludeDepName}@${newVersion}`);\n newItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n excludeNode.items.push(newItem);\n doc.set('minimumReleaseAgeExclude', excludeNode);\n updated = true;\n continue;\n }\n\n const {\n item: matchedItem,\n allExcluded,\n malformed,\n } = getMatchedItem(excludeDepName!, excludeNode.items);\n\n if (allExcluded) {\n // still clean up any malformed entries even when a wildcard covers the package\n } else if (malformed && isScalar<string>(matchedItem)) {\n logger.debug(\n { entry: matchedItem.value, excludeDepName, newVersion },\n 'Replacing malformed minimumReleaseAgeExclude entry',\n );\n matchedItem.value = `${excludeDepName}@${newVersion}`;\n matchedItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n updated = true;\n } else if (isScalar<string>(matchedItem)) {\n // if we have a comment before the list, which includes the dependency\n if (excludeNode?.commentBefore?.includes(`${excludeDepName}@`)) {\n // and it doesn't already have the version included in it\n if (\n !minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n excludeNode.commentBefore,\n excludeDepName,\n newVersion,\n )\n ) {\n // then append it\n\n // normalize value (no quote handling needed)\n excludeNode.commentBefore = `${excludeNode.commentBefore} || ${newVersion}`;\n updated = true;\n }\n }\n // otherwise, if it's in our matched item's comment\n else if (matchedItem.commentBefore) {\n // add it\n if (\n !minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n matchedItem.commentBefore,\n excludeDepName,\n newVersion,\n )\n ) {\n // normalize value (no quote handling needed)\n matchedItem.commentBefore = `${matchedItem.commentBefore} || ${newVersion}`;\n updated = true;\n }\n } else {\n matchedItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n updated = true;\n }\n\n if (\n !minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n matchedItem.value,\n excludeDepName,\n newVersion,\n )\n ) {\n matchedItem.value = `${matchedItem.value} || ${newVersion}`;\n updated = true;\n }\n } else {\n // add new entry\n const newItem = doc.createNode(`${excludeDepName}@${newVersion}`);\n newItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n\n excludeNode.items.push(newItem);\n updated = true;\n }\n\n // Remove any malformed entries for the same package left over from the prior bug\n for (let i = excludeNode.items.length - 1; i >= 0; i--) {\n const item = excludeNode.items[i];\n if (\n item !== matchedItem &&\n isScalar(item) &&\n isString(item.value) &&\n item.value.startsWith(`${excludeDepName}@`) &&\n !isValidMinimumReleaseAgeExcludeEntry(item.value, excludeDepName!)\n ) {\n excludeNode.items.splice(i, 1);\n updated = true;\n }\n }\n }\n\n if (!updated) {\n return null;\n }\n\n const newContent = doc.toString();\n await writeLocalFile(pnpmWorkspaceFilePath, newContent);\n\n return {\n file: {\n type: 'addition',\n path: pnpmWorkspaceFilePath,\n contents: newContent,\n },\n };\n}\n\nfunction getMatchedItem(\n depName: string,\n items: unknown[],\n): {\n item: Scalar | null;\n allExcluded: boolean;\n malformed?: boolean;\n} {\n let malformedItem: Scalar | null = null;\n\n for (const item of items) {\n /* v8 ignore if -- should not happen */\n if (!isScalar(item) || !isString(item.value)) {\n continue;\n }\n\n if (item.value.startsWith(`${depName}@`)) {\n if (isValidMinimumReleaseAgeExcludeEntry(item.value, depName)) {\n return {\n allExcluded: false,\n item,\n };\n }\n malformedItem ??= item;\n continue;\n }\n\n if (item.value === depName || matchRegexOrGlob(depName, item.value)) {\n return {\n allExcluded: true,\n item,\n };\n }\n }\n\n if (malformedItem) {\n return {\n allExcluded: false,\n item: malformedItem,\n malformed: true,\n };\n }\n\n return {\n item: null,\n allExcluded: false,\n };\n}\n\n/** pnpm requires package@version entries without range selectors or extra @ in the version part */\nfunction isValidMinimumReleaseAgeExcludeEntry(\n value: string,\n packageName: string,\n): boolean {\n return !value.slice(`${packageName}@`.length).includes('@');\n}\n\n/** determine whether a comment or a list item contains the depName at a given newVersion */\nfunction minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n line: string,\n depName: string | undefined,\n newVersion: string | undefined,\n): boolean {\n if (line.includes(`${depName}@${newVersion}`)) {\n return true;\n }\n\n if (line.includes(`|| ${newVersion}`)) {\n return true;\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;AAgBA,MAAM,2BAA2B;AAGjC,MAAM,eAAe;AAErB,MAAM,+BAA+B;AAErC,eAAsB,gBACpB,uBACyC;CACzC,OAAO,MAAM,uBAAuB,sBAAsB,gBAAgB,EAAE;CAC5E,IAAI,MAA+B,CAAC;CACpC,IAAI,KAAK,aAAa,4BAA4B,qBAAqB,CAAC,CAAC;CACzE,IAAI,KAAK,aAAa,MAAM,oBAAoB,qBAAqB,CAAC,CAAC;CAEvE,MAAM,IAAI,OAAO,gBAAgB;CACjC,IAAI,IAAI,WAAW,GACjB,OAAO;CAGT,OAAO;AACT;;;;;AAMA,SAAS,4BACP,uBAC8B;CAC9B,MAAM,EAAE,iBAAiB,aAAa,0BACpC;CACF,MAAM,uBAAuB,YAAY,MACtC,QAAQ,IAAI,YAAY,gB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EACL,aAAa;EACb,MAAM;EACN,WAAW;CACb;CAGF,OAAO;EACL,MAAM;EACN,aAAa;CACf;AACF;;AAGA,SAAS,qCACP,OACA,aACS;CACT,OAAO,CAAC,MAAM,MAAM,GAAG,YAAY,GAAG,MAAM,CAAC,CAAC,SAAS,GAAG;AAC5D;;AAGA,SAAS,kDACP,MACA,SACA,YACS;CACT,IAAI,KAAK,SAAS,GAAG,QAAQ,GAAG,YAAY,GAC1C,OAAO;CAGT,IAAI,KAAK,SAAS,MAAM,YAAY,GAClC,OAAO;CAGT,OAAO;AACT"}
1
+ {"version":3,"file":"artifacts.js","names":[],"sources":["../../../../lib/modules/manager/npm/artifacts.ts"],"sourcesContent":["import { isEmptyArray, isNonEmptyObject, isString } from '@sindresorhus/is';\nimport upath from 'upath';\nimport type { Scalar, YAMLSeq } from 'yaml';\nimport { isScalar, isSeq, parseDocument } from 'yaml';\nimport { logger } from '../../../logger/index.ts';\nimport {\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport { coerceObject } from '../../../util/object.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { matchRegexOrGlob } from '../../../util/string-match.ts';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\nimport { updateDependency } from './update/dependency/index.ts';\n\n// eg. 8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589\nconst versionWithHashRegString = '^(?<version>.*)\\\\+(?<hash>.*)';\n\n// Matches a Subresource Integrity string, eg. sha512-<base64 digest>\nconst sriRegString = '^(?<algo>sha\\\\d+)-(?<hash>[A-Za-z0-9+/]+={0,2})$';\n\nconst packageManagerFieldRegString = '(\"packageManager\"\\\\s*:\\\\s*\")[^\"]*\"';\n\nexport async function updateArtifacts(\n updateArtifactsConfig: UpdateArtifact,\n): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`npm.updateArtifacts(${updateArtifactsConfig.packageFileName})`);\n let res: UpdateArtifactsResult[] = [];\n res.push(coerceObject(handlePackageManagerUpdates(updateArtifactsConfig)));\n res.push(coerceObject(await updatePnpmWorkspace(updateArtifactsConfig)));\n\n res = res.filter(isNonEmptyObject);\n if (res.length === 0) {\n return null;\n }\n\n return res;\n}\n\n/**\n * Updates corepack hashes in `packageManager` and `devEngines.packageManager` from the new version's integrity digest.\n * @see https://github.com/nodejs/corepack/blob/57bfb67b062ea1b8746b302bcdbf9f8e8438c526/sources/corepackUtils.ts#L300\n */\nfunction handlePackageManagerUpdates(\n updateArtifactsConfig: UpdateArtifact,\n): UpdateArtifactsResult | null {\n const { packageFileName, updatedDeps, newPackageFileContent } =\n updateArtifactsConfig;\n const packageManagerUpdates = updatedDeps.filter(\n (dep) =>\n (dep.depType === 'packageManager' ||\n dep.depType === 'devEngines.packageManager') &&\n dep.currentValue &&\n regEx(versionWithHashRegString).test(dep.currentValue),\n );\n\n let newContent = newPackageFileContent;\n for (const packageManagerUpdate of packageManagerUpdates) {\n const { depName, newVersion, newDigest } = packageManagerUpdate;\n const sriMatch = regEx(sriRegString).exec(newDigest ?? '');\n if (!sriMatch?.groups) {\n logger.warn(\n { packageFileName, depName, newVersion, newDigest },\n 'Cannot update packageManager hash: no valid digest available',\n );\n return {\n artifactError: {\n fileName: packageFileName,\n stderr: `Cannot update packageManager hash for ${depName}@${newVersion}: no valid digest available`,\n },\n };\n }\n\n const { algo, hash } = sriMatch.groups;\n const hexHash = Buffer.from(hash, 'base64').toString('hex');\n const versionWithHash = `${newVersion}+${algo}.${hexHash}`;\n\n if (packageManagerUpdate.depType === 'packageManager') {\n newContent = newContent.replace(\n regEx(packageManagerFieldRegString),\n `$1${depName}@${versionWithHash}\"`,\n );\n } else {\n const updatedContent = updateDependency({\n fileContent: newContent,\n packageFile: packageFileName,\n upgrade: { ...packageManagerUpdate, newValue: versionWithHash },\n });\n if (!updatedContent) {\n return {\n artifactError: {\n fileName: packageFileName,\n stderr: `Failed to apply Corepack hash for ${depName}@${newVersion}`,\n },\n };\n }\n newContent = updatedContent;\n }\n }\n\n if (newContent === newPackageFileContent) {\n return null;\n }\n\n logger.debug('Returning updated package.json');\n return {\n file: {\n type: 'addition',\n path: packageFileName,\n contents: newContent,\n },\n };\n}\n\n/**\n * Update the minimumReleaseAgeExclude setting in pnpm-workspace.yaml if needed\n */\nasync function updatePnpmWorkspace(\n updateArtifactsConfig: UpdateArtifact,\n): Promise<UpdateArtifactsResult | null> {\n const upgrades = updateArtifactsConfig.updatedDeps.filter(\n (u) => u.isVulnerabilityAlert,\n );\n // return early if no security updates are present\n if (isEmptyArray(upgrades)) {\n return null;\n }\n\n const pnpmLockFile = upgrades[0].managerData?.pnpmLockFile;\n if (!isString(pnpmLockFile)) {\n logger.debug(\n 'No pnpm shrinkwrap found, not attempting to update pnpm-workspace.yaml',\n );\n return null;\n }\n const lockFileDir = upath.dirname(pnpmLockFile);\n const pnpmWorkspaceFilePath = upath.join(lockFileDir, 'pnpm-workspace.yaml');\n\n if (!(await localPathExists(pnpmWorkspaceFilePath))) {\n return null;\n }\n\n // use already-updated content when updating the workspace file itself\n const packageFileContent =\n updateArtifactsConfig.packageFileName === pnpmWorkspaceFilePath\n ? updateArtifactsConfig.newPackageFileContent\n : (await readLocalFile(pnpmWorkspaceFilePath, 'utf8'))!;\n const doc = parseDocument(packageFileContent);\n\n if (!doc.get('minimumReleaseAge')) {\n return null;\n }\n\n let updated = false;\n\n for (const upgrade of upgrades) {\n let excludeNode = doc.getIn(['minimumReleaseAgeExclude']) as YAMLSeq | null;\n // v8 ignore next -- TODO: add test #40625\n const newVersion = upgrade.newVersion ?? upgrade.newValue;\n // For pnpm overrides with range selectors (e.g. \"pkg@<=1.0.0\"), depName contains\n // the full key including the selector. Use packageName (bare package name) for\n // minimumReleaseAgeExclude entries which require exact versions only.\n const excludeDepName = upgrade.packageName ?? upgrade.depName;\n\n /* v8 ignore if -- should not happen, adding for type narrowing*/\n if (excludeNode && !isSeq(excludeNode)) {\n return null;\n }\n\n if (!excludeNode) {\n logger.debug('Adding new exclude block');\n excludeNode = doc.createNode([]);\n const newItem = doc.createNode(`${excludeDepName}@${newVersion}`);\n newItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n excludeNode.items.push(newItem);\n doc.set('minimumReleaseAgeExclude', excludeNode);\n updated = true;\n continue;\n }\n\n const {\n item: matchedItem,\n allExcluded,\n malformed,\n } = getMatchedItem(excludeDepName!, excludeNode.items);\n\n if (allExcluded) {\n // still clean up any malformed entries even when a wildcard covers the package\n } else if (malformed && isScalar<string>(matchedItem)) {\n logger.debug(\n { entry: matchedItem.value, excludeDepName, newVersion },\n 'Replacing malformed minimumReleaseAgeExclude entry',\n );\n matchedItem.value = `${excludeDepName}@${newVersion}`;\n matchedItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n updated = true;\n } else if (isScalar<string>(matchedItem)) {\n // if we have a comment before the list, which includes the dependency\n if (excludeNode?.commentBefore?.includes(`${excludeDepName}@`)) {\n // and it doesn't already have the version included in it\n if (\n !minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n excludeNode.commentBefore,\n excludeDepName,\n newVersion,\n )\n ) {\n // then append it\n\n // normalize value (no quote handling needed)\n excludeNode.commentBefore = `${excludeNode.commentBefore} || ${newVersion}`;\n updated = true;\n }\n }\n // otherwise, if it's in our matched item's comment\n else if (matchedItem.commentBefore) {\n // add it\n if (\n !minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n matchedItem.commentBefore,\n excludeDepName,\n newVersion,\n )\n ) {\n // normalize value (no quote handling needed)\n matchedItem.commentBefore = `${matchedItem.commentBefore} || ${newVersion}`;\n updated = true;\n }\n } else {\n matchedItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n updated = true;\n }\n\n if (\n !minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n matchedItem.value,\n excludeDepName,\n newVersion,\n )\n ) {\n matchedItem.value = `${matchedItem.value} || ${newVersion}`;\n updated = true;\n }\n } else {\n // add new entry\n const newItem = doc.createNode(`${excludeDepName}@${newVersion}`);\n newItem.commentBefore = ` Renovate security update: ${excludeDepName}@${newVersion}`;\n\n excludeNode.items.push(newItem);\n updated = true;\n }\n\n // Remove any malformed entries for the same package left over from the prior bug\n for (let i = excludeNode.items.length - 1; i >= 0; i--) {\n const item = excludeNode.items[i];\n if (\n item !== matchedItem &&\n isScalar(item) &&\n isString(item.value) &&\n item.value.startsWith(`${excludeDepName}@`) &&\n !isValidMinimumReleaseAgeExcludeEntry(item.value, excludeDepName!)\n ) {\n excludeNode.items.splice(i, 1);\n updated = true;\n }\n }\n }\n\n if (!updated) {\n return null;\n }\n\n const newContent = doc.toString();\n await writeLocalFile(pnpmWorkspaceFilePath, newContent);\n\n return {\n file: {\n type: 'addition',\n path: pnpmWorkspaceFilePath,\n contents: newContent,\n },\n };\n}\n\nfunction getMatchedItem(\n depName: string,\n items: unknown[],\n): {\n item: Scalar | null;\n allExcluded: boolean;\n malformed?: boolean;\n} {\n let malformedItem: Scalar | null = null;\n\n for (const item of items) {\n /* v8 ignore if -- should not happen */\n if (!isScalar(item) || !isString(item.value)) {\n continue;\n }\n\n if (item.value.startsWith(`${depName}@`)) {\n if (isValidMinimumReleaseAgeExcludeEntry(item.value, depName)) {\n return {\n allExcluded: false,\n item,\n };\n }\n malformedItem ??= item;\n continue;\n }\n\n if (item.value === depName || matchRegexOrGlob(depName, item.value)) {\n return {\n allExcluded: true,\n item,\n };\n }\n }\n\n if (malformedItem) {\n return {\n allExcluded: false,\n item: malformedItem,\n malformed: true,\n };\n }\n\n return {\n item: null,\n allExcluded: false,\n };\n}\n\n/** pnpm requires package@version entries without range selectors or extra @ in the version part */\nfunction isValidMinimumReleaseAgeExcludeEntry(\n value: string,\n packageName: string,\n): boolean {\n return !value.slice(`${packageName}@`.length).includes('@');\n}\n\n/** determine whether a comment or a list item contains the depName at a given newVersion */\nfunction minimumReleaseAgeExcludeIncludesDepNameAndVersion(\n line: string,\n depName: string | undefined,\n newVersion: string | undefined,\n): boolean {\n if (line.includes(`${depName}@${newVersion}`)) {\n return true;\n }\n\n if (line.includes(`|| ${newVersion}`)) {\n return true;\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;AAiBA,MAAM,2BAA2B;AAGjC,MAAM,eAAe;AAErB,MAAM,+BAA+B;AAErC,eAAsB,gBACpB,uBACyC;CACzC,OAAO,MAAM,uBAAuB,sBAAsB,gBAAgB,EAAE;CAC5E,IAAI,MAA+B,CAAC;CACpC,IAAI,KAAK,aAAa,4BAA4B,qBAAqB,CAAC,CAAC;CACzE,IAAI,KAAK,aAAa,MAAM,oBAAoB,qBAAqB,CAAC,CAAC;CAEvE,MAAM,IAAI,OAAO,gBAAgB;CACjC,IAAI,IAAI,WAAW,GACjB,OAAO;CAGT,OAAO;AACT;;;;;AAMA,SAAS,4BACP,uBAC8B;CAC9B,MAAM,EAAE,iBAAiB,aAAa,0BACpC;CACF,MAAM,wBAAwB,YAAY,QACvC,SACE,IAAI,YAAY,oBACf,IAAI,YAAY,gCAClB,IAAI,gBACJ,MAAM,wBAAwB,CAAC,CAAC,KAAK,IAAI,YAAY,CACzD;CAEA,IAAI,aAAa;CACjB,KAAK,MAAM,wBAAwB,uBAAuB;EACxD,MAAM,EAAE,SAAS,YAAY,cAAc;EAC3C,MAAM,WAAW,MAAM,YAAY,CAAC,CAAC,KAAK,aAAa,EAAE;EACzD,IAAI,CAAC,UAAU,QAAQ;GACrB,OAAO,KACL;IAAE;IAAiB;IAAS;IAAY;GAAU,GAClD,8DACF;GACA,OAAO,EACL,eAAe;IACb,UAAU;IACV,QAAQ,yCAAyC,QAAQ,GAAG,WAAW;GACzE,EACF;EACF;EAEA,MAAM,EAAE,MAAM,SAAS,SAAS;EAEhC,MAAM,kBAAkB,GAAG,WAAW,GAAG,KAAK,GAD9B,OAAO,KAAK,MAAM,QAAQ,CAAC,CAAC,SAAS,KACE;EAEvD,IAAI,qBAAqB,YAAY,kBACnC,aAAa,WAAW,QACtB,MAAM,4BAA4B,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epType: "overrides",
57
57
  description: "Listed under `pnpm.overrides`"
58
58
  },
59
+ {
60
+ depType: "devEngines.runtime",
61
+ prettyDepType: "devEngines.runtime",
62
+ description: "Listed under `devEngines.runtime`"
63
+ },
64
+ {
65
+ depType: "devEngines.packageManager",
66
+ prettyDepType: "devEngines.packageManager",
67
+ description: "Listed under `devEngines.packageManager`"
68
+ },
59
69
  {
60
70
  depType: pnpmWorkspaceOverrides,
61
71
  prettyDepType: "overrides",
@@ -1 +1 @@
1
- {"version":3,"file":"dep-types.js","names":[],"sources":["../../../../lib/modules/manager/npm/dep-types.ts"],"sourcesContent":["import type { DepTypeMetadata } from '../types.ts';\n\nexport const pnpmWorkspaceOverrides = 'pnpm-workspace.overrides' as const;\n\nexport const knownDepTypes = [\n {\n depType: 'dependencies',\n prettyDepType: 'dependency',\n description: 'Listed under `dependencies`',\n },\n {\n depType: 'devDependencies',\n prettyDepType: 'devDependency',\n description: 'Listed under `devDependencies`',\n },\n {\n depType: 'optionalDependencies',\n prettyDepType: 'optionalDependency',\n description: 'Listed under `optionalDependencies`',\n },\n {\n depType: 'peerDependencies',\n prettyDepType: 'peerDependency',\n description: 'Listed under `peerDependencies`',\n },\n {\n depType: 'engines',\n prettyDepType: 'engine',\n description: 'Listed under `engines`',\n },\n {\n depType: 'volta',\n prettyDepType: 'volta',\n description: 'Listed under `volta`',\n },\n {\n depType: 'resolutions',\n prettyDepType: 'resolutions',\n description: 'Listed under `resolutions` (Yarn)',\n },\n {\n depType: 'packageManager',\n prettyDepType: 'packageManager',\n description: 'Listed under `packageManager`',\n },\n {\n depType: 'overrides',\n prettyDepType: 'overrides',\n description: 'Listed under `overrides`',\n },\n {\n depType: 'pnpm',\n prettyDepType: 'pnpm',\n description: 'Listed under the top-level `pnpm` field',\n },\n {\n depType: 'pnpm.overrides',\n prettyDepType: 'overrides',\n description: 'Listed under `pnpm.overrides`',\n },\n {\n depType: pnpmWorkspaceOverrides,\n prettyDepType: 'overrides',\n description: 'Listed under `overrides` in a pnpm workspace YAML file',\n },\n] as const satisfies readonly DepTypeMetadata[];\n\nexport const supportsDynamicDepTypesNote =\n 'Additionally, catalog dependencies produce dynamic `depType` values: `pnpm.catalog.<name>` for [pnpm catalogs](https://pnpm.io/catalogs#defining-catalogs) and `yarn.catalog.<name>` for [yarn catalogs](https://yarnpkg.com/features/catalogs).';\n"],"mappings":";AAEA,MAAa,yBAAyB;AAEtC,MAAa,gBAAgB;CAC3B;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;AACF;AAEA,MAAa,8BACX"}
1
+ {"version":3,"file":"dep-types.js","names":[],"sources":["../../../../lib/modules/manager/npm/dep-types.ts"],"sourcesContent":["import type { DepTypeMetadata } from '../types.ts';\n\nexport const pnpmWorkspaceOverrides = 'pnpm-workspace.overrides' as const;\n\nexport const knownDepTypes = [\n {\n depType: 'dependencies',\n prettyDepType: 'dependency',\n description: 'Listed under `dependencies`',\n },\n {\n depType: 'devDependencies',\n prettyDepType: 'devDependency',\n description: 'Listed under `devDependencies`',\n },\n {\n depType: 'optionalDependencies',\n prettyDepType: 'optionalDependency',\n description: 'Listed under `optionalDependencies`',\n },\n {\n depType: 'peerDependencies',\n prettyDepType: 'peerDependency',\n description: 'Listed under `peerDependencies`',\n },\n {\n depType: 'engines',\n prettyDepType: 'engine',\n description: 'Listed under `engines`',\n },\n {\n depType: 'volta',\n prettyDepType: 'volta',\n description: 'Listed under `volta`',\n },\n {\n depType: 'resolutions',\n prettyDepType: 'resolutions',\n description: 'Listed under `resolutions` (Yarn)',\n },\n {\n depType: 'packageManager',\n prettyDepType: 'packageManager',\n description: 'Listed under `packageManager`',\n },\n {\n depType: 'overrides',\n prettyDepType: 'overrides',\n description: 'Listed under `overrides`',\n },\n {\n depType: 'pnpm',\n prettyDepType: 'pnpm',\n description: 'Listed under the top-level `pnpm` field',\n },\n {\n depType: 'pnpm.overrides',\n prettyDepType: 'overrides',\n description: 'Listed under `pnpm.overrides`',\n },\n {\n depType: 'devEngines.runtime',\n prettyDepType: 'devEngines.runtime',\n description: 'Listed under `devEngines.runtime`',\n },\n {\n depType: 'devEngines.packageManager',\n prettyDepType: 'devEngines.packageManager',\n description: 'Listed under `devEngines.packageManager`',\n },\n {\n depType: pnpmWorkspaceOverrides,\n prettyDepType: 'overrides',\n description: 'Listed under `overrides` in a pnpm workspace YAML file',\n },\n] as const satisfies readonly DepTypeMetadata[];\n\nexport const supportsDynamicDepTypesNote =\n 'Additionally, catalog dependencies produce dynamic `depType` values: `pnpm.catalog.<name>` for [pnpm catalogs](https://pnpm.io/catalogs#defining-catalogs) and `yarn.catalog.<name>` for [yarn catalogs](https://yarnpkg.com/features/catalogs).';\n"],"mappings":";AAEA,MAAa,yBAAyB;AAEtC,MAAa,gBAAgB;CAC3B;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;CACA;EACE,SAAS;EACT,eAAe;EACf,aAAa;CACf;AACF;AAEA,MAAa,8BACX"}
@@ -37,7 +37,7 @@ function extractDependency(depType, depName, input) {
37
37
  return dep;
38
38
  }
39
39
  dep.currentValue = input.trim();
40
- if (depType === "engines" || depType === "packageManager") {
40
+ if (depType === "engines" || depType === "packageManager" || depType === "devEngines.runtime" || depType === "devEngines.packageManager") {
41
41
  if (depName === "node") dep.datasource = NodeVersionDatasource.id;
42
42
  else if (depName === "yarn") {
43
43
  dep.datasource = NpmDatasource.id;
@@ -50,6 +50,9 @@ function extractDependency(depType, depName, input) {
50
50
  } else if (depName === "pnpm") {
51
51
  dep.datasource = NpmDatasource.id;
52
52
  dep.commitMessageTopic = "pnpm";
53
+ } else if (depType === "devEngines.runtime" && depName === "deno") {
54
+ dep.datasource = NpmDatasource.id;
55
+ dep.commitMessageTopic = "Deno";
53
56
  } else if (depName === "vscode") {
54
57
  dep.datasource = GithubTagsDatasource.id;
55
58
  dep.packageName = "microsoft/vscode";
@@ -170,7 +173,7 @@ function getExtractedConstraints(deps) {
170
173
  "pnpm",
171
174
  "vscode"
172
175
  ];
173
- for (const dep of deps) if (!dep.skipReason && (dep.depType === "engines" || dep.depType === "packageManager") && dep.depName && isConstraintName(dep.depName) && constraints.includes(dep.depName) && isString(dep.currentValue)) extractedConstraints[dep.depName] = dep.currentValue;
176
+ for (const dep of deps) if (!dep.skipReason && (dep.depType === "engines" || dep.depType === "packageManager" || dep.depType === "devEngines.runtime" || dep.depType === "devEngines.packageManager") && dep.depName && isConstraintName(dep.depName) && constraints.includes(dep.depName) && isString(dep.currentValue)) extractedConstraints[dep.depName] = dep.currentValue;
174
177
  return extractedConstraints;
175
178
  }
176
179
  //#endregion