renovate 44.2.3 → 44.3.1

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.
@@ -2,7 +2,7 @@
2
2
  import { require_punycode } from "./punycode.js";
3
3
  import { pkg } from "./expose.js";
4
4
  import { getEnv } from "./util/env.js";
5
- import { regEx } from "./util/regex.js";
5
+ import { regEx, regexEngineStatus } from "./util/regex.js";
6
6
  import { getConfigFileNames } from "./config/app-strings.js";
7
7
  import { GlobalConfig } from "./config/global.js";
8
8
  import { init, logger } from "./logger/index.js";
@@ -100,6 +100,8 @@ If you have specified global self-hosted configuration (https://docs.renovatebot
100
100
  program.action(async (files, opts) => {
101
101
  const strict = opts.strict ?? false;
102
102
  let filesValidated = 0;
103
+ if (regexEngineStatus.type === "unavailable") logger.warn({ err: regexEngineStatus.err }, "RE2 not usable, falling back to RegExp: regex validation may be inaccurate");
104
+ else if (regexEngineStatus.type === "ignored") logger.debug("RE2 ignored via RENOVATE_X_IGNORE_RE2: regex validation may be inaccurate");
103
105
  if (files.length) {
104
106
  let isGlobalConfig = true;
105
107
  if (opts.global === false) isGlobalConfig = false;
@@ -1 +1 @@
1
- {"version":3,"file":"config-validator.js","names":["getFileConfig"],"sources":["../lib/config-validator.ts"],"sourcesContent":["#!/usr/bin/env node\nimport 'source-map-support/register.js';\nimport './punycode.cjs';\n\nimport { styleText } from 'node:util';\nimport { isNonEmptyStringAndNotWhitespace } from '@sindresorhus/is';\nimport { Command, CommanderError } from 'commander';\nimport { dequal } from 'dequal';\nimport { diffLines } from 'diff';\nimport fs from 'fs-extra';\nimport { getConfigFileNames } from './config/app-strings.ts';\nimport { GlobalConfig } from './config/global.ts';\nimport { massageConfig } from './config/massage.ts';\nimport { migrateConfig } from './config/migration.ts';\nimport type { RenovateConfig } from './config/types.ts';\nimport { validateConfig } from './config/validation.ts';\nimport { pkg } from './expose.ts';\nimport { init, logger } from './logger/index.ts';\nimport { getEnv } from './util/env.ts';\nimport { add as addHostRule } from './util/host-rules.ts';\nimport { regEx } from './util/regex.ts';\nimport { getConfig as getFileConfig } from './workers/global/config/parse/file.ts';\nimport { parseConfigs } from './workers/global/config/parse/index.ts';\nimport { getParsedContent } from './workers/global/config/parse/util.ts';\n\nawait init();\n\nconst { pathExists, readFile } = fs;\n\nlet returnVal = 0;\n\n/**\n * Make sure that we've resolved configuration from the different places that Renovate users would expect them to be specified\n *\n * This then allows a `configType=repo` config to i.e. be validated alongside a `config.js` or `env RENOVATE_ALLOWED_COMMANDS=...`\n *\n * Note that we intentionally don't fully initialize Renovate and its modules, as we're not fully running, and it would require a Platform to be configured\n * */\nasync function partiallyGlobalInitialize(): Promise<void> {\n // NOTE that this doesn't allow command-line arguments\n const globalConfig = await parseConfigs(getEnv(), []);\n GlobalConfig.set(globalConfig);\n\n if (globalConfig.hostRules) {\n for (const hostRule of globalConfig.hostRules) {\n addHostRule(hostRule);\n }\n }\n}\n\nasync function validate(\n configType: 'global' | 'repo',\n desc: string,\n config: RenovateConfig,\n strict: boolean,\n isPreset = false,\n): Promise<void> {\n if (config.hostRules) {\n for (const hostRule of config.hostRules) {\n addHostRule(hostRule);\n }\n }\n const { isMigrated, migratedConfig } = migrateConfig(config);\n if (isMigrated) {\n logger.warn(\n {\n oldConfig: config,\n newConfig: migratedConfig,\n },\n 'Config migration necessary',\n );\n const changedObjects = diffLines(\n JSON.stringify(config, null, 2),\n JSON.stringify(migratedConfig, null, 2),\n { ignoreWhitespace: false, newlineIsToken: false },\n );\n const added = styleText('green', '+ ');\n const removed = styleText('red', '- ');\n const msg = changedObjects\n .flatMap((part) => {\n let linePrefix: string;\n if (part.added) {\n linePrefix = added;\n } else if (part.removed) {\n linePrefix = removed;\n } else {\n linePrefix = ' ';\n }\n return part.value\n .split('\\n')\n .filter(isNonEmptyStringAndNotWhitespace)\n .map((line) =>\n line.replace(regEx(/^(?<ws> *)/), `${linePrefix}$<ws>`),\n );\n })\n .join('\\n');\n // oxlint-disable-next-line renovate/logger-static-message -- the multi-line, colorized diff must be interpolated to stay readable; as a metadata field it is JSON-escaped onto one line\n logger.warn(`Config migration diff:\\n${msg}`);\n if (strict) {\n returnVal = 1;\n }\n }\n const massagedConfig = massageConfig(migratedConfig);\n const res = await validateConfig(configType, massagedConfig, isPreset);\n if (res.errors.length) {\n logger.error(\n { file: desc, errors: res.errors },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n if (res.warnings.length) {\n logger.warn(\n { file: desc, warnings: res.warnings },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n}\n\ninterface PackageJson {\n renovate?: RenovateConfig;\n 'renovate-config'?: Record<string, RenovateConfig>;\n}\n\n(async () => {\n await partiallyGlobalInitialize();\n\n const program = new Command('renovate-config-validator')\n .summary('Validate Renovate configuration files')\n .description(\n `Validate your Renovate configuration (repo config, shared presets or global configuration) files\\n` +\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n 'If no [config-files...] are given, renovate-config-validator will look at the default config file locations (https://docs.renovatebot.com/configuration-options/)',\n )\n .addHelpText(\n 'after',\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n `\nWhen specifying [config-files...], Renovate will treat them as global self-hosted configuration files. You can disable this behaviour with --no-global\n\nExamples:\n\n $ renovate-config-validator\n $ renovate-config-validator --strict\n $ renovate-config-validator first_config.json\n $ renovate-config-validator --strict config.js\n $ renovate-config-validator --no-global renovate.json5\n $ env RENOVATE_CONFIG_FILE=obscure-name.json renovate-config-validator\n\nGlobal configuration:\n\nIf you have specified global self-hosted configuration (https://docs.renovatebot.com/self-hosted-configuration/) in environment variables or in a \\`config.js\\`, this will be detected:\n\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator\n # if passing the filename, make sure it's not validating as a global config\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator --no-global renovate.json`,\n )\n .argument('[config-files...]')\n .version(pkg.version, '-v, --version')\n .option(\n '--strict',\n 'Fail command if any configuration warnings, errors, or a migration is needed',\n )\n .option(\n '--no-global',\n 'When specifying [config-files], do not treat them as global self-hosted configuration file(s)',\n true,\n )\n // allow us to manage the exit code\n .exitOverride();\n\n program.action(async (files, opts) => {\n const strict = opts.strict ?? false;\n let filesValidated = 0;\n\n if (files.length) {\n let isGlobalConfig = true;\n if (opts.global === false) {\n isGlobalConfig = false;\n }\n const configType = isGlobalConfig ? 'global' : 'repo';\n for (const file of files) {\n try {\n if (!(await pathExists(file))) {\n returnVal = 1;\n logger.error({ file }, 'File does not exist');\n break;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file} as ${configType} config`);\n await validate(configType, file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n } else {\n for (const file of getConfigFileNames().filter(\n (name) => name !== 'package.json',\n )) {\n try {\n if (!(await pathExists(file))) {\n continue;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file}`);\n await validate('repo', file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n try {\n const pkgJson = JSON.parse(\n await readFile('package.json', 'utf8'),\n ) as PackageJson;\n if (pkgJson.renovate) {\n logger.info(`Validating package.json > renovate`);\n await validate(\n 'repo',\n 'package.json > renovate',\n pkgJson.renovate,\n strict,\n );\n\n filesValidated++;\n }\n if (pkgJson['renovate-config']) {\n logger.info(`Validating package.json > renovate-config`);\n for (const presetConfig of Object.values(\n pkgJson['renovate-config'],\n )) {\n await validate(\n 'repo',\n 'package.json > renovate-config',\n presetConfig,\n strict,\n true,\n );\n\n filesValidated++;\n }\n }\n } catch {\n // ignore\n }\n try {\n const env = getEnv();\n const fileConfig = await getFileConfig(env);\n if (!dequal(fileConfig, {})) {\n const file = env.RENOVATE_CONFIG_FILE ?? 'config.js';\n logger.info(`Validating ${file}`);\n try {\n await validate('global', file, fileConfig, strict);\n } catch (err) {\n logger.error({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n filesValidated++;\n }\n } catch {\n // ignore\n }\n }\n if (returnVal === 0 && filesValidated) {\n logger.info(\n `Config validated successfully against ${filesValidated} file(s)`,\n );\n } else if (!filesValidated) {\n logger.warn(`No files to perform configuration validation against`);\n }\n // Use exitCode (not process.exit) so async log streams can flush\n process.exitCode = returnVal;\n });\n\n await program.parseAsync();\n})().catch((e) => {\n // Commander throws an error at the end of Action execution i.e. as part of the `help` and `version` commands, and so we don't want to return an error code in this case\n if (\n e instanceof CommanderError &&\n (e.code === 'commander.helpDisplayed' || e.code === 'commander.version')\n ) {\n return;\n }\n\n // oxlint-disable-next-line no-console -- intentional: display critical error on CLI\n console.error(e);\n process.exit(99);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,KAAK;AAEX,MAAM,EAAE,YAAY,aAAa;AAEjC,IAAI,YAAY;;;;;;;;AAShB,eAAe,4BAA2C;CAExD,MAAM,eAAe,MAAM,aAAa,OAAO,GAAG,CAAC,CAAC;CACpD,aAAa,IAAI,YAAY;CAE7B,IAAI,aAAa,WACf,KAAK,MAAM,YAAY,aAAa,WAClC,IAAY,QAAQ;AAG1B;AAEA,eAAe,SACb,YACA,MACA,QACA,QACA,WAAW,OACI;CACf,IAAI,OAAO,WACT,KAAK,MAAM,YAAY,OAAO,WAC5B,IAAY,QAAQ;CAGxB,MAAM,EAAE,YAAY,mBAAmB,cAAc,MAAM;CAC3D,IAAI,YAAY;EACd,OAAO,KACL;GACE,WAAW;GACX,WAAW;EACb,GACA,4BACF;EACA,MAAM,iBAAiB,UACrB,KAAK,UAAU,QAAQ,MAAM,CAAC,GAC9B,KAAK,UAAU,gBAAgB,MAAM,CAAC,GACtC;G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AO,OAChC,QAAQ,kBACV,GAAG;MACD,MAAM,SACJ,QACA,kCACA,cACA,QACA,IACF;MAEA;KACF;IACF;GACF,QAAQ,CAER;GACA,IAAI;IACF,MAAM,MAAM,OAAO;IACnB,MAAM,aAAa,MAAMA,UAAc,GAAG;IAC1C,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC,GAAG;KAC3B,MAAM,OAAO,IAAI,wBAAwB;KACzC,OAAO,KAAK,cAAc,MAAM;KAChC,IAAI;MACF,MAAM,SAAS,UAAU,MAAM,YAAY,MAAM;KACnD,SAAS,KAAK;MACZ,OAAO,MAAM;OAAE;OAAM;MAAI,GAAG,mCAAmC;MAC/D,YAAY;KACd;KACA;IACF;GACF,QAAQ,CAER;EACF;EACA,IAAI,cAAc,KAAK,gBACrB,OAAO,KACL,yCAAyC,eAAe,SAC1D;OACK,IAAI,CAAC,gBACV,OAAO,KAAK,sDAAsD;EAGpE,QAAQ,WAAW;CACrB,CAAC;CAED,MAAM,QAAQ,WAAW;AAC3B,EAAA,CAAG,CAAC,CAAC,OAAO,MAAM;CAEhB,IACE,aAAa,mBACZ,EAAE,SAAS,6BAA6B,EAAE,SAAS,sBAEpD;CAIF,QAAQ,MAAM,CAAC;CACf,QAAQ,KAAK,EAAE;AACjB,CAAC"}
1
+ {"version":3,"file":"config-validator.js","names":["getFileConfig"],"sources":["../lib/config-validator.ts"],"sourcesContent":["#!/usr/bin/env node\nimport 'source-map-support/register.js';\nimport './punycode.cjs';\n\nimport { styleText } from 'node:util';\nimport { isNonEmptyStringAndNotWhitespace } from '@sindresorhus/is';\nimport { Command, CommanderError } from 'commander';\nimport { dequal } from 'dequal';\nimport { diffLines } from 'diff';\nimport fs from 'fs-extra';\nimport { getConfigFileNames } from './config/app-strings.ts';\nimport { GlobalConfig } from './config/global.ts';\nimport { massageConfig } from './config/massage.ts';\nimport { migrateConfig } from './config/migration.ts';\nimport type { RenovateConfig } from './config/types.ts';\nimport { validateConfig } from './config/validation.ts';\nimport { pkg } from './expose.ts';\nimport { init, logger } from './logger/index.ts';\nimport { getEnv } from './util/env.ts';\nimport { add as addHostRule } from './util/host-rules.ts';\nimport { regEx, regexEngineStatus } from './util/regex.ts';\nimport { getConfig as getFileConfig } from './workers/global/config/parse/file.ts';\nimport { parseConfigs } from './workers/global/config/parse/index.ts';\nimport { getParsedContent } from './workers/global/config/parse/util.ts';\n\nawait init();\n\nconst { pathExists, readFile } = fs;\n\nlet returnVal = 0;\n\n/**\n * Make sure that we've resolved configuration from the different places that Renovate users would expect them to be specified\n *\n * This then allows a `configType=repo` config to i.e. be validated alongside a `config.js` or `env RENOVATE_ALLOWED_COMMANDS=...`\n *\n * Note that we intentionally don't fully initialize Renovate and its modules, as we're not fully running, and it would require a Platform to be configured\n * */\nasync function partiallyGlobalInitialize(): Promise<void> {\n // NOTE that this doesn't allow command-line arguments\n const globalConfig = await parseConfigs(getEnv(), []);\n GlobalConfig.set(globalConfig);\n\n if (globalConfig.hostRules) {\n for (const hostRule of globalConfig.hostRules) {\n addHostRule(hostRule);\n }\n }\n}\n\nasync function validate(\n configType: 'global' | 'repo',\n desc: string,\n config: RenovateConfig,\n strict: boolean,\n isPreset = false,\n): Promise<void> {\n if (config.hostRules) {\n for (const hostRule of config.hostRules) {\n addHostRule(hostRule);\n }\n }\n const { isMigrated, migratedConfig } = migrateConfig(config);\n if (isMigrated) {\n logger.warn(\n {\n oldConfig: config,\n newConfig: migratedConfig,\n },\n 'Config migration necessary',\n );\n const changedObjects = diffLines(\n JSON.stringify(config, null, 2),\n JSON.stringify(migratedConfig, null, 2),\n { ignoreWhitespace: false, newlineIsToken: false },\n );\n const added = styleText('green', '+ ');\n const removed = styleText('red', '- ');\n const msg = changedObjects\n .flatMap((part) => {\n let linePrefix: string;\n if (part.added) {\n linePrefix = added;\n } else if (part.removed) {\n linePrefix = removed;\n } else {\n linePrefix = ' ';\n }\n return part.value\n .split('\\n')\n .filter(isNonEmptyStringAndNotWhitespace)\n .map((line) =>\n line.replace(regEx(/^(?<ws> *)/), `${linePrefix}$<ws>`),\n );\n })\n .join('\\n');\n // oxlint-disable-next-line renovate/logger-static-message -- the multi-line, colorized diff must be interpolated to stay readable; as a metadata field it is JSON-escaped onto one line\n logger.warn(`Config migration diff:\\n${msg}`);\n if (strict) {\n returnVal = 1;\n }\n }\n const massagedConfig = massageConfig(migratedConfig);\n const res = await validateConfig(configType, massagedConfig, isPreset);\n if (res.errors.length) {\n logger.error(\n { file: desc, errors: res.errors },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n if (res.warnings.length) {\n logger.warn(\n { file: desc, warnings: res.warnings },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n}\n\ninterface PackageJson {\n renovate?: RenovateConfig;\n 'renovate-config'?: Record<string, RenovateConfig>;\n}\n\n(async () => {\n await partiallyGlobalInitialize();\n\n const program = new Command('renovate-config-validator')\n .summary('Validate Renovate configuration files')\n .description(\n `Validate your Renovate configuration (repo config, shared presets or global configuration) files\\n` +\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n 'If no [config-files...] are given, renovate-config-validator will look at the default config file locations (https://docs.renovatebot.com/configuration-options/)',\n )\n .addHelpText(\n 'after',\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n `\nWhen specifying [config-files...], Renovate will treat them as global self-hosted configuration files. You can disable this behaviour with --no-global\n\nExamples:\n\n $ renovate-config-validator\n $ renovate-config-validator --strict\n $ renovate-config-validator first_config.json\n $ renovate-config-validator --strict config.js\n $ renovate-config-validator --no-global renovate.json5\n $ env RENOVATE_CONFIG_FILE=obscure-name.json renovate-config-validator\n\nGlobal configuration:\n\nIf you have specified global self-hosted configuration (https://docs.renovatebot.com/self-hosted-configuration/) in environment variables or in a \\`config.js\\`, this will be detected:\n\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator\n # if passing the filename, make sure it's not validating as a global config\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator --no-global renovate.json`,\n )\n .argument('[config-files...]')\n .version(pkg.version, '-v, --version')\n .option(\n '--strict',\n 'Fail command if any configuration warnings, errors, or a migration is needed',\n )\n .option(\n '--no-global',\n 'When specifying [config-files], do not treat them as global self-hosted configuration file(s)',\n true,\n )\n // allow us to manage the exit code\n .exitOverride();\n\n program.action(async (files, opts) => {\n const strict = opts.strict ?? false;\n let filesValidated = 0;\n\n // without RE2, patterns are checked by RegExp, which accepts syntax RE2 rejects (e.g. lookahead)\n if (regexEngineStatus.type === 'unavailable') {\n logger.warn(\n { err: regexEngineStatus.err },\n 'RE2 not usable, falling back to RegExp: regex validation may be inaccurate',\n );\n } else if (regexEngineStatus.type === 'ignored') {\n logger.debug(\n 'RE2 ignored via RENOVATE_X_IGNORE_RE2: regex validation may be inaccurate',\n );\n }\n\n if (files.length) {\n let isGlobalConfig = true;\n if (opts.global === false) {\n isGlobalConfig = false;\n }\n const configType = isGlobalConfig ? 'global' : 'repo';\n for (const file of files) {\n try {\n if (!(await pathExists(file))) {\n returnVal = 1;\n logger.error({ file }, 'File does not exist');\n break;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file} as ${configType} config`);\n await validate(configType, file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n } else {\n for (const file of getConfigFileNames().filter(\n (name) => name !== 'package.json',\n )) {\n try {\n if (!(await pathExists(file))) {\n continue;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file}`);\n await validate('repo', file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n try {\n const pkgJson = JSON.parse(\n await readFile('package.json', 'utf8'),\n ) as PackageJson;\n if (pkgJson.renovate) {\n logger.info(`Validating package.json > renovate`);\n await validate(\n 'repo',\n 'package.json > renovate',\n pkgJson.renovate,\n strict,\n );\n\n filesValidated++;\n }\n if (pkgJson['renovate-config']) {\n logger.info(`Validating package.json > renovate-config`);\n for (const presetConfig of Object.values(\n pkgJson['renovate-config'],\n )) {\n await validate(\n 'repo',\n 'package.json > renovate-config',\n presetConfig,\n strict,\n true,\n );\n\n filesValidated++;\n }\n }\n } catch {\n // ignore\n }\n try {\n const env = getEnv();\n const fileConfig = await getFileConfig(env);\n if (!dequal(fileConfig, {})) {\n const file = env.RENOVATE_CONFIG_FILE ?? 'config.js';\n logger.info(`Validating ${file}`);\n try {\n await validate('global', file, fileConfig, strict);\n } catch (err) {\n logger.error({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n filesValidated++;\n }\n } catch {\n // ignore\n }\n }\n if (returnVal === 0 && filesValidated) {\n logger.info(\n `Config validated successfully against ${filesValidated} file(s)`,\n );\n } else if (!filesValidated) {\n logger.warn(`No files to perform configuration validation against`);\n }\n // Use exitCode (not process.exit) so async log streams can flush\n process.exitCode = returnVal;\n });\n\n await program.parseAsync();\n})().catch((e) => {\n // Commander throws an error at the end of Action execution i.e. as part of the `help` and `version` commands, and so we don't want to return an error code in this case\n if (\n e instanceof CommanderError &&\n (e.code === 'commander.helpDisplayed' || e.code === 'commander.version')\n ) {\n return;\n }\n\n // oxlint-disable-next-line no-console -- intentional: display critical error on CLI\n console.error(e);\n process.exit(99);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,KAAK;AAEX,MAAM,EAAE,YAAY,aAAa;AAEjC,IAAI,YAAY;;;;;;;;AAShB,eAAe,4BAA2C;CAExD,MAAM,eAAe,MAAM,aAAa,OAAO,GAAG,CAAC,CAAC;CACpD,aAAa,IAAI,YAAY;CAE7B,IAAI,aAAa,WACf,KAAK,MAAM,YAAY,aAAa,WAClC,IAAY,QAAQ;AAG1B;AAE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KAAK,EAAE;AACjB,CAAC"}
@@ -87,7 +87,7 @@ hashMap.set("pip_setup", "0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164
87
87
  hashMap.set("pipenv", "c24f2023a5eb779433c688d66887754e1b1a5658175e4fdf7a51762c079dabf8");
88
88
  hashMap.set("pixi", "3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393");
89
89
  hashMap.set("poetry", "60965cf6f1addb4ebb43531b12138fc90560c5145530a69529719325b443cc62");
90
- hashMap.set("pre-commit", "d191792fe6a89025de644421e9e6391c4048f10bf8e46421c676290a35c9e587");
90
+ hashMap.set("pre-commit", "17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615");
91
91
  hashMap.set("proto", "412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843");
92
92
  hashMap.set("pub", "a0b659f470dab05555cea82da60d414641678555c0bec213b3206b3ae3ead011");
93
93
  hashMap.set("puppet", "ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45");
@@ -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','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','0407066010ebb3d7ad4c1afe6b9a3615a3c11d64dc3cf0674cb9dfc3ea272273');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','40f6a862b4e72fcc7262ee41f8b570ea3fd5600d6d552b94ed3301bb201f5db5');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','f2d5b0a7c0c724d30e79e12688b1fc8ff8e344db0cc6389553e2f6001ddf8345');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','629eda7bc52772bcc5b9c7254ce43a4d0a109c8473ba7633235020193102fd1e');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','197fa953327d70c12fad864eacc4c2f25b8d92dcb7e7e6d19bdda473f650f786');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','38b7fdc82d1d5583870707a04c334aa6dd725b13648febddebed35ce888ca017');\nhashMap.set('composer','829e1483e9519e9ff8d33e40f18a3e3be87ad4a328e32dc1cfb42655709796f8');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','06a52206ba5542f99f056c832245196afd4b78bffeca088f710a5df958a9693d');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','db87814a407e43b8edaf7ccdf1659407fd934597e4253a3f330b8219dc34c40e');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','79fa6ec15676108739e468f43746b1174528ed97cf7e3a2ac3758993141d326d');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','2d12dc3bd8bb6d866843b48af2fd6594a99f4b2d6bc52613ff2b14642b78b466');\nhashMap.set('github-actions','bf60b140ea6a9424da6ddb267e434410be704be5d60b8fb6f543c5c786838a6a');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','0e0ecc704a4c0370ac36f5592c1d0def1581ffb0df6d14114cef009b0365f84c');\nhashMap.set('gradle','62e769489ed98a4635c0f7e4dd839845d3cf487d76a68442eb2b7fe832fcd150');\nhashMap.set('gradle-wrapper','81760ab88a1bed36b0381684396934cf7875e3466c01df8c98f410173f3168f4');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','3530f56b6a558f65d0143d19ef2fbc3f5a08e0a4955e636742ad58f5e0cb5205');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','3131b36223c8ee5b04f30f9de86f95e1d7f5bba83e60ba619e1592311a3a49d3');\nhashMap.set('hermit','cdc0007b3612f91a1fa61a9fa137096555014638c75ea8d5465bf71fd6ff6125');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','4023ef4cac55fe58f8d9744ae86b13532298926e35e22d250334cde55c3386ff');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','95f662ce196b95ee87845488d944cc046f6eb53ac6e10d90581735cd2f7c2d8c');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','1d4470230400ee4c1cb546cbe4fec3426f25a81425d8c555a3f60a42add403e0');\nhashMap.set('mix','bedc1c384159dc19663827a9a3da0f195a5d4122b60ec5749cd3144cef339371');\nhashMap.set('nix','5c2a27c9525894185d93b81e54eeb663bc2f6192853b220f56211c56e87d8379');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','feb2afcb489654db8809924b68f5c56249505f89677cdb1a3068b8a1f99290ed');\nhashMap.set('nuget','8afbf267843d2d318f0f15120e12fa68d0c678e2686d0afb16b0df69db11ba34');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','51043455b93c421cc32abd87b289dac173d8e61f5155c8413c4e2769d03fb22d');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','52f0aa7c0b2ae5af6c649f7d7dd7202e257887c4f4497a0b70eb3384e349e7de');\nhashMap.set('pip_requirements','133115d094c35139584fd08e20b8a60bfc99de4e82e30020e4acb3c2f33a1a5b');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','c24f2023a5eb779433c688d66887754e1b1a5658175e4fdf7a51762c079dabf8');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','60965cf6f1addb4ebb43531b12138fc90560c5145530a69529719325b443cc62');\nhashMap.set('pre-commit','d191792fe6a89025de644421e9e6391c4048f10bf8e46421c676290a35c9e587');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','a0b659f470dab05555cea82da60d414641678555c0bec213b3206b3ae3ead011');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e355e13e104351a8b3516a8e272fc5f7e625c9f39b0c492ba27283a36227c2d4');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','e957f1f1563af4e5fbd1c552ca15632b7808d9d2e51ec0da6022a1f84372caec');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','56cdc6fe4cd00519f953459f94323c71677f6bde007537eef891154fb8696db1');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','3dc2e8342e5e4ddf0f1cf1910567f13c4cfb20b9eaf375ee522f67946fe3e368');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','ef3374fc0a3d3457172b0ce77bfca120e8044b6fd4fa942348fb837f6023360c');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7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EAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
1
+ {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','0407066010ebb3d7ad4c1afe6b9a3615a3c11d64dc3cf0674cb9dfc3ea272273');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','40f6a862b4e72fcc7262ee41f8b570ea3fd5600d6d552b94ed3301bb201f5db5');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','f2d5b0a7c0c724d30e79e12688b1fc8ff8e344db0cc6389553e2f6001ddf8345');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','629eda7bc52772bcc5b9c7254ce43a4d0a109c8473ba7633235020193102fd1e');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','197fa953327d70c12fad864eacc4c2f25b8d92dcb7e7e6d19bdda473f650f786');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','38b7fdc82d1d5583870707a04c334aa6dd725b13648febddebed35ce888ca017');\nhashMap.set('composer','829e1483e9519e9ff8d33e40f18a3e3be87ad4a328e32dc1cfb42655709796f8');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','06a52206ba5542f99f056c832245196afd4b78bffeca088f710a5df958a9693d');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','db87814a407e43b8edaf7ccdf1659407fd934597e4253a3f330b8219dc34c40e');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','79fa6ec15676108739e468f43746b1174528ed97cf7e3a2ac3758993141d326d');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','2d12dc3bd8bb6d866843b48af2fd6594a99f4b2d6bc52613ff2b14642b78b466');\nhashMap.set('github-actions','bf60b140ea6a9424da6ddb267e434410be704be5d60b8fb6f543c5c786838a6a');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','0e0ecc704a4c0370ac36f5592c1d0def1581ffb0df6d14114cef009b0365f84c');\nhashMap.set('gradle','62e769489ed98a4635c0f7e4dd839845d3cf487d76a68442eb2b7fe832fcd150');\nhashMap.set('gradle-wrapper','81760ab88a1bed36b0381684396934cf7875e3466c01df8c98f410173f3168f4');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','3530f56b6a558f65d0143d19ef2fbc3f5a08e0a4955e636742ad58f5e0cb5205');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','3131b36223c8ee5b04f30f9de86f95e1d7f5bba83e60ba619e1592311a3a49d3');\nhashMap.set('hermit','cdc0007b3612f91a1fa61a9fa137096555014638c75ea8d5465bf71fd6ff6125');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','4023ef4cac55fe58f8d9744ae86b13532298926e35e22d250334cde55c3386ff');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','95f662ce196b95ee87845488d944cc046f6eb53ac6e10d90581735cd2f7c2d8c');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','1d4470230400ee4c1cb546cbe4fec3426f25a81425d8c555a3f60a42add403e0');\nhashMap.set('mix','bedc1c384159dc19663827a9a3da0f195a5d4122b60ec5749cd3144cef339371');\nhashMap.set('nix','5c2a27c9525894185d93b81e54eeb663bc2f6192853b220f56211c56e87d8379');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','feb2afcb489654db8809924b68f5c56249505f89677cdb1a3068b8a1f99290ed');\nhashMap.set('nuget','8afbf267843d2d318f0f15120e12fa68d0c678e2686d0afb16b0df69db11ba34');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','51043455b93c421cc32abd87b289dac173d8e61f5155c8413c4e2769d03fb22d');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','52f0aa7c0b2ae5af6c649f7d7dd7202e257887c4f4497a0b70eb3384e349e7de');\nhashMap.set('pip_requirements','133115d094c35139584fd08e20b8a60bfc99de4e82e30020e4acb3c2f33a1a5b');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','c24f2023a5eb779433c688d66887754e1b1a5658175e4fdf7a51762c079dabf8');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','60965cf6f1addb4ebb43531b12138fc90560c5145530a69529719325b443cc62');\nhashMap.set('pre-commit','17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','a0b659f470dab05555cea82da60d414641678555c0bec213b3206b3ae3ead011');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e355e13e104351a8b3516a8e272fc5f7e625c9f39b0c492ba27283a36227c2d4');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','e957f1f1563af4e5fbd1c552ca15632b7808d9d2e51ec0da6022a1f84372caec');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','56cdc6fe4cd00519f953459f94323c71677f6bde007537eef891154fb8696db1');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','3dc2e8342e5e4ddf0f1cf1910567f13c4cfb20b9eaf375ee522f67946fe3e368');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','ef3374fc0a3d3457172b0ce77bfca120e8044b6fd4fa942348fb837f6023360c');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','efd520a9f674c6dcd4edde61e8d14ddbb29a60b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,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
@@ -3,6 +3,7 @@ import { logger } from "../../../logger/index.js";
3
3
  import { find } from "../../../util/host-rules.js";
4
4
  import { detectPlatform } from "../../../util/common.js";
5
5
  import { parseSingleYaml } from "../../../util/yaml.js";
6
+ import { ForgejoTagsDatasource } from "../../datasource/forgejo-tags/index.js";
6
7
  import { GithubTagsDatasource } from "../../datasource/github-tags/index.js";
7
8
  import { GitlabTagsDatasource } from "../../datasource/gitlab-tags/index.js";
8
9
  import { extractDependency as extractDependency$1 } from "../npm/extract/common/dependency.js";
@@ -22,7 +23,18 @@ import { isEmptyObject, isNonEmptyObject, isPlainObject } from "@sindresorhus/is
22
23
  * In that case, the hostname is passed on as registryUrl to the corresponding datasource.
23
24
  */
24
25
  function determineDatasource(repository, hostname) {
25
- if (hostname === "github.com" || detectPlatform(repository) === "github") {
26
+ const platform = detectPlatform(repository);
27
+ if (platform === "forgejo") {
28
+ logger.debug({
29
+ repository,
30
+ hostname
31
+ }, "Found forgejo dependency with custom registryUrl");
32
+ return {
33
+ datasource: ForgejoTagsDatasource.id,
34
+ registryUrls: [`https://${hostname}`]
35
+ };
36
+ }
37
+ if (hostname === "github.com" || platform === "github") {
26
38
  logger.debug({
27
39
  repository,
28
40
  hostname
@@ -36,7 +48,7 @@ function determineDatasource(repository, hostname) {
36
48
  }, "Found gitlab dependency");
37
49
  return { datasource: GitlabTagsDatasource.id };
38
50
  }
39
- if (detectPlatform(repository) === "gitlab") {
51
+ if (platform === "gitlab") {
40
52
  logger.debug({
41
53
  repository,
42
54
  hostname
@@ -57,7 +69,11 @@ function determineDatasource(repository, hostname) {
57
69
  registryUrls: [hostname]
58
70
  };
59
71
  }
60
- for (const [hostType, sourceId] of [["github", GithubTagsDatasource.id], ["gitlab", GitlabTagsDatasource.id]]) if (isNonEmptyObject(find({
72
+ for (const [hostType, sourceId] of [
73
+ ["forgejo", ForgejoTagsDatasource.id],
74
+ ["github", GithubTagsDatasource.id],
75
+ ["gitlab", GitlabTagsDatasource.id]
76
+ ]) if (isNonEmptyObject(find({
61
77
  hostType,
62
78
  url: hostUrl
63
79
  }))) {
@@ -74,7 +90,7 @@ function determineDatasource(repository, hostname) {
74
90
  logger.debug({
75
91
  repository,
76
92
  registry: hostUrl
77
- }, "Provided hostname did not match any of the hostRules of hostType github nor gitlab");
93
+ }, "Provided hostname did not match any of the hostRules of hostType forgejo, github nor gitlab");
78
94
  return {
79
95
  skipReason: "unknown-registry",
80
96
  registryUrls: [hostname]
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","names":["npmExtractDependency"],"sources":["../../../../lib/modules/manager/pre-commit/extract.ts"],"sourcesContent":["import {\n isEmptyObject,\n isNonEmptyObject,\n isPlainObject,\n} from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport type { SkipReason } from '../../../types/index.ts';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { find } from '../../../util/host-rules.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport { parseSingleYaml } from '../../../util/yaml.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { parseLine } from '../gomod/line-parser.ts';\nimport { extractDependency as npmExtractDependency } from '../npm/extract/common/dependency.ts';\nimport { pep508ToPackageDependency } from '../pep621/utils.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport {\n matchesPrecommitConfigHeuristic,\n matchesPrecommitDependencyHeuristic,\n} from './parsing.ts';\nimport type { PreCommitConfig } from './types.ts';\n\n/**\n * Determines the datasource(id) to be used for this dependency\n * @param repository the full git url, ie git@github.com/user/project.\n * Used in debug statements to clearly indicate the related dependency.\n * @param hostname the hostname (ie github.com)\n * Used to determine which renovate datasource should be used.\n * Is matched literally against `github.com` and `gitlab.com`.\n * If that doesn't match, `hostRules.find()` is used to find related sources.\n * In that case, the hostname is passed on as registryUrl to the corresponding datasource.\n */\nfunction determineDatasource(\n repository: string,\n hostname: string,\n): { datasource?: string; registryUrls?: string[]; skipReason?: SkipReason } {\n if (hostname === 'github.com' || detectPlatform(repository) === 'github') {\n logger.debug({ repository, hostname }, 'Found github dependency');\n return { datasource: GithubTagsDatasource.id };\n }\n if (hostname === 'gitlab.com') {\n logger.debug({ repository, hostname }, 'Found gitlab dependency');\n return { datasource: GitlabTagsDatasource.id };\n }\n if (detectPlatform(repository) === 'gitlab') {\n logger.debug(\n { repository, hostname },\n 'Found gitlab dependency with custom registryUrl',\n );\n return {\n datasource: GitlabTagsDatasource.id,\n registryUrls: [`https://${hostname}`],\n };\n }\n const hostUrl = `https://${hostname}`;\n const res = find({ url: hostUrl });\n if (isEmptyObject(res)) {\n // 1 check, to possibly prevent 3 failures in combined query of hostType & url.\n logger.debug(\n { repository, hostUrl },\n 'Provided hostname does not match any hostRules. Ignoring',\n );\n return { skipReason: 'unknown-registry', registryUrls: [hostname] };\n }\n for (const [hostType, sourceId] of [\n ['github', GithubTagsDatasource.id],\n ['gitlab', GitlabTagsDatasource.id],\n ]) {\n if (isNonEmptyObject(find({ hostType, url: hostUrl }))) {\n logger.debug(\n { repository, hostUrl, hostType },\n `Provided hostname matches a ${hostType} hostrule.`,\n );\n return { datasource: sourceId, registryUrls: [hostname] };\n }\n }\n logger.debug(\n { repository, registry: hostUrl },\n 'Provided hostname did not match any of the hostRules of hostType github nor gitlab',\n );\n return { skipReason: 'unknown-registry', registryUrls: [hostname] };\n}\n\nconst gitUrlRegex = regEx(/\\.git$/i);\n\n// Matches: rev: <digest><whitespace># frozen: <version>\nconst revLineWithFrozenCommentRegex = regEx(\n /^\\s*rev:\\s*(?<replaceString>(?<currentDigest>[a-f0-9]{40})(?<commentWhiteSpaces>\\s+)#\\s*frozen:\\s*(?<currentValue>\\S+))/,\n);\n\ninterface RegexDep {\n currentDigest: string;\n currentValue: string;\n replaceString: string;\n autoReplaceStringTemplate: string;\n}\n\nfunction extractWithRegex(content: string): Map<string, RegexDep> {\n logger.trace('pre-commit.extractWithRegex()');\n const regexDeps = new Map<string, RegexDep>();\n\n for (const line of content.split(newlineRegex)) {\n if (line.trim().startsWith('#')) {\n continue;\n }\n\n const match = revLineWithFrozenCommentRegex.exec(line);\n if (match?.groups) {\n const { currentDigest, currentValue, replaceString, commentWhiteSpaces } =\n match.groups;\n\n // Store by digest to correlate with YAML-extracted deps later\n regexDeps.set(currentDigest, {\n currentDigest,\n currentValue,\n replaceString,\n autoReplaceStringTemplate: `{{newDigest}}${commentWhiteSpaces}# frozen: {{newValue}}`,\n });\n }\n }\n\n return regexDeps;\n}\n\nfunction extractDependency(tag: string, repository: string): PackageDependency {\n logger.debug(`Found version ${tag}`);\n\n const urlMatchers = [\n // This splits \"http://my.github.com/user/repo\" -> \"my.github.com\" \"user/repo\n regEx('^https?://(?<hostname>[^/]+)/(?<depName>\\\\S*)'),\n // This splits \"git@private.registry.com:user/repo\" -> \"private.registry.com\" \"user/repo\n regEx('^git@(?<hostname>[^:]+):(?<depName>\\\\S*)'),\n // This split \"git://github.com/pre-commit/pre-commit-hooks\" -> \"github.com\" \"pre-commit/pre-commit-hooks\"\n regEx(/^git:\\/\\/(?<hostname>[^/]+)\\/(?<depName>\\S*)/),\n // This splits \"ssh://git@github.com/pre-commit/pre-commit-hooks\" -> \"github.com\" \"pre-commit/pre-commit-hooks\"\n regEx(/^ssh:\\/\\/git@(?<hostname>[^/]+)\\/(?<depName>\\S*)/),\n ];\n for (const urlMatcher of urlMatchers) {\n const match = urlMatcher.exec(repository);\n if (match?.groups) {\n const hostname = match.groups.hostname;\n const depName = match.groups.depName.replace(gitUrlRegex, '');\n const sourceDef = determineDatasource(repository, hostname);\n return {\n ...sourceDef,\n depName,\n depType: 'repository',\n packageName: depName,\n currentValue: tag,\n };\n }\n }\n logger.info(\n { repository },\n 'Could not separate hostname from full dependency url.',\n );\n return {\n depName: undefined,\n depType: 'repository',\n datasource: undefined,\n packageName: undefined,\n skipReason: 'invalid-url',\n currentValue: tag,\n };\n}\n\n/**\n * Find all supported dependencies in the pre-commit yaml object.\n *\n * @param precommitFile the parsed yaml config file\n * @param regexDeps Map of regex-extracted deps keyed by digest for enrichment\n */\nfunction findDependencies(\n precommitFile: PreCommitConfig,\n regexDeps: Map<string, RegexDep>,\n): PackageDependency[] {\n if (!precommitFile.repos) {\n logger.debug(`No repos section found, skipping file`);\n return [];\n }\n const packageDependencies: PackageDependency[] = [];\n\n for (const item of precommitFile.repos) {\n // meta hooks is defined from pre-commit and doesn't support `additional_dependencies`\n if (item.repo !== 'meta') {\n for (const hook of item.hooks ?? []) {\n // normally language are not defined in yaml\n // only support it when it's explicitly defined.\n // this avoid to parse hooks from pre-commit-hooks.yaml from git repo\n if (hook.language === 'node') {\n hook.additional_dependencies?.map((req) => {\n const match = regEx('^(?<name>.+)@(?<range>.+)$').exec(req);\n if (!match?.groups) {\n return;\n }\n\n const depType = 'pre-commit-node';\n const dep = npmExtractDependency(\n depType,\n match.groups.name,\n match.groups.range,\n );\n packageDependencies.push({\n depType,\n depName: match.groups.name,\n packageName: match.groups.name,\n ...dep,\n });\n });\n } else if (hook.language === 'python') {\n hook.additional_dependencies?.map((req) => {\n const dep = pep508ToPackageDependency('pre-commit-python', req);\n if (dep) {\n packageDependencies.push(dep);\n }\n });\n } else if (hook.language === 'golang') {\n hook.additional_dependencies?.map((req) => {\n // Convert dependency into a gomod require line to use the gomod line parser\n const requireLine = `require ${req.replace('@', ' ')}`;\n const dep = parseLine(requireLine);\n if (dep) {\n const depType = 'pre-commit-golang';\n packageDependencies.push({\n ...dep,\n depType,\n });\n }\n });\n }\n }\n }\n\n if (matchesPrecommitDependencyHeuristic(item)) {\n logger.trace(item, 'Matched pre-commit dependency spec');\n const repository = String(item.repo);\n const tag = String(item.rev);\n const dep = extractDependency(tag, repository);\n\n // Check if this rev has regex-extracted formatting info\n const regexDep = regexDeps.get(tag);\n if (regexDep) {\n // Enrich with formatting info from regex extraction\n dep.currentDigest = regexDep.currentDigest;\n dep.currentValue = regexDep.currentValue;\n dep.replaceString = regexDep.replaceString;\n dep.autoReplaceStringTemplate = regexDep.autoReplaceStringTemplate;\n }\n\n packageDependencies.push(dep);\n } else {\n logger.trace(item, 'Did not find pre-commit repo spec');\n }\n }\n return packageDependencies;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n): PackageFileContent | null {\n type ParsedContent = Record<string, unknown> | PreCommitConfig;\n let parsedContent: ParsedContent;\n try {\n // TODO: use schema (#9610)\n parsedContent = parseSingleYaml(content);\n } catch (err) {\n logger.debug(\n { filename: packageFile, err },\n 'Failed to parse pre-commit config YAML',\n );\n return null;\n }\n if (!isPlainObject<Record<string, unknown>>(parsedContent)) {\n logger.debug(\n { packageFile },\n `Parsing of pre-commit config YAML returned invalid result`,\n );\n return null;\n }\n if (!matchesPrecommitConfigHeuristic(parsedContent)) {\n logger.debug(\n { packageFile },\n `File does not look like a pre-commit config file`,\n );\n return null;\n }\n try {\n const regexDeps = extractWithRegex(content);\n const deps = findDependencies(parsedContent, regexDeps);\n if (deps.length) {\n logger.trace({ deps }, 'Found dependencies in pre-commit config');\n return { deps };\n }\n } catch (err) /* istanbul ignore next */ {\n logger.debug(\n { packageFile, err },\n 'Error scanning parsed pre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C,SAAS,KAAK;EACZ,OAAO,MACL;GAAE,UAAU;GAAa;EAAI,GAC7B,wCACF;EACA,OAAO;CACT;CACA,IAAI,CAAC,cAAuC,aAAa,GAAG;EAC1D,OAAO,MACL,EAAE,YAAY,GACd,2DACF;EACA,OAAO;CACT;CACA,IAAI,CAAC,gCAAgC,aAAa,GAAG;EACnD,OAAO,MACL,EAAE,YAAY,GACd,kDACF;EACA,OAAO;CACT;CACA,IAAI;EACF,MAAM,YAAY,iBAAiB,OAAO;EAC1C,MAAM,OAAO,iBAAiB,eAAe,SAAS;EACtD,IAAI,KAAK,QAAQ;GACf,OAAO,MAAM,EAAE,KAAK,GAAG,yCAAyC;GAChE,OAAO,EAAE,KAAK;EAChB;CACF,SAAS,iCAAgC;EACvC,OAAO,MACL;GAAE;GAAa;EAAI,GACnB,yCACF;CACF;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"extract.js","names":["npmExtractDependency"],"sources":["../../../../lib/modules/manager/pre-commit/extract.ts"],"sourcesContent":["import {\n isEmptyObject,\n isNonEmptyObject,\n isPlainObject,\n} from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport type { SkipReason } from '../../../types/index.ts';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { find } from '../../../util/host-rules.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport { parseSingleYaml } from '../../../util/yaml.ts';\nimport { ForgejoTagsDatasource } from '../../datasource/forgejo-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { parseLine } from '../gomod/line-parser.ts';\nimport { extractDependency as npmExtractDependency } from '../npm/extract/common/dependency.ts';\nimport { pep508ToPackageDependency } from '../pep621/utils.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport {\n matchesPrecommitConfigHeuristic,\n matchesPrecommitDependencyHeuristic,\n} from './parsing.ts';\nimport type { PreCommitConfig } from './types.ts';\n\n/**\n * Determines the datasource(id) to be used for this dependency\n * @param repository the full git url, ie git@github.com/user/project.\n * Used in debug statements to clearly indicate the related dependency.\n * @param hostname the hostname (ie github.com)\n * Used to determine which renovate datasource should be used.\n * Is matched literally against `github.com` and `gitlab.com`.\n * If that doesn't match, `hostRules.find()` is used to find related sources.\n * In that case, the hostname is passed on as registryUrl to the corresponding datasource.\n */\nfunction determineDatasource(\n repository: string,\n hostname: string,\n): { datasource?: string; registryUrls?: string[]; skipReason?: SkipReason } {\n const platform = detectPlatform(repository);\n\n if (platform === 'forgejo') {\n logger.debug(\n { repository, hostname },\n 'Found forgejo dependency with custom registryUrl',\n );\n return {\n datasource: ForgejoTagsDatasource.id,\n registryUrls: [`https://${hostname}`],\n };\n }\n if (hostname === 'github.com' || platform === 'github') {\n logger.debug({ repository, hostname }, 'Found github dependency');\n return { datasource: GithubTagsDatasource.id };\n }\n if (hostname === 'gitlab.com') {\n logger.debug({ repository, hostname }, 'Found gitlab dependency');\n return { datasource: GitlabTagsDatasource.id };\n }\n if (platform === 'gitlab') {\n logger.debug(\n { repository, hostname },\n 'Found gitlab dependency with custom registryUrl',\n );\n return {\n datasource: GitlabTagsDatasource.id,\n registryUrls: [`https://${hostname}`],\n };\n }\n const hostUrl = `https://${hostname}`;\n const res = find({ url: hostUrl });\n if (isEmptyObject(res)) {\n // 1 check, to possibly prevent 3 failures in combined query of hostType & url.\n logger.debug(\n { repository, hostUrl },\n 'Provided hostname does not match any hostRules. Ignoring',\n );\n return { skipReason: 'unknown-registry', registryUrls: [hostname] };\n }\n for (const [hostType, sourceId] of [\n ['forgejo', ForgejoTagsDatasource.id],\n ['github', GithubTagsDatasource.id],\n ['gitlab', GitlabTagsDatasource.id],\n ]) {\n if (isNonEmptyObject(find({ hostType, url: hostUrl }))) {\n logger.debug(\n { repository, hostUrl, hostType },\n `Provided hostname matches a ${hostType} hostrule.`,\n );\n return { datasource: sourceId, registryUrls: [hostname] };\n }\n }\n logger.debug(\n { repository, registry: hostUrl },\n 'Provided hostname did not match any of the hostRules of hostType forgejo, github nor gitlab',\n );\n return { skipReason: 'unknown-registry', registryUrls: [hostname] };\n}\n\nconst gitUrlRegex = regEx(/\\.git$/i);\n\n// Matches: rev: <digest><whitespace># frozen: <version>\nconst revLineWithFrozenCommentRegex = regEx(\n /^\\s*rev:\\s*(?<replaceString>(?<currentDigest>[a-f0-9]{40})(?<commentWhiteSpaces>\\s+)#\\s*frozen:\\s*(?<currentValue>\\S+))/,\n);\n\ninterface RegexDep {\n currentDigest: string;\n currentValue: string;\n replaceString: string;\n autoReplaceStringTemplate: string;\n}\n\nfunction extractWithRegex(content: string): Map<string, RegexDep> {\n logger.trace('pre-commit.extractWithRegex()');\n const regexDeps = new Map<string, RegexDep>();\n\n for (const line of content.split(newlineRegex)) {\n if (line.trim().startsWith('#')) {\n continue;\n }\n\n const match = revLineWithFrozenCommentRegex.exec(line);\n if (match?.groups) {\n const { currentDigest, currentValue, replaceString, commentWhiteSpaces } =\n match.groups;\n\n // Store by digest to correlate with YAML-extracted deps later\n regexDeps.set(currentDigest, {\n currentDigest,\n currentValue,\n replaceString,\n autoReplaceStringTemplate: `{{newDigest}}${commentWhiteSpaces}# frozen: {{newValue}}`,\n });\n }\n }\n\n return regexDeps;\n}\n\nfunction extractDependency(tag: string, repository: string): PackageDependency {\n logger.debug(`Found version ${tag}`);\n\n const urlMatchers = [\n // This splits \"http://my.github.com/user/repo\" -> \"my.github.com\" \"user/repo\n regEx('^https?://(?<hostname>[^/]+)/(?<depName>\\\\S*)'),\n // This splits \"git@private.registry.com:user/repo\" -> \"private.registry.com\" \"user/repo\n regEx('^git@(?<hostname>[^:]+):(?<depName>\\\\S*)'),\n // This split \"git://github.com/pre-commit/pre-commit-hooks\" -> \"github.com\" \"pre-commit/pre-commit-hooks\"\n regEx(/^git:\\/\\/(?<hostname>[^/]+)\\/(?<depName>\\S*)/),\n // This splits \"ssh://git@github.com/pre-commit/pre-commit-hooks\" -> \"github.com\" \"pre-commit/pre-commit-hooks\"\n regEx(/^ssh:\\/\\/git@(?<hostname>[^/]+)\\/(?<depName>\\S*)/),\n ];\n for (const urlMatcher of urlMatchers) {\n const match = urlMatcher.exec(repository);\n if (match?.groups) {\n const hostname = match.groups.hostname;\n const depName = match.groups.depName.replace(gitUrlRegex, '');\n const sourceDef = determineDatasource(repository, hostname);\n return {\n ...sourceDef,\n depName,\n depType: 'repository',\n packageName: depName,\n currentValue: tag,\n };\n }\n }\n logger.info(\n { repository },\n 'Could not separate hostname from full dependency url.',\n );\n return {\n depName: undefined,\n depType: 'repository',\n datasource: undefined,\n packageName: undefined,\n skipReason: 'invalid-url',\n currentValue: tag,\n };\n}\n\n/**\n * Find all supported dependencies in the pre-commit yaml object.\n *\n * @param precommitFile the parsed yaml config file\n * @param regexDeps Map of regex-extracted deps keyed by digest for enrichment\n */\nfunction findDependencies(\n precommitFile: PreCommitConfig,\n regexDeps: Map<string, RegexDep>,\n): PackageDependency[] {\n if (!precommitFile.repos) {\n logger.debug(`No repos section found, skipping file`);\n return [];\n }\n const packageDependencies: PackageDependency[] = [];\n\n for (const item of precommitFile.repos) {\n // meta hooks is defined from pre-commit and doesn't support `additional_dependencies`\n if (item.repo !== 'meta') {\n for (const hook of item.hooks ?? []) {\n // normally language are not defined in yaml\n // only support it when it's explicitly defined.\n // this avoid to parse hooks from pre-commit-hooks.yaml from git repo\n if (hook.language === 'node') {\n hook.additional_dependencies?.map((req) => {\n const match = regEx('^(?<name>.+)@(?<range>.+)$').exec(req);\n if (!match?.groups) {\n return;\n }\n\n const depType = 'pre-commit-node';\n const dep = npmExtractDependency(\n depType,\n match.groups.name,\n match.groups.range,\n );\n packageDependencies.push({\n depType,\n depName: match.groups.name,\n packageName: match.groups.name,\n ...dep,\n });\n });\n } else if (hook.language === 'python') {\n hook.additional_dependencies?.map((req) => {\n const dep = pep508ToPackageDependency('pre-commit-python', req);\n if (dep) {\n packageDependencies.push(dep);\n }\n });\n } else if (hook.language === 'golang') {\n hook.additional_dependencies?.map((req) => {\n // Convert dependency into a gomod require line to use the gomod line parser\n const requireLine = `require ${req.replace('@', ' ')}`;\n const dep = parseLine(requireLine);\n if (dep) {\n const depType = 'pre-commit-golang';\n packageDependencies.push({\n ...dep,\n depType,\n });\n }\n });\n }\n }\n }\n\n if (matchesPrecommitDependencyHeuristic(item)) {\n logger.trace(item, 'Matched pre-commit dependency spec');\n const repository = String(item.repo);\n const tag = String(item.rev);\n const dep = extractDependency(tag, repository);\n\n // Check if this rev has regex-extracted formatting info\n const regexDep = regexDeps.get(tag);\n if (regexDep) {\n // Enrich with formatting info from regex extraction\n dep.currentDigest = regexDep.currentDigest;\n dep.currentValue = regexDep.currentValue;\n dep.replaceString = regexDep.replaceString;\n dep.autoReplaceStringTemplate = regexDep.autoReplaceStringTemplate;\n }\n\n packageDependencies.push(dep);\n } else {\n logger.trace(item, 'Did not find pre-commit repo spec');\n }\n }\n return packageDependencies;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n): PackageFileContent | null {\n type ParsedContent = Record<string, unknown> | PreCommitConfig;\n let parsedContent: ParsedContent;\n try {\n // TODO: use schema (#9610)\n parsedContent = parseSingleYaml(content);\n } catch (err) {\n logger.debug(\n { filename: packageFile, err },\n 'Failed to parse pre-commit config YAML',\n );\n return null;\n }\n if (!isPlainObject<Record<string, unknown>>(parsedContent)) {\n logger.debug(\n { packageFile },\n `Parsing of pre-commit config YAML returned invalid result`,\n );\n return null;\n }\n if (!matchesPrecommitConfigHeuristic(parsedContent)) {\n logger.debug(\n { packageFile },\n `File does not look like a pre-commit config file`,\n );\n return null;\n }\n try {\n const regexDeps = extractWithRegex(content);\n const deps = findDependencies(parsedContent, regexDeps);\n if (deps.length) {\n logger.trace({ deps }, 'Found dependencies in pre-commit config');\n return { deps };\n }\n } catch (err) /* istanbul ignore next */ {\n logger.debug(\n { packageFile, err },\n 'Error scanning parsed pre-commit config',\n );\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;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M,mCAAmC;CAE1D;CACA,OAAO;AACT;AAEA,SAAgB,mBACd,SACA,aAC2B;CAE3B,IAAI;CACJ,IAAI;EAEF,gBAAgB,gBAAgB,OAAO;CACzC,SAAS,KAAK;EACZ,OAAO,MACL;GAAE,UAAU;GAAa;EAAI,GAC7B,wCACF;EACA,OAAO;CACT;CACA,IAAI,CAAC,cAAuC,aAAa,GAAG;EAC1D,OAAO,MACL,EAAE,YAAY,GACd,2DACF;EACA,OAAO;CACT;CACA,IAAI,CAAC,gCAAgC,aAAa,GAAG;EACnD,OAAO,MACL,EAAE,YAAY,GACd,kDACF;EACA,OAAO;CACT;CACA,IAAI;EACF,MAAM,YAAY,iBAAiB,OAAO;EAC1C,MAAM,OAAO,iBAAiB,eAAe,SAAS;EACtD,IAAI,KAAK,QAAQ;GACf,OAAO,MAAM,EAAE,KAAK,GAAG,yCAAyC;GAChE,OAAO,EAAE,KAAK;EAChB;CACF,SAAS,iCAAgC;EACvC,OAAO,MACL;GAAE;GAAa;EAAI,GACnB,yCACF;CACF;CACA,OAAO;AACT"}
@@ -1,5 +1,6 @@
1
1
  import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
2
2
  import { getEnv } from "../../../util/env.js";
3
+ import { ForgejoTagsDatasource } from "../../datasource/forgejo-tags/index.js";
3
4
  import { GithubTagsDatasource } from "../../datasource/github-tags/index.js";
4
5
  import { GitlabTagsDatasource } from "../../datasource/gitlab-tags/index.js";
5
6
  import { extractPackageFile } from "./extract.js";
@@ -23,7 +24,11 @@ const defaultConfig = {
23
24
  managerFilePatterns: ["/(^|/)\\.pre-commit-config\\.ya?ml$/"],
24
25
  prBodyNotes: getEnv().RENOVATE_X_SUPPRESS_PRE_COMMIT_WARNING ? [] : ["Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions."]
25
26
  };
26
- const supportedDatasources = [GithubTagsDatasource.id, GitlabTagsDatasource.id];
27
+ const supportedDatasources = [
28
+ ForgejoTagsDatasource.id,
29
+ GithubTagsDatasource.id,
30
+ GitlabTagsDatasource.id
31
+ ];
27
32
  //#endregion
28
33
  export { categories, defaultConfig, displayName, extractPackageFile, knownDepTypes, pre_commit_exports, supportedDatasources, url };
29
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/pre-commit/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { getEnv } from '../../../util/env.ts';\n\nexport const categories: Category[] = ['python'];\n\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\n\nexport { extractPackageFile } from './extract.ts';\n\nexport const displayName = 'pre-commit';\nexport const url = 'https://pre-commit.com';\n\nexport const defaultConfig = {\n commitMessageTopic: 'pre-commit hook {{depName}}',\n enabled: false,\n managerFilePatterns: ['/(^|/)\\\\.pre-commit-config\\\\.ya?ml$/'],\n prBodyNotes: getEnv().RENOVATE_X_SUPPRESS_PRE_COMMIT_WARNING\n ? /* istanbul ignore next */\n []\n : [\n 'Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.',\n ],\n};\n\nexport const supportedDatasources = [\n GithubTagsDatasource.id,\n GitlabTagsDatasource.id,\n];\n\nexport { knownDepTypes } from './dep-types.ts';\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAa,aAAyB,CAAC,QAAQ;AAO/C,MAAa,cAAc;AAC3B,MAAa,MAAM;AAEnB,MAAa,gBAAgB;CAC3B,oBAAoB;CACpB,SAAS;CACT,qBAAqB,CAAC,sCAAsC;CAC5D,aAAa,OAAO,CAAC,CAAC,yCAElB,CAAC,IACD,CACE,iSACF;AACN;AAEA,MAAa,uBAAuB,CAClC,qBAAqB,IACrB,qBAAqB,EACvB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/pre-commit/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { getEnv } from '../../../util/env.ts';\n\nexport const categories: Category[] = ['python'];\n\nimport { ForgejoTagsDatasource } from '../../datasource/forgejo-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\n\nexport { extractPackageFile } from './extract.ts';\n\nexport const displayName = 'pre-commit';\nexport const url = 'https://pre-commit.com';\n\nexport const defaultConfig = {\n commitMessageTopic: 'pre-commit hook {{depName}}',\n enabled: false,\n managerFilePatterns: ['/(^|/)\\\\.pre-commit-config\\\\.ya?ml$/'],\n prBodyNotes: getEnv().RENOVATE_X_SUPPRESS_PRE_COMMIT_WARNING\n ? /* istanbul ignore next */\n []\n : [\n 'Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.',\n ],\n};\n\nexport const supportedDatasources = [\n ForgejoTagsDatasource.id,\n GithubTagsDatasource.id,\n GitlabTagsDatasource.id,\n];\n\nexport { knownDepTypes } from './dep-types.ts';\n"],"mappings":";;;;;;;;;;;;;;;;;AAGA,MAAa,aAAyB,CAAC,QAAQ;AAQ/C,MAAa,cAAc;AAC3B,MAAa,MAAM;AAEnB,MAAa,gBAAgB;CAC3B,oBAAoB;CACpB,SAAS;CACT,qBAAqB,CAAC,sCAAsC;CAC5D,aAAa,OAAO,CAAC,CAAC,yCAElB,CAAC,IACD,CACE,iSACF;AACN;AAEA,MAAa,uBAAuB;CAClC,sBAAsB;CACtB,qBAAqB;CACrB,qBAAqB;AACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"filter-checks.js","names":[],"sources":["../../../../../lib/workers/repository/process/lookup/filter-checks.ts"],"sourcesContent":["import { mergeChildConfig } from '../../../../config/index.ts';\nimport type {\n MinimumReleaseAgeBehaviour,\n UpdateType,\n} from '../../../../config/types.ts';\nimport { logger } from '../../../../logger/index.ts';\nimport type { Release } from '../../../../modules/datasource/index.ts';\nimport { postprocessRelease } from '../../../../modules/datasource/postprocess-release.ts';\nimport type { VersioningApi } from '../../../../modules/versioning/index.ts';\nimport {\n getMergeConfidenceLevel,\n isActiveConfidenceLevel,\n satisfiesConfidenceLevel,\n} from '../../../../util/merge-confidence/index.ts';\nimport type { MergeConfidence } from '../../../../util/merge-confidence/types.ts';\nimport { checkMinimumReleaseAge } from '../../../../util/minimum-release-age.ts';\nimport { applyPackageRules } from '../../../../util/package-rules/index.ts';\nimport type { LookupUpdateConfig, UpdateResult } from './types.ts';\nimport { getUpdateType } from './update-type.ts';\n\nexport interface InternalChecksResult {\n release?: Release;\n pendingChecks: boolean;\n pendingReleases: Release[];\n}\n\n/** Given an UpdateType, should `minimumReleaseAge` apply to it? **/\nexport function isMinimumReleaseAgeApplicable(\n updateType: UpdateType | undefined,\n): boolean {\n return (\n // Possible, but not wanted, as this is intentionally rolling back to a previous (generally older) release to unblock the build\n updateType !== 'rollback' &&\n // Not yet supported: TODO #40288\n updateType !== 'pin' &&\n // Not yet supported: TODO #44820\n updateType !== 'pinDigest' &&\n // Not yet supported: TODO #39400\n updateType !== 'replacement' &&\n // Not possible, as we delegate to the package manager to perform the required changes to update package(s).\n updateType !== 'lockFileMaintenance' &&\n // Not supported\n updateType !== 'bump' &&\n // Not supported\n updateType !== 'lockfileUpdate'\n );\n}\n\n/** Given an UpdateType, should `minimumConfidence` apply to it? **/\nexport function isMinimumConfidenceApplicable(\n updateType: UpdateType | undefined,\n): boolean {\n return (\n // data collection doesn't include digest updates\n updateType !== 'digest' &&\n // data collection doesn't include digest updates\n updateType !== 'pinDigest'\n );\n}\n\nexport interface MinimumConfidenceCheckResult {\n isPending: boolean;\n}\n\n/**\n * Checks whether a release satisfies `minimumConfidence`.\n *\n * Separate from `internalChecksFilter` to allow reuse.\n */\nexport async function checkMinimumConfidence(\n config: {\n minimumConfidence?: MergeConfidence;\n datasource?: string;\n packageName?: string;\n },\n currentVersion: string,\n candidateVersion: string,\n updateType: UpdateType,\n): Promise<MinimumConfidenceCheckResult> {\n const { minimumConfidence, datasource, packageName } = config;\n if (!isActiveConfidenceLevel(minimumConfidence!)) {\n return { isPending: false };\n }\n\n const confidenceLevel =\n (await getMergeConfidenceLevel(\n datasource!,\n packageName!,\n currentVersion,\n candidateVersion,\n updateType,\n )) ?? 'neutral';\n return {\n isPending: !satisfiesConfidenceLevel(confidenceLevel, minimumConfidence!),\n };\n}\n\nexport async function filterInternalChecks(\n config: Partial<LookupUpdateConfig & UpdateResult>,\n versioningApi: VersioningApi,\n bucket: string,\n sortedReleases: Release[],\n): Promise<InternalChecksResult> {\n const { currentVersion, depName, internalChecksFilter } = config;\n let release: Release | undefined = undefined;\n let pendingChecks = false;\n let pendingReleases: Release[] = [];\n if (internalChecksFilter === 'none') {\n // Don't care if minimumReleaseAge or minimumConfidence are unmet\n release = sortedReleases.pop();\n } else {\n const candidateVersionsWithoutReleaseTimestamp: Record<\n MinimumReleaseAgeBehaviour,\n string[]\n > = {\n 'timestamp-required': [],\n 'timestamp-optional': [],\n };\n\n // iterate through releases from highest to lowest, looking for the first which will pass checks if present\n for (let candidateRelease of sortedReleases.reverse()) {\n // merge the release data into dependency config\n let releaseConfig = mergeChildConfig(config, candidateRelease);\n // calculate updateType and then apply it\n releaseConfig.updateType = getUpdateType(\n releaseConfig,\n versioningApi,\n // TODO #22198\n currentVersion!,\n candidateRelease.version,\n );\n releaseConfig = mergeChildConfig(\n releaseConfig,\n releaseConfig[releaseConfig.updateType]!,\n );\n // Apply packageRules in case any apply to updateType\n releaseConfig = await applyPackageRules(releaseConfig, 'update-type');\n\n const updatedCandidateRelease = await postprocessRelease(\n releaseConfig,\n candidateRelease,\n );\n if (!updatedCandidateRelease) {\n continue;\n }\n candidateRelease = updatedCandidateRelease;\n\n // Now check for a minimumReleaseAge config\n const { updateType } = releaseConfig;\n\n const ageCheck = checkMinimumReleaseAge(\n releaseConfig,\n candidateRelease.releaseTimestamp,\n );\n if (ageCheck.minimumReleaseAgeMs) {\n if (!ageCheck.hasTimestamp) {\n const minimumReleaseAgeBehaviour =\n releaseConfig.minimumReleaseAgeBehaviour;\n // v8 ignore else -- TODO: add test #40625\n if (\n minimumReleaseAgeBehaviour === 'timestamp-required' ||\n minimumReleaseAgeBehaviour === 'timestamp-optional'\n ) {\n candidateVersionsWithoutReleaseTimestamp[\n minimumReleaseAgeBehaviour\n ].push(candidateRelease.version);\n }\n }\n\n if (ageCheck.isPending) {\n // v8 ignore else -- TODO: add test #40625\n if (ageCheck.hasTimestamp) {\n // Skip it if it doesn't pass checks\n logger.trace(\n { depName, check: 'minimumReleaseAge' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n } // or if there is no timestamp, and we're running in `minimumReleaseAgeBehaviour=timestamp-required`, skip it as we require a timestamp\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n }\n\n const confidenceCheck = await checkMinimumConfidence(\n releaseConfig,\n currentVersion!,\n candidateRelease.version,\n updateType!,\n );\n if (confidenceCheck.isPending) {\n logger.trace(\n { depName, check: 'minimumConfidence' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n // If we get to here, then the release is OK and we can stop iterating\n release = candidateRelease;\n break;\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length) {\n logger.once.debug(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-required'],\n check: 'minimumReleaseAge',\n },\n `Marking ${candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length} release(s) as pending, as they do not have a releaseTimestamp and we're running with minimumReleaseAgeBehaviour=timestamp-required`,\n );\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length) {\n logger.once.warn(\n \"Some release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding. See debug logs for more information\",\n );\n logger.once.debug(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-optional'],\n check: 'minimumReleaseAge',\n },\n `${candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length} release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding`,\n );\n }\n\n // v8 ignore else -- TODO: add test #40625\n if (!release && pendingReleases.length) {\n // If all releases were pending then just take the highest\n logger.trace(\n { depName, bucket },\n 'All releases are pending - using latest',\n );\n release = pendingReleases.pop();\n // None are pending anymore because we took the latest, so empty the array\n pendingReleases = [];\n if (internalChecksFilter === 'strict') {\n pendingChecks = true;\n }\n }\n }\n\n return { release, pendingChecks, pendingReleases };\n}\n"],"mappings":";;;;;;;;;;;;;;AAqEA,eAAsB,uBACpB,QAKA,gBACA,kBACA,YACuC;CACvC,MAAM,EAAE,mBAAmB,YAAY,gBAAgB;CACvD,IAAI,CAAC,wBAAwB,iBAAkB,GAC7C,OAAO,EAAE,WAAW,MAAM;CAW5B,OAAO,EACL,WAAW,CAAC,yBARX,MAAM,wBACL,YACA,aACA,gBACA,kBACA,UACF,KAAM,WAEgD,iBAAkB,EAC1E;AACF;AAEA,eAAsB,qBACpB,QACA,eACA,QACA,gBAC+B;CAC/B,MAAM,EAAE,gBAAgB,SAAS,yBAAyB;CAC1D,IAAI,UAA+B,KAAA;CACnC,IAAI,gBAAgB;CACpB,IAAI,kBAA6B,CAAC;CAClC,IAAI,yBAAyB,QAE3B,UAAU,eAAe,IAAI;MACxB;EACL,MAAM,2CAGF;GACF,sBAAsB,CAAC;GACvB,sBAAsB,CAAC;EACzB;EAGA,KAAK,IAAI,oBAAoB,eAAe,QAAQ,GAAG;GAErD,IAAI,gBAAgB,iBAAiB,QAAQ,gBAAgB;GAE7D,cAAc,aAAa,cACzB,eACA,eAEA,gBACA,iBAAiB,OACnB;GACA,gBAAgB,iBACd,eACA,cAAc,c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GACnB,IAAI,yBAAyB,UAC3B,gBAAgB;EAEpB;CACF;CAEA,OAAO;EAAE;EAAS;EAAe;CAAgB;AACnD"}
1
+ {"version":3,"file":"filter-checks.js","names":[],"sources":["../../../../../lib/workers/repository/process/lookup/filter-checks.ts"],"sourcesContent":["import { mergeChildConfig } from '../../../../config/index.ts';\nimport type {\n MinimumReleaseAgeBehaviour,\n UpdateType,\n} from '../../../../config/types.ts';\nimport { logger } from '../../../../logger/index.ts';\nimport type { Release } from '../../../../modules/datasource/index.ts';\nimport { postprocessRelease } from '../../../../modules/datasource/postprocess-release.ts';\nimport type { VersioningApi } from '../../../../modules/versioning/index.ts';\nimport {\n getMergeConfidenceLevel,\n isActiveConfidenceLevel,\n satisfiesConfidenceLevel,\n} from '../../../../util/merge-confidence/index.ts';\nimport type { MergeConfidence } from '../../../../util/merge-confidence/types.ts';\nimport { checkMinimumReleaseAge } from '../../../../util/minimum-release-age.ts';\nimport { applyPackageRules } from '../../../../util/package-rules/index.ts';\nimport type { LookupUpdateConfig, UpdateResult } from './types.ts';\nimport { getUpdateType } from './update-type.ts';\n\nexport interface InternalChecksResult {\n release?: Release;\n pendingChecks: boolean;\n pendingReleases: Release[];\n}\n\n/** Given an UpdateType, should `minimumReleaseAge` apply to it? **/\nexport function isMinimumReleaseAgeApplicable(\n updateType: UpdateType | undefined,\n): boolean {\n return (\n // Possible, but not wanted, as this is intentionally rolling back to a previous (generally older) release to unblock the build\n updateType !== 'rollback' &&\n // Not yet supported: TODO #40288\n updateType !== 'pin' &&\n // Not yet supported: TODO #44820\n updateType !== 'pinDigest' &&\n // Not yet supported: TODO #39400\n updateType !== 'replacement' &&\n // Not possible, as we delegate to the package manager to perform the required changes to update package(s).\n updateType !== 'lockFileMaintenance' &&\n // Not supported\n updateType !== 'bump' &&\n // Not supported\n updateType !== 'lockfileUpdate'\n );\n}\n\n/** Given an UpdateType, should `minimumConfidence` apply to it? **/\nexport function isMinimumConfidenceApplicable(\n updateType: UpdateType | undefined,\n): boolean {\n return (\n // data collection doesn't include digest updates\n updateType !== 'digest' &&\n // data collection doesn't include digest updates\n updateType !== 'pinDigest'\n );\n}\n\nexport interface MinimumConfidenceCheckResult {\n isPending: boolean;\n}\n\n/**\n * Checks whether a release satisfies `minimumConfidence`.\n *\n * Separate from `internalChecksFilter` to allow reuse.\n */\nexport async function checkMinimumConfidence(\n config: {\n minimumConfidence?: MergeConfidence;\n datasource?: string;\n packageName?: string;\n },\n currentVersion: string,\n candidateVersion: string,\n updateType: UpdateType,\n): Promise<MinimumConfidenceCheckResult> {\n const { minimumConfidence, datasource, packageName } = config;\n if (!isActiveConfidenceLevel(minimumConfidence!)) {\n return { isPending: false };\n }\n\n const confidenceLevel =\n (await getMergeConfidenceLevel(\n datasource!,\n packageName!,\n currentVersion,\n candidateVersion,\n updateType,\n )) ?? 'neutral';\n return {\n isPending: !satisfiesConfidenceLevel(confidenceLevel, minimumConfidence!),\n };\n}\n\n/*\n * NOTE that this should be kept in sync with `applyMinimumReleaseAgeToDigestUpdate`()\n */\nexport async function filterInternalChecks(\n config: Partial<LookupUpdateConfig & UpdateResult>,\n versioningApi: VersioningApi,\n bucket: string,\n sortedReleases: Release[],\n): Promise<InternalChecksResult> {\n const { currentVersion, depName, internalChecksFilter } = config;\n let release: Release | undefined = undefined;\n let pendingChecks = false;\n let pendingReleases: Release[] = [];\n if (internalChecksFilter === 'none') {\n // Don't care if minimumReleaseAge or minimumConfidence are unmet\n release = sortedReleases.pop();\n } else {\n const candidateVersionsWithoutReleaseTimestamp: Record<\n MinimumReleaseAgeBehaviour,\n string[]\n > = {\n 'timestamp-required': [],\n 'timestamp-optional': [],\n };\n\n // iterate through releases from highest to lowest, looking for the first which will pass checks if present\n for (let candidateRelease of sortedReleases.reverse()) {\n // merge the release data into dependency config\n let releaseConfig = mergeChildConfig(config, candidateRelease);\n // calculate updateType and then apply it\n releaseConfig.updateType = getUpdateType(\n releaseConfig,\n versioningApi,\n // TODO #22198\n currentVersion!,\n candidateRelease.version,\n );\n releaseConfig = mergeChildConfig(\n releaseConfig,\n releaseConfig[releaseConfig.updateType]!,\n );\n // Apply packageRules in case any apply to updateType\n releaseConfig = await applyPackageRules(releaseConfig, 'update-type');\n\n const updatedCandidateRelease = await postprocessRelease(\n releaseConfig,\n candidateRelease,\n );\n if (!updatedCandidateRelease) {\n continue;\n }\n candidateRelease = updatedCandidateRelease;\n\n // Now check for a minimumReleaseAge config\n const { updateType } = releaseConfig;\n\n const ageCheck = checkMinimumReleaseAge(\n releaseConfig,\n candidateRelease.releaseTimestamp,\n );\n if (ageCheck.minimumReleaseAgeMs) {\n if (!ageCheck.hasTimestamp) {\n const minimumReleaseAgeBehaviour =\n releaseConfig.minimumReleaseAgeBehaviour;\n // v8 ignore else -- TODO: add test #40625\n if (\n minimumReleaseAgeBehaviour === 'timestamp-required' ||\n minimumReleaseAgeBehaviour === 'timestamp-optional'\n ) {\n candidateVersionsWithoutReleaseTimestamp[\n minimumReleaseAgeBehaviour\n ].push(candidateRelease.version);\n }\n }\n\n if (ageCheck.isPending) {\n // v8 ignore else -- TODO: add test #40625\n if (ageCheck.hasTimestamp) {\n // Skip it if it doesn't pass checks\n logger.trace(\n { depName, check: 'minimumReleaseAge' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n } // or if there is no timestamp, and we're running in `minimumReleaseAgeBehaviour=timestamp-required`, skip it as we require a timestamp\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n }\n\n const confidenceCheck = await checkMinimumConfidence(\n releaseConfig,\n currentVersion!,\n candidateRelease.version,\n updateType!,\n );\n if (confidenceCheck.isPending) {\n logger.trace(\n { depName, check: 'minimumConfidence' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n // If we get to here, then the release is OK and we can stop iterating\n release = candidateRelease;\n break;\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length) {\n logger.once.debug(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-required'],\n check: 'minimumReleaseAge',\n },\n `Marking ${candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length} release(s) as pending, as they do not have a releaseTimestamp and we're running with minimumReleaseAgeBehaviour=timestamp-required`,\n );\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length) {\n logger.once.warn(\n \"Some release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding. See debug logs for more information\",\n );\n logger.once.debug(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-optional'],\n check: 'minimumReleaseAge',\n },\n `${candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length} release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding`,\n );\n }\n\n // v8 ignore else -- TODO: add test #40625\n if (!release && pendingReleases.length) {\n // If all releases were pending then just take the highest\n logger.trace(\n { depName, bucket },\n 'All releases are pending - using latest',\n );\n release = pendingReleases.pop();\n // None are pending anymore because we took the latest, so empty the array\n pendingReleases = [];\n if (internalChecksFilter === 'strict') {\n pendingChecks = true;\n }\n }\n }\n\n return { release, pendingChecks, pendingReleases };\n}\n"],"mappings":";;;;;;;;;;;;;;AAqEA,eAAsB,uBACpB,QAKA,gBACA,kBACA,YACuC;CACvC,MAAM,EAAE,mBAAmB,YAAY,gBAAgB;CACvD,IAAI,CAAC,wBAAwB,iBAAkB,GAC7C,OAAO,EAAE,WAAW,MAAM;CAW5B,OAAO,EACL,WAAW,CAAC,yBARX,MAAM,wBACL,YACA,aACA,gBACA,kBACA,UACF,KAAM,WAEgD,iBAAkB,EAC1E;AACF;AAKA,eAAsB,qBACpB,QACA,eACA,QACA,gBAC+B;CAC/B,MAAM,EAAE,gBAAgB,SAAS,yBAAyB;CAC1D,IAAI,UAA+B,KAAA;CACnC,IAAI,gBAAgB;CACpB,IAAI,kBAA6B,CAAC;CAClC,IAAI,yBAAyB,QAE3B,UAAU,eAAe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ACF;GACA,OAAO,KAAK,MACV;IACE;IACA,UACE,yCAAyC;IAC3C,OAAO;GACT,GACA,GAAG,yCAAyC,qBAAqB,CAAC,OAAO,iIAC3E;EACF;;EAGA,IAAI,CAAC,WAAW,gBAAgB,QAAQ;GAEtC,OAAO,MACL;IAAE;IAAS;GAAO,GAClB,yCACF;GACA,UAAU,gBAAgB,IAAI;GAE9B,kBAAkB,CAAC;GACnB,IAAI,yBAAyB,UAC3B,gBAAgB;EAEpB;CACF;CAEA,OAAO;EAAE;EAAS;EAAe;CAAgB;AACnD"}
@@ -14,6 +14,7 @@ import { getRangeStrategy } from "../../../../modules/manager/index.js";
14
14
  import "../../../../config/index.js";
15
15
  import { applyPackageRules } from "../../../../util/package-rules/index.js";
16
16
  import { postprocessRelease } from "../../../../modules/datasource/postprocess-release.js";
17
+ import { checkMinimumReleaseAge } from "../../../../util/minimum-release-age.js";
17
18
  import { calculateAbandonment } from "./abandonment.js";
18
19
  import { getBucket } from "./bucket.js";
19
20
  import { getCurrentVersion } from "./current.js";
@@ -31,6 +32,48 @@ async function getTimestamp(config, versions, version, versioningApi) {
31
32
  if (currentRelease.releaseTimestamp) return currentRelease.releaseTimestamp;
32
33
  return (await postprocessRelease(config, currentRelease))?.releaseTimestamp;
33
34
  }
35
+ /**
36
+ * A helper function to allow a short-circuit for `minimumReleaseAge` functionality if a package may have config that applies it.
37
+ *
38
+ * Allows avoiding unnecessary calls to more expensive checks like merge + `applyPackageRules()` and `getTimestamp()`.
39
+ */
40
+ function couldApplyMinimumReleaseAgeToDigest(config) {
41
+ if (config.internalChecksFilter === "none") return false;
42
+ return isNonEmptyString(config.minimumReleaseAge) || isNonEmptyString(config.digest?.minimumReleaseAge) || !!config.packageRules?.some((rule) => isNonEmptyString(rule.minimumReleaseAge));
43
+ }
44
+ /**
45
+ * Ensure `minimumReleaseAge`/`internalChecksFilter` applies to digest updates, as they don't currently get run through `filterInternalChecks()`.
46
+ *
47
+ * NOTE that this should be kept in sync with `filterInternalChecks`()
48
+ */
49
+ async function applyMinimumReleaseAgeToDigestUpdate(update, config, res, newestMatchingVersionTimestamp) {
50
+ if (!couldApplyMinimumReleaseAgeToDigest(config)) return;
51
+ let releaseConfig = {
52
+ ...mergeChildConfig(config, res),
53
+ updateType: update.updateType
54
+ };
55
+ releaseConfig = mergeChildConfig(releaseConfig, releaseConfig[update.updateType]);
56
+ releaseConfig = await applyPackageRules(releaseConfig, "update-type");
57
+ const ageCheck = checkMinimumReleaseAge(releaseConfig, newestMatchingVersionTimestamp);
58
+ if (ageCheck.minimumReleaseAgeMs && !ageCheck.hasTimestamp) {
59
+ if (releaseConfig.minimumReleaseAgeBehaviour === "timestamp-optional") logger.once.warn("Some release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding. See debug logs for more information");
60
+ logger.once.debug({
61
+ depName: config.depName,
62
+ updateType: update.updateType,
63
+ minimumReleaseAgeBehaviour: releaseConfig.minimumReleaseAgeBehaviour,
64
+ check: "minimumReleaseAge"
65
+ }, `${update.updateType} update of ${config.depName} has no releaseTimestamp to age against`);
66
+ }
67
+ if (ageCheck.isPending) {
68
+ logger.trace({
69
+ depName: config.depName,
70
+ updateType: update.updateType,
71
+ releaseTimestamp: newestMatchingVersionTimestamp,
72
+ check: "minimumReleaseAge"
73
+ }, `${update.updateType} update is pending minimumReleaseAge status checks`);
74
+ if (config.internalChecksFilter === "strict") update.pendingChecks = true;
75
+ }
76
+ }
34
77
  async function lookupUpdates(inconfig) {
35
78
  let config = { ...inconfig };
36
79
  config.versioning ??= getDefaultVersioning(config.datasource);
@@ -41,6 +84,8 @@ async function lookupUpdates(inconfig) {
41
84
  updates: [],
42
85
  warnings: []
43
86
  };
87
+ let newestMatchingVersionTimestamp;
88
+ let digestUpdate;
44
89
  try {
45
90
  logger.trace({
46
91
  dependency: config.packageName,
@@ -180,6 +225,10 @@ async function lookupUpdates(inconfig) {
180
225
  currentVersionTimestamp
181
226
  }, "current-timestamp");
182
227
  }
228
+ if (config.currentDigest && couldApplyMinimumReleaseAgeToDigest(config)) {
229
+ const newestMatchingVersion = getCurrentVersion(compareValue, "", versioningApi, "replace", latestVersion, allVersions.filter((v) => !v.isDeprecated).map((v) => v.version)) ?? getCurrentVersion(compareValue, "", versioningApi, "replace", latestVersion, allVersions.map((v) => v.version));
230
+ if (newestMatchingVersion) newestMatchingVersionTimestamp = await getTimestamp(config, allVersions, newestMatchingVersion, versioningApi);
231
+ }
183
232
  if (compareValue && currentVersion && rangeStrategy === "pin" && !versioningApi.isSingleVersion(compareValue)) {
184
233
  const newValue = versioningApi.getPinnedValue?.(currentVersion) ?? currentVersion;
185
234
  res.updates.push({
@@ -238,7 +287,10 @@ async function lookupUpdates(inconfig) {
238
287
  if (!release) return Result.ok(res);
239
288
  const newVersion = release.version;
240
289
  const update = await generateUpdate(config, compareValue, versioningApi, rangeStrategy, config.lockedVersion ?? currentVersion, bucket, release, allReleaseVersions);
241
- if (config.manager === "gomod" && compareValue?.startsWith("v0.0.0-") && update.newValue?.startsWith("v0.0.0-") && config.currentDigest !== update.newDigest) update.updateType = "digest";
290
+ if (config.manager === "gomod" && compareValue?.startsWith("v0.0.0-") && update.newValue?.startsWith("v0.0.0-") && config.currentDigest !== update.newDigest) {
291
+ update.updateType = "digest";
292
+ await applyMinimumReleaseAgeToDigestUpdate(update, config, res, release.releaseTimestamp);
293
+ }
242
294
  if (pendingChecks) update.pendingChecks = pendingChecks;
243
295
  if (pendingReleases.length) update.pendingVersions = pendingReleases.map((r) => r.version);
244
296
  if (!update.newValue || update.newValue === compareValue) {
@@ -293,10 +345,13 @@ async function lookupUpdates(inconfig) {
293
345
  }
294
346
  if (supportsDigests(config.datasource)) {
295
347
  if (config.currentDigest) {
296
- if (!config.digestOneAndOnly || !res.updates.length) res.updates.push({
297
- updateType: "digest",
298
- newValue: config.currentValue
299
- });
348
+ if (!config.digestOneAndOnly || !res.updates.length) {
349
+ digestUpdate = {
350
+ updateType: "digest",
351
+ newValue: config.currentValue
352
+ };
353
+ res.updates.push(digestUpdate);
354
+ }
300
355
  } else if (config.pinDigests && !res.updates.some((update) => update.updateType === "pin")) res.updates.push({
301
356
  isPinDigest: true,
302
357
  updateType: "pinDigest",
@@ -346,6 +401,7 @@ async function lookupUpdates(inconfig) {
346
401
  res.updates = res.updates.filter((update) => update.newValue !== null || config.currentValue === null).filter((update) => update.newDigest !== null).filter((update) => isString(update.newName) && update.newName !== config.packageName || update.isReplacement === true || update.newValue !== config.currentValue || update.isLockfileUpdate === true || update.newDigest && !update.newDigest.startsWith(config.currentDigest));
347
402
  if (config.rangeStrategy === "in-range-only") res.updates = res.updates.filter((update) => update.newValue === config.currentValue);
348
403
  if (config.rollbackPrs && config.followTag) res.updates = res.updates.filter((update) => update.updateType !== "rollback" || res.updates.length === 1);
404
+ if (digestUpdate && res.updates.includes(digestUpdate)) await applyMinimumReleaseAgeToDigestUpdate(digestUpdate, config, res, newestMatchingVersionTimestamp);
349
405
  const release = res.updates.length > 0 ? dependency?.releases.find((r) => r.version === res.updates[0].newValue) ?? dependency?.releases.find((r) => r.version === res.updates[0].newVersion) : null;
350
406
  if (release?.changelogContent) {
351
407
  res.changelogContent = release.changelogContent;