renovate 39.76.0 → 39.78.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/config/options/index.js +1 -0
- package/dist/config/options/index.js.map +1 -1
- package/dist/config/presets/internal/group.js +2 -1
- package/dist/config/presets/internal/group.js.map +1 -1
- package/dist/config/types.d.ts +2 -0
- package/dist/config/types.js.map +1 -1
- package/dist/modules/datasource/go/releases-goproxy.js +9 -1
- package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
- package/dist/modules/manager/bazel-module/index.js +1 -1
- package/dist/modules/manager/bazel-module/index.js.map +1 -1
- package/dist/modules/manager/fingerprint.generated.js +1 -1
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/gomod/artifacts.js +3 -2
- package/dist/modules/manager/gomod/artifacts.js.map +1 -1
- package/dist/modules/manager/npm/post-update/index.js +1 -1
- package/dist/modules/manager/npm/post-update/index.js.map +1 -1
- package/dist/modules/versioning/api.js +2 -0
- package/dist/modules/versioning/api.js.map +1 -1
- package/dist/modules/versioning/devbox/index.d.ts +7 -0
- package/dist/modules/versioning/devbox/index.js +65 -0
- package/dist/modules/versioning/devbox/index.js.map +1 -0
- package/dist/workers/global/config/parse/env.js +1 -1
- package/dist/workers/global/config/parse/env.js.map +1 -1
- package/dist/workers/repository/init/vulnerability.js +3 -3
- package/dist/workers/repository/init/vulnerability.js.map +1 -1
- package/dist/workers/repository/onboarding/branch/index.js +1 -1
- package/dist/workers/repository/onboarding/branch/index.js.map +1 -1
- package/dist/workers/repository/process/extract-update.js +1 -1
- package/dist/workers/repository/process/extract-update.js.map +1 -1
- package/package.json +7 -7
- package/renovate-schema.json +3 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vulnerability.js","sourceRoot":"","sources":["../../../../lib/workers/repository/init/vulnerability.ts"],"names":[],"mappings":";;AAyCA,kEAUC;AAGD,8DA8JC;;AAnND,sEAA4E;AAC5E,4CAAyC;AACzC,6DAAoE;AACpE,uDAA8D;AAC9D,6DAAoE;AACpE,yD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;YACpC,CAAC;QACH,CAAC;IACH,CAAC;IACD,eAAM,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,EAAE,qBAAqB,CAAC,CAAC;IAC3D,MAAM,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { PackageRule, RenovateConfig } from '../../../config/types';\nimport { NO_VULNERABILITY_ALERTS } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport { CrateDatasource } from '../../../modules/datasource/crate';\nimport { GoDatasource } from '../../../modules/datasource/go';\nimport { MavenDatasource } from '../../../modules/datasource/maven';\nimport { NpmDatasource } from '../../../modules/datasource/npm';\nimport { NugetDatasource } from '../../../modules/datasource/nuget';\nimport { PackagistDatasource } from '../../../modules/datasource/packagist';\nimport { PypiDatasource } from '../../../modules/datasource/pypi';\nimport { RubygemsDatasource } from '../../../modules/datasource/rubygems';\nimport { platform } from '../../../modules/platform';\nimport * as allVersioning from '../../../modules/versioning';\nimport * as composerVersioning from '../../../modules/versioning/composer';\nimport * as mavenVersioning from '../../../modules/versioning/maven';\nimport * as npmVersioning from '../../../modules/versioning/npm';\nimport * as pep440Versioning from '../../../modules/versioning/pep440';\nimport * as rubyVersioning from '../../../modules/versioning/ruby';\nimport * as semverVersioning from '../../../modules/versioning/semver';\nimport type { SecurityAdvisory } from '../../../types';\nimport { sanitizeMarkdown } from '../../../util/markdown';\n\ntype Datasource = string;\ntype DependencyName = string;\ntype FileName = string;\n\ntype CombinedAlert = Record<\n FileName,\n Record<\n Datasource,\n Record<\n DependencyName,\n {\n advisories: SecurityAdvisory[];\n fileType?: string;\n firstPatchedVersion?: string;\n }\n >\n >\n>;\n\nexport function getFixedVersionByDatasource(\n fixedVersion: string,\n datasource: string,\n): string {\n if (datasource === MavenDatasource.id || datasource === NugetDatasource.id) {\n return `[${fixedVersion},)`;\n }\n\n // crates.io, Go, Hex, npm, RubyGems, PyPI\n return `>= ${fixedVersion}`;\n}\n\n// TODO can return `null` and `undefined` (#22198)\nexport async function detectVulnerabilityAlerts(\n input: RenovateConfig,\n): Promise<RenovateConfig> {\n if (!input?.vulnerabilityAlerts) {\n return input;\n }\n if (input.vulnerabilityAlerts.enabled === false) {\n logger.debug('Vulnerability alerts are disabled');\n return input;\n }\n const alerts = await platform.getVulnerabilityAlerts?.();\n if (!alerts?.length) {\n logger.debug('No vulnerability alerts found');\n if (input.vulnerabilityAlertsOnly) {\n throw new Error(NO_VULNERABILITY_ALERTS);\n }\n return input;\n }\n const config = { ...input };\n const versionings: Record<string, string> = {\n 'github-tags': semverVersioning.id,\n go: semverVersioning.id,\n packagist: composerVersioning.id,\n maven: mavenVersioning.id,\n npm: npmVersioning.id,\n nuget: semverVersioning.id,\n pypi: pep440Versioning.id,\n rubygems: rubyVersioning.id,\n };\n const combinedAlerts: CombinedAlert = {};\n for (const alert of alerts) {\n try {\n if (alert.dismissed_reason) {\n continue;\n }\n if (!alert.security_vulnerability?.first_patched_version) {\n logger.debug(\n { alert },\n 'Vulnerability alert has no firstPatchedVersion - skipping',\n );\n continue;\n }\n const datasourceMapping: Record<string, string> = {\n composer: PackagistDatasource.id,\n go: GoDatasource.id,\n maven: MavenDatasource.id,\n npm: NpmDatasource.id,\n nuget: NugetDatasource.id,\n pip: PypiDatasource.id,\n rubygems: RubygemsDatasource.id,\n rust: CrateDatasource.id,\n };\n const datasource =\n datasourceMapping[alert.security_vulnerability.package.ecosystem];\n const depName = alert.security_vulnerability.package.name;\n const fileName = alert.dependency.manifest_path;\n const fileType = fileName.split('/').pop();\n const firstPatchedVersion =\n alert.security_vulnerability.first_patched_version.identifier;\n const advisory = alert.security_advisory;\n\n combinedAlerts[fileName] ||= {};\n combinedAlerts[fileName][datasource] ||= {};\n combinedAlerts[fileName][datasource][depName] ||= {\n advisories: [],\n };\n const alertDetails = combinedAlerts[fileName][datasource][depName];\n alertDetails.advisories.push(advisory);\n const versioningApi = allVersioning.get(versionings[datasource]);\n if (versioningApi.isVersion(firstPatchedVersion)) {\n if (\n !alertDetails.firstPatchedVersion ||\n versioningApi.isGreaterThan(\n firstPatchedVersion,\n alertDetails.firstPatchedVersion,\n )\n ) {\n alertDetails.firstPatchedVersion = firstPatchedVersion;\n }\n } else {\n logger.debug('Invalid firstPatchedVersion: ' + firstPatchedVersion);\n }\n alertDetails.fileType = fileType;\n } catch (err) {\n logger.warn({ err }, 'Error parsing vulnerability alert');\n }\n }\n const alertPackageRules: PackageRule[] = [];\n config.remediations = {} as never;\n for (const [fileName, files] of Object.entries(combinedAlerts)) {\n for (const [datasource, dependencies] of Object.entries(files)) {\n for (const [depName, val] of Object.entries(dependencies)) {\n let prBodyNotes: string[] = [];\n try {\n prBodyNotes = ['### GitHub Vulnerability Alerts'].concat(\n val.advisories.map((advisory) => {\n const identifiers = advisory.identifiers;\n const description = advisory.description;\n let content = '#### ';\n let heading: string;\n if (identifiers.some((id) => id.type === 'CVE')) {\n heading = identifiers\n .filter((id) => id.type === 'CVE')\n .map((id) => id.value)\n .join(' / ');\n } else {\n heading = identifiers.map((id) => id.value).join(' / ');\n }\n if (advisory.references?.length) {\n heading = `[${heading}](${advisory.references[0].url})`;\n }\n content += heading;\n content += '\\n\\n';\n\n content += sanitizeMarkdown(description);\n return content;\n }),\n );\n } catch (err) /* istanbul ignore next */ {\n logger.warn({ err }, 'Error generating vulnerability PR notes');\n }\n // TODO: types (#22198)\n const matchFileNames =\n datasource === GoDatasource.id\n ? [fileName.replace('go.sum', 'go.mod')]\n : [fileName];\n let matchRule: PackageRule = {\n matchDatasources: [datasource],\n matchPackageNames: [depName],\n matchFileNames,\n };\n\n let matchCurrentVersion = `< ${val.firstPatchedVersion}`;\n if (\n datasource === MavenDatasource.id ||\n datasource === NugetDatasource.id\n ) {\n matchCurrentVersion = `(,${val.firstPatchedVersion})`;\n }\n\n // Remediate only direct dependencies\n matchRule = {\n ...matchRule,\n matchCurrentVersion,\n vulnerabilityFixVersion: val.firstPatchedVersion,\n prBodyNotes,\n isVulnerabilityAlert: true,\n force: {\n ...config.vulnerabilityAlerts,\n },\n };\n alertPackageRules.push(matchRule);\n }\n }\n }\n logger.debug({ alertPackageRules }, 'alert package rules');\n config.packageRules = (config.packageRules ?? []).concat(alertPackageRules);\n return config;\n}\n"]}
|
1
|
+
{"version":3,"file":"vulnerability.js","sourceRoot":"","sources":["../../../../lib/workers/repository/init/vulnerability.ts"],"names":[],"mappings":";;AAyCA,kEAUC;AAGD,8DA8JC;;AAnND,sEAA4E;AAC5E,4CAAyC;AACzC,6DAAoE;AACpE,uDAA8D;AAC9D,6DAAoE;AACpE,yDAAgE;AAChE,6DAAoE;AACpE,qEAA4E;AAC5E,2DAAkE;AAClE,mEAA0E;AAC1E,wDAAqD;AACrD,mFAA6D;AAC7D,iGAA2E;AAC3E,2FAAqE;AACrE,uFAAiE;AACjE,6FAAuE;AACvE,yFAAmE;AACnE,6FAAuE;AAEvE,qDAA0D;AAqB1D,SAAgB,2BAA2B,CACzC,YAAoB,EACpB,UAAkB;IAElB,IAAI,UAAU,KAAK,uBAAe,CAAC,EAAE,IAAI,UAAU,KAAK,uBAAe,CAAC,EAAE,EAAE,CAAC;QAC3E,OAAO,IAAI,YAAY,IAAI,CAAC;IAC9B,CAAC;IAED,0CAA0C;IAC1C,OAAO,MAAM,YAAY,EAAE,CAAC;AAC9B,CAAC;AAED,kDAAkD;AAC3C,KAAK,UAAU,yBAAyB,CAC7C,KAAqB;IAErB,IAAI,CAAC,KAAK,EAAE,mBAAmB,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,KAAK,CAAC,mBAAmB,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAChD,eAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;QAClD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,mBAAQ,CAAC,sB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ACzD,IACE,UAAU,KAAK,uBAAe,CAAC,EAAE;oBACjC,UAAU,KAAK,uBAAe,CAAC,EAAE,EACjC,CAAC;oBACD,mBAAmB,GAAG,KAAK,GAAG,CAAC,mBAAmB,GAAG,CAAC;gBACxD,CAAC;gBAED,qCAAqC;gBACrC,SAAS,GAAG;oBACV,GAAG,SAAS;oBACZ,mBAAmB;oBACnB,uBAAuB,EAAE,GAAG,CAAC,mBAAmB;oBAChD,WAAW;oBACX,oBAAoB,EAAE,IAAI;oBAC1B,KAAK,EAAE;wBACL,GAAG,MAAM,CAAC,mBAAmB;qBAC9B;iBACF,CAAC;gBACF,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;IACH,CAAC;IACD,eAAM,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,EAAE,qBAAqB,CAAC,CAAC;IAC3D,MAAM,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { PackageRule, RenovateConfig } from '../../../config/types';\nimport { NO_VULNERABILITY_ALERTS } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport { CrateDatasource } from '../../../modules/datasource/crate';\nimport { GoDatasource } from '../../../modules/datasource/go';\nimport { MavenDatasource } from '../../../modules/datasource/maven';\nimport { NpmDatasource } from '../../../modules/datasource/npm';\nimport { NugetDatasource } from '../../../modules/datasource/nuget';\nimport { PackagistDatasource } from '../../../modules/datasource/packagist';\nimport { PypiDatasource } from '../../../modules/datasource/pypi';\nimport { RubygemsDatasource } from '../../../modules/datasource/rubygems';\nimport { platform } from '../../../modules/platform';\nimport * as allVersioning from '../../../modules/versioning';\nimport * as composerVersioning from '../../../modules/versioning/composer';\nimport * as mavenVersioning from '../../../modules/versioning/maven';\nimport * as npmVersioning from '../../../modules/versioning/npm';\nimport * as pep440Versioning from '../../../modules/versioning/pep440';\nimport * as rubyVersioning from '../../../modules/versioning/ruby';\nimport * as semverVersioning from '../../../modules/versioning/semver';\nimport type { SecurityAdvisory } from '../../../types';\nimport { sanitizeMarkdown } from '../../../util/markdown';\n\ntype Datasource = string;\ntype DependencyName = string;\ntype FileName = string;\n\ntype CombinedAlert = Record<\n FileName,\n Record<\n Datasource,\n Record<\n DependencyName,\n {\n advisories: SecurityAdvisory[];\n fileType?: string;\n firstPatchedVersion?: string;\n }\n >\n >\n>;\n\nexport function getFixedVersionByDatasource(\n fixedVersion: string,\n datasource: string,\n): string {\n if (datasource === MavenDatasource.id || datasource === NugetDatasource.id) {\n return `[${fixedVersion},)`;\n }\n\n // crates.io, Go, Hex, npm, RubyGems, PyPI\n return `>= ${fixedVersion}`;\n}\n\n// TODO can return `null` and `undefined` (#22198)\nexport async function detectVulnerabilityAlerts(\n input: RenovateConfig,\n): Promise<RenovateConfig> {\n if (!input?.vulnerabilityAlerts) {\n return input;\n }\n if (input.vulnerabilityAlerts.enabled === false) {\n logger.debug('Vulnerability alerts are disabled');\n return input;\n }\n const alerts = await platform.getVulnerabilityAlerts?.();\n if (!alerts?.length) {\n logger.debug('No vulnerability alerts found');\n if (input.vulnerabilityAlertsOnly) {\n throw new Error(NO_VULNERABILITY_ALERTS);\n }\n return input;\n }\n const config = { ...input };\n const versionings: Record<string, string> = {\n 'github-tags': semverVersioning.id,\n go: semverVersioning.id,\n packagist: composerVersioning.id,\n maven: mavenVersioning.id,\n npm: npmVersioning.id,\n nuget: semverVersioning.id,\n pypi: pep440Versioning.id,\n rubygems: rubyVersioning.id,\n };\n const combinedAlerts: CombinedAlert = {};\n for (const alert of alerts) {\n try {\n if (alert.dismissed_reason) {\n continue;\n }\n if (!alert.security_vulnerability?.first_patched_version) {\n logger.debug(\n { alert },\n 'Vulnerability alert has no firstPatchedVersion - skipping',\n );\n continue;\n }\n const datasourceMapping: Record<string, string> = {\n composer: PackagistDatasource.id,\n go: GoDatasource.id,\n maven: MavenDatasource.id,\n npm: NpmDatasource.id,\n nuget: NugetDatasource.id,\n pip: PypiDatasource.id,\n rubygems: RubygemsDatasource.id,\n rust: CrateDatasource.id,\n };\n const datasource =\n datasourceMapping[alert.security_vulnerability.package.ecosystem];\n const depName = alert.security_vulnerability.package.name;\n const fileName = alert.dependency.manifest_path;\n const fileType = fileName.split('/').pop();\n const firstPatchedVersion =\n alert.security_vulnerability.first_patched_version.identifier;\n const advisory = alert.security_advisory;\n\n combinedAlerts[fileName] ??= {};\n combinedAlerts[fileName][datasource] ??= {};\n combinedAlerts[fileName][datasource][depName] ??= {\n advisories: [],\n };\n const alertDetails = combinedAlerts[fileName][datasource][depName];\n alertDetails.advisories.push(advisory);\n const versioningApi = allVersioning.get(versionings[datasource]);\n if (versioningApi.isVersion(firstPatchedVersion)) {\n if (\n !alertDetails.firstPatchedVersion ||\n versioningApi.isGreaterThan(\n firstPatchedVersion,\n alertDetails.firstPatchedVersion,\n )\n ) {\n alertDetails.firstPatchedVersion = firstPatchedVersion;\n }\n } else {\n logger.debug('Invalid firstPatchedVersion: ' + firstPatchedVersion);\n }\n alertDetails.fileType = fileType;\n } catch (err) {\n logger.warn({ err }, 'Error parsing vulnerability alert');\n }\n }\n const alertPackageRules: PackageRule[] = [];\n config.remediations = {} as never;\n for (const [fileName, files] of Object.entries(combinedAlerts)) {\n for (const [datasource, dependencies] of Object.entries(files)) {\n for (const [depName, val] of Object.entries(dependencies)) {\n let prBodyNotes: string[] = [];\n try {\n prBodyNotes = ['### GitHub Vulnerability Alerts'].concat(\n val.advisories.map((advisory) => {\n const identifiers = advisory.identifiers;\n const description = advisory.description;\n let content = '#### ';\n let heading: string;\n if (identifiers.some((id) => id.type === 'CVE')) {\n heading = identifiers\n .filter((id) => id.type === 'CVE')\n .map((id) => id.value)\n .join(' / ');\n } else {\n heading = identifiers.map((id) => id.value).join(' / ');\n }\n if (advisory.references?.length) {\n heading = `[${heading}](${advisory.references[0].url})`;\n }\n content += heading;\n content += '\\n\\n';\n\n content += sanitizeMarkdown(description);\n return content;\n }),\n );\n } catch (err) /* istanbul ignore next */ {\n logger.warn({ err }, 'Error generating vulnerability PR notes');\n }\n // TODO: types (#22198)\n const matchFileNames =\n datasource === GoDatasource.id\n ? [fileName.replace('go.sum', 'go.mod')]\n : [fileName];\n let matchRule: PackageRule = {\n matchDatasources: [datasource],\n matchPackageNames: [depName],\n matchFileNames,\n };\n\n let matchCurrentVersion = `< ${val.firstPatchedVersion}`;\n if (\n datasource === MavenDatasource.id ||\n datasource === NugetDatasource.id\n ) {\n matchCurrentVersion = `(,${val.firstPatchedVersion})`;\n }\n\n // Remediate only direct dependencies\n matchRule = {\n ...matchRule,\n matchCurrentVersion,\n vulnerabilityFixVersion: val.firstPatchedVersion,\n prBodyNotes,\n isVulnerabilityAlert: true,\n force: {\n ...config.vulnerabilityAlerts,\n },\n };\n alertPackageRules.push(matchRule);\n }\n }\n }\n logger.debug({ alertPackageRules }, 'alert package rules');\n config.packageRules = (config.packageRules ?? []).concat(alertPackageRules);\n return config;\n}\n"]}
|
@@ -123,7 +123,7 @@ function handleOnboardingManualRebase(onboardingPr) {
|
|
123
123
|
}
|
124
124
|
function invalidateExtractCache(baseBranch) {
|
125
125
|
const cache = (0, repository_1.getCache)();
|
126
|
-
cache.scan
|
126
|
+
cache.scan ??= {};
|
127
127
|
if (cache.scan?.[baseBranch]) {
|
128
128
|
delete cache.scan[baseBranch];
|
129
129
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/onboarding/branch/index.ts"],"names":[],"mappings":";;AA0BA,sDAqHC;;AA/ID,kEAAkC;AAClC,+CAAsD;AACtD,sDAAyD;AAEzD,yEAAmF;AACnF,+CAA4C;AAC5C,2DAAiE;AACjE,0DAAuD;AACvD,kEAA6D;AAC7D,8CAAqE;AACrE,iDAAqD;AACrD,2CAAuD;AACvD,4CAAuD;AACvD,sCAA4C;AAC5C,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AqB,EACrB,gBAAwB;IAExB,MAAM,KAAK,GAAG,IAAA,qBAAQ,GAAE,CAAC;IACzB,MAAM,qBAAqB,GAAG,KAAK,EAAE,qBAAqB,CAAC;IAC3D,OAAO,CAAC,CAAC,CACP,qBAAqB;QACrB,qBAAqB,CAAC,gBAAgB,KAAK,IAAA,qBAAe,EAAC,aAAa,CAAC;QACzE,qBAAqB,CAAC,mBAAmB;YACvC,IAAA,qBAAe,EAAC,gBAAgB,CAAC;QACnC,qBAAqB,CAAC,cAAc;QACpC,qBAAqB,CAAC,gBAAgB,CACvC,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,EAAM;IACjC,MAAM,QAAQ,GAAG,qBAAY,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;IAC/C,yDAAyD;IACzD,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;AACxC,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { mergeChildConfig } from '../../../../config';\nimport { GlobalConfig } from '../../../../config/global';\nimport type { RenovateConfig } from '../../../../config/types';\nimport { REPOSITORY_NO_PACKAGE_FILES } from '../../../../constants/error-messages';\nimport { logger } from '../../../../logger';\nimport { type Pr, platform } from '../../../../modules/platform';\nimport { scm } from '../../../../modules/platform/scm';\nimport { getCache } from '../../../../util/cache/repository';\nimport { getBranchCommit, setGitAuthor } from '../../../../util/git';\nimport { checkIfConfigured } from '../../configured';\nimport { extractAllDependencies } from '../../extract';\nimport { mergeRenovateConfig } from '../../init/merge';\nimport { OnboardingState } from '../common';\nimport { getOnboardingPr, isOnboarded } from './check';\nimport { getOnboardingConfig } from './config';\nimport { createOnboardingBranch } from './create';\nimport {\n deleteOnboardingCache,\n hasOnboardingBranchChanged,\n isOnboardingBranchConflicted,\n isOnboardingBranchModified,\n setOnboardingCache,\n} from './onboarding-branch-cache';\nimport { rebaseOnboardingBranch } from './rebase';\n\nexport async function checkOnboardingBranch(\n config: RenovateConfig,\n): Promise<RenovateConfig> {\n logger.debug('checkOnboarding()');\n logger.trace({ config });\n let onboardingBranch = config.onboardingBranch;\n const defaultBranch = config.defaultBranch!;\n let isConflicted = false;\n let isModified = false;\n const repoIsOnboarded = await isOnboarded(config);\n if (repoIsOnboarded) {\n logger.debug('Repo is onboarded');\n\n // delete onboarding cache\n deleteOnboardingCache();\n return { ...config, repoIsOnboarded };\n }\n checkIfConfigured(config);\n\n logger.debug('Repo is not onboarded');\n // global gitAuthor will need to be used\n setGitAuthor(config.gitAuthor);\n const onboardingPr = await getOnboardingPr(config);\n // TODO #22198\n const branchList = [onboardingBranch!];\n if (onboardingPr) {\n logger.debug('Onboarding PR already exists');\n\n isModified = await isOnboardingBranchModified(\n config.onboardingBranch!,\n defaultBranch,\n );\n // if onboarding branch is not modified, check if onboarding config has been changed and rebase if true\n if (!isModified) {\n const commit = await rebaseOnboardingBranch(\n config,\n onboardingPr.bodyStruct?.rawConfigHash,\n );\n if (commit) {\n logger.info(\n { branch: config.onboardingBranch, commit, onboarding: true },\n 'Branch updated',\n );\n }\n // istanbul ignore if\n if (platform.refreshPr) {\n await platform.refreshPr(onboardingPr.number);\n }\n }\n if (config.onboardingRebaseCheckbox) {\n handleOnboardingManualRebase(onboardingPr);\n }\n\n if (\n isConfigHashPresent(onboardingPr) && // needed so that existing onboarding PRs are updated with config hash comment\n isOnboardingCacheValid(defaultBranch, config.onboardingBranch!) &&\n !(config.onboardingRebaseCheckbox && OnboardingState.prUpdateRequested)\n ) {\n logger.debug(\n 'Skip processing since the onboarding branch is up to date and default branch has not changed',\n );\n OnboardingState.onboardingCacheValid = true;\n return { ...config, repoIsOnboarded, onboardingBranch, branchList };\n }\n OnboardingState.onboardingCacheValid = false;\n if (isModified) {\n if (hasOnboardingBranchChanged(config.onboardingBranch!)) {\n invalidateExtractCache(config.baseBranch!);\n }\n isConflicted = await isOnboardingBranchConflicted(\n config.baseBranch!,\n config.onboardingBranch!,\n );\n }\n } else {\n logger.debug('Onboarding PR does not exist');\n const onboardingConfig = await getOnboardingConfig(config);\n let mergedConfig = mergeChildConfig(config, onboardingConfig);\n mergedConfig = await mergeRenovateConfig(mergedConfig);\n onboardingBranch = mergedConfig.onboardingBranch;\n\n if (\n Object.entries((await extractAllDependencies(mergedConfig)).packageFiles)\n .length === 0\n ) {\n if (config.onboardingNoDeps !== 'enabled') {\n throw new Error(REPOSITORY_NO_PACKAGE_FILES);\n }\n }\n logger.debug('Need to create onboarding PR');\n if (config.onboardingRebaseCheckbox) {\n OnboardingState.prUpdateRequested = true;\n }\n const commit = await createOnboardingBranch(mergedConfig);\n // istanbul ignore if\n if (commit) {\n logger.info(\n { branch: onboardingBranch, commit, onboarding: true },\n 'Branch created',\n );\n }\n }\n if (!GlobalConfig.get('dryRun')) {\n // TODO #22198\n if (!isConflicted) {\n logger.debug('Merge onboarding branch in default branch');\n await scm.mergeToLocal(onboardingBranch!);\n }\n }\n setOnboardingCache(\n getBranchCommit(config.defaultBranch!)!,\n getBranchCommit(onboardingBranch!)!,\n isConflicted,\n isModified,\n );\n\n return { ...config, repoIsOnboarded, onboardingBranch, branchList };\n}\n\nfunction handleOnboardingManualRebase(onboardingPr: Pr): void {\n const pl = GlobalConfig.get('platform')!;\n const { rebaseRequested } = onboardingPr.bodyStruct ?? {};\n if (!['github', 'gitlab', 'gitea'].includes(pl)) {\n logger.trace(`Platform '${pl}' does not support extended markdown`);\n OnboardingState.prUpdateRequested = true;\n } else if (is.nullOrUndefined(rebaseRequested)) {\n logger.debug('No rebase checkbox was found in the onboarding PR');\n OnboardingState.prUpdateRequested = true;\n } else if (rebaseRequested) {\n logger.debug('Manual onboarding PR update requested');\n OnboardingState.prUpdateRequested = true;\n }\n}\n\nfunction invalidateExtractCache(baseBranch: string): void {\n const cache = getCache();\n cache.scan ||= {};\n\n if (cache.scan?.[baseBranch]) {\n delete cache.scan[baseBranch];\n }\n}\n\nfunction isOnboardingCacheValid(\n defaultBranch: string,\n onboardingBranch: string,\n): boolean {\n const cache = getCache();\n const onboardingBranchCache = cache?.onboardingBranchCache;\n return !!(\n onboardingBranchCache &&\n onboardingBranchCache.defaultBranchSha === getBranchCommit(defaultBranch) &&\n onboardingBranchCache.onboardingBranchSha ===\n getBranchCommit(onboardingBranch) &&\n onboardingBranchCache.configFileName &&\n onboardingBranchCache.configFileParsed\n );\n}\n\nfunction isConfigHashPresent(pr: Pr): boolean {\n const platform = GlobalConfig.get('platform')!;\n // if platform does not support html comments return true\n if (!['github', 'gitlab', 'gitea'].includes(platform)) {\n return true;\n }\n\n return !!pr.bodyStruct?.rawConfigHash;\n}\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/onboarding/branch/index.ts"],"names":[],"mappings":";;AA0BA,sDAqHC;;AA/ID,kEAAkC;AAClC,+CAAsD;AACtD,sDAAyD;AAEzD,yEAAmF;AACnF,+CAA4C;AAC5C,2DAAiE;AACjE,0DAAuD;AACvD,kEAA6D;AAC7D,8CAAqE;AACrE,iDAAqD;AACrD,2CAAuD;AACvD,4CAAuD;AACvD,sCAA4C;AAC5C,mCAAuD;AACvD,qCAA+C;AAC/C,qCAAkD;AAClD,uEAMmC;AACnC,qCAAkD;AAE3C,KAAK,UAAU,qBAAqB,CACzC,MAAsB;IAEtB,eAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAClC,eAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACzB,IAAI,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAC/C,MAAM,aAAa,GAAG,MAAM,CAAC,aAAc,CAAC;IAC5C,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,MAAM,eAAe,GAAG,MAAM,I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AAG,qBAAY,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;IAC/C,yDAAyD;IACzD,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;AACxC,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { mergeChildConfig } from '../../../../config';\nimport { GlobalConfig } from '../../../../config/global';\nimport type { RenovateConfig } from '../../../../config/types';\nimport { REPOSITORY_NO_PACKAGE_FILES } from '../../../../constants/error-messages';\nimport { logger } from '../../../../logger';\nimport { type Pr, platform } from '../../../../modules/platform';\nimport { scm } from '../../../../modules/platform/scm';\nimport { getCache } from '../../../../util/cache/repository';\nimport { getBranchCommit, setGitAuthor } from '../../../../util/git';\nimport { checkIfConfigured } from '../../configured';\nimport { extractAllDependencies } from '../../extract';\nimport { mergeRenovateConfig } from '../../init/merge';\nimport { OnboardingState } from '../common';\nimport { getOnboardingPr, isOnboarded } from './check';\nimport { getOnboardingConfig } from './config';\nimport { createOnboardingBranch } from './create';\nimport {\n deleteOnboardingCache,\n hasOnboardingBranchChanged,\n isOnboardingBranchConflicted,\n isOnboardingBranchModified,\n setOnboardingCache,\n} from './onboarding-branch-cache';\nimport { rebaseOnboardingBranch } from './rebase';\n\nexport async function checkOnboardingBranch(\n config: RenovateConfig,\n): Promise<RenovateConfig> {\n logger.debug('checkOnboarding()');\n logger.trace({ config });\n let onboardingBranch = config.onboardingBranch;\n const defaultBranch = config.defaultBranch!;\n let isConflicted = false;\n let isModified = false;\n const repoIsOnboarded = await isOnboarded(config);\n if (repoIsOnboarded) {\n logger.debug('Repo is onboarded');\n\n // delete onboarding cache\n deleteOnboardingCache();\n return { ...config, repoIsOnboarded };\n }\n checkIfConfigured(config);\n\n logger.debug('Repo is not onboarded');\n // global gitAuthor will need to be used\n setGitAuthor(config.gitAuthor);\n const onboardingPr = await getOnboardingPr(config);\n // TODO #22198\n const branchList = [onboardingBranch!];\n if (onboardingPr) {\n logger.debug('Onboarding PR already exists');\n\n isModified = await isOnboardingBranchModified(\n config.onboardingBranch!,\n defaultBranch,\n );\n // if onboarding branch is not modified, check if onboarding config has been changed and rebase if true\n if (!isModified) {\n const commit = await rebaseOnboardingBranch(\n config,\n onboardingPr.bodyStruct?.rawConfigHash,\n );\n if (commit) {\n logger.info(\n { branch: config.onboardingBranch, commit, onboarding: true },\n 'Branch updated',\n );\n }\n // istanbul ignore if\n if (platform.refreshPr) {\n await platform.refreshPr(onboardingPr.number);\n }\n }\n if (config.onboardingRebaseCheckbox) {\n handleOnboardingManualRebase(onboardingPr);\n }\n\n if (\n isConfigHashPresent(onboardingPr) && // needed so that existing onboarding PRs are updated with config hash comment\n isOnboardingCacheValid(defaultBranch, config.onboardingBranch!) &&\n !(config.onboardingRebaseCheckbox && OnboardingState.prUpdateRequested)\n ) {\n logger.debug(\n 'Skip processing since the onboarding branch is up to date and default branch has not changed',\n );\n OnboardingState.onboardingCacheValid = true;\n return { ...config, repoIsOnboarded, onboardingBranch, branchList };\n }\n OnboardingState.onboardingCacheValid = false;\n if (isModified) {\n if (hasOnboardingBranchChanged(config.onboardingBranch!)) {\n invalidateExtractCache(config.baseBranch!);\n }\n isConflicted = await isOnboardingBranchConflicted(\n config.baseBranch!,\n config.onboardingBranch!,\n );\n }\n } else {\n logger.debug('Onboarding PR does not exist');\n const onboardingConfig = await getOnboardingConfig(config);\n let mergedConfig = mergeChildConfig(config, onboardingConfig);\n mergedConfig = await mergeRenovateConfig(mergedConfig);\n onboardingBranch = mergedConfig.onboardingBranch;\n\n if (\n Object.entries((await extractAllDependencies(mergedConfig)).packageFiles)\n .length === 0\n ) {\n if (config.onboardingNoDeps !== 'enabled') {\n throw new Error(REPOSITORY_NO_PACKAGE_FILES);\n }\n }\n logger.debug('Need to create onboarding PR');\n if (config.onboardingRebaseCheckbox) {\n OnboardingState.prUpdateRequested = true;\n }\n const commit = await createOnboardingBranch(mergedConfig);\n // istanbul ignore if\n if (commit) {\n logger.info(\n { branch: onboardingBranch, commit, onboarding: true },\n 'Branch created',\n );\n }\n }\n if (!GlobalConfig.get('dryRun')) {\n // TODO #22198\n if (!isConflicted) {\n logger.debug('Merge onboarding branch in default branch');\n await scm.mergeToLocal(onboardingBranch!);\n }\n }\n setOnboardingCache(\n getBranchCommit(config.defaultBranch!)!,\n getBranchCommit(onboardingBranch!)!,\n isConflicted,\n isModified,\n );\n\n return { ...config, repoIsOnboarded, onboardingBranch, branchList };\n}\n\nfunction handleOnboardingManualRebase(onboardingPr: Pr): void {\n const pl = GlobalConfig.get('platform')!;\n const { rebaseRequested } = onboardingPr.bodyStruct ?? {};\n if (!['github', 'gitlab', 'gitea'].includes(pl)) {\n logger.trace(`Platform '${pl}' does not support extended markdown`);\n OnboardingState.prUpdateRequested = true;\n } else if (is.nullOrUndefined(rebaseRequested)) {\n logger.debug('No rebase checkbox was found in the onboarding PR');\n OnboardingState.prUpdateRequested = true;\n } else if (rebaseRequested) {\n logger.debug('Manual onboarding PR update requested');\n OnboardingState.prUpdateRequested = true;\n }\n}\n\nfunction invalidateExtractCache(baseBranch: string): void {\n const cache = getCache();\n cache.scan ??= {};\n\n if (cache.scan?.[baseBranch]) {\n delete cache.scan[baseBranch];\n }\n}\n\nfunction isOnboardingCacheValid(\n defaultBranch: string,\n onboardingBranch: string,\n): boolean {\n const cache = getCache();\n const onboardingBranchCache = cache?.onboardingBranchCache;\n return !!(\n onboardingBranchCache &&\n onboardingBranchCache.defaultBranchSha === getBranchCommit(defaultBranch) &&\n onboardingBranchCache.onboardingBranchSha ===\n getBranchCommit(onboardingBranch) &&\n onboardingBranchCache.configFileName &&\n onboardingBranchCache.configFileParsed\n );\n}\n\nfunction isConfigHashPresent(pr: Pr): boolean {\n const platform = GlobalConfig.get('platform')!;\n // if platform does not support html comments return true\n if (!['github', 'gitlab', 'gitea'].includes(platform)) {\n return true;\n }\n\n return !!pr.bodyStruct?.rawConfigHash;\n}\n"]}
|
@@ -95,7 +95,7 @@ async function extract(config) {
|
|
95
95
|
const baseBranchSha = await scm_1.scm.getBranchCommit(baseBranch);
|
96
96
|
let packageFiles;
|
97
97
|
const cache = (0, repository_1.getCache)();
|
98
|
-
cache.scan
|
98
|
+
cache.scan ??= {};
|
99
99
|
const cachedExtract = cache.scan[baseBranch];
|
100
100
|
const configHash = (0, fingerprint_1.fingerprint)((0, extract_fingerprint_config_1.generateFingerprintConfig)(config));
|
101
101
|
// istanbul ignore if
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"extract-update.js","sourceRoot":"","sources":["../../../../lib/workers/repository/process/extract-update.ts"],"names":[],"mappings":";;;AAqEA,kDA2DC;AAED,0BAyDC;AAoBD,wBAgBC;AAED,wBAWC;;AA5OD,kEAAkC;AAElC,4CAAyC;AACzC,sDAAmD;AAEnD,uDAAoD;AACpD,+DAA0D;AAE1D,2DAAkF;AAClF,2DAAwD;AAExD,wCAAoD;AACpD,sFAAkF;AAClF,oDAAyD;AACzD,mCAAuC;AACvC,iCAAsC;AACtC,uDAAoD;AAEpD,mCAAuC;AAEvC,6DAA6D;AAChD,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAkBxC,uBAAuB;AACvB,SAAS,YAAY,CACnB,YAA2C;IAE3C,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAU;QACnB,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC;SACZ;KACF,CAAC;IACF,KAAK,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1E,MAAM,SAAS,GAAG,mBAAmB,CAAC,MAAM,CAAC;QAC7C,IAAI,QAAQ,G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AAM,EACN,YAAY,CACb,CAAC;IACF,eAAM,CAAC,KAAK,CACV,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,EACvD,2BAA2B,CAC5B,CAAC;IACF,IAAA,mBAAY,EAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAChD,CAAC;AAEM,KAAK,UAAU,MAAM,CAC1B,MAAsB,EACtB,QAAwB;IAExB,IAAI,GAAkC,CAAC;IACvC,uBAAuB;IACvB,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,GAAG,GAAG,MAAM,IAAA,oBAAY,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport type { RenovateConfig } from '../../../config/types';\nimport { logger } from '../../../logger';\nimport { hashMap } from '../../../modules/manager';\nimport type { PackageFile } from '../../../modules/manager/types';\nimport { scm } from '../../../modules/platform/scm';\nimport { getCache } from '../../../util/cache/repository';\nimport type { BaseBranchCache } from '../../../util/cache/repository/types';\nimport { checkGithubToken as ensureGithubToken } from '../../../util/check-token';\nimport { fingerprint } from '../../../util/fingerprint';\nimport type { BranchConfig } from '../../types';\nimport { extractAllDependencies } from '../extract';\nimport { generateFingerprintConfig } from '../extract/extract-fingerprint-config';\nimport { branchifyUpgrades } from '../updates/branchify';\nimport { fetchUpdates } from './fetch';\nimport { sortBranches } from './sort';\nimport { Vulnerabilities } from './vulnerabilities';\nimport type { WriteUpdateResult } from './write';\nimport { writeUpdates } from './write';\n\n// Increment this if needing to cache bust ALL extract caches\nexport const EXTRACT_CACHE_REVISION = 1;\n\nexport interface ExtractResult {\n branches: BranchConfig[];\n branchList: string[];\n packageFiles: Record<string, PackageFile[]>;\n}\n\nexport interface StatsResult {\n fileCount: number;\n depCount: number;\n}\n\nexport interface Stats {\n managers: Record<string, StatsResult>;\n total: StatsResult;\n}\n\n// istanbul ignore next\nfunction extractStats(\n packageFiles: Record<string, PackageFile[]>,\n): Stats | null {\n if (!packageFiles) {\n return null;\n }\n const stats: Stats = {\n managers: {},\n total: {\n fileCount: 0,\n depCount: 0,\n },\n };\n for (const [manager, managerPackageFiles] of Object.entries(packageFiles)) {\n const fileCount = managerPackageFiles.length;\n let depCount = 0;\n for (const file of managerPackageFiles) {\n depCount += file.deps.length;\n }\n stats.managers[manager] = {\n fileCount,\n depCount,\n };\n stats.total.fileCount += fileCount;\n stats.total.depCount += depCount;\n }\n return stats;\n}\n\nexport function isCacheExtractValid(\n baseBranchSha: string,\n configHash: string,\n cachedExtract?: BaseBranchCache,\n): boolean {\n if (!cachedExtract) {\n return false;\n }\n\n if (!cachedExtract.revision) {\n logger.debug('Cached extract is missing revision, so cannot be used');\n return false;\n }\n\n if (cachedExtract.revision !== EXTRACT_CACHE_REVISION) {\n logger.debug(\n `Extract cache revision has changed (old=${cachedExtract.revision}, new=${EXTRACT_CACHE_REVISION})`,\n );\n return false;\n }\n\n if (!(cachedExtract.sha && cachedExtract.configHash)) {\n return false;\n }\n if (cachedExtract.sha !== baseBranchSha) {\n logger.debug(\n `Cached extract result cannot be used due to base branch SHA change (old=${cachedExtract.sha}, new=${baseBranchSha})`,\n );\n return false;\n }\n if (cachedExtract.configHash !== configHash) {\n logger.debug('Cached extract result cannot be used due to config change');\n return false;\n }\n if (!cachedExtract.extractionFingerprints) {\n logger.debug(\n 'Cached extract is missing extractionFingerprints, so cannot be used',\n );\n return false;\n }\n const changedManagers = new Set();\n for (const [manager, fingerprint] of Object.entries(\n cachedExtract.extractionFingerprints,\n )) {\n if (fingerprint !== hashMap.get(manager)) {\n changedManagers.add(manager);\n }\n }\n if (changedManagers.size > 0) {\n logger.debug(\n { changedManagers: [...changedManagers] },\n 'Manager fingerprint(s) have changed, extract cache cannot be reused',\n );\n return false;\n }\n logger.debug(\n `Cached extract for sha=${baseBranchSha} is valid and can be used`,\n );\n return true;\n}\n\nexport async function extract(\n config: RenovateConfig,\n): Promise<Record<string, PackageFile[]>> {\n logger.debug('extract()');\n const { baseBranch } = config;\n const baseBranchSha = await scm.getBranchCommit(baseBranch!);\n let packageFiles: Record<string, PackageFile[]>;\n const cache = getCache();\n cache.scan ||= {};\n const cachedExtract = cache.scan[baseBranch!];\n const configHash = fingerprint(generateFingerprintConfig(config));\n // istanbul ignore if\n if (isCacheExtractValid(baseBranchSha!, configHash, cachedExtract)) {\n packageFiles = cachedExtract.packageFiles;\n try {\n for (const files of Object.values(packageFiles)) {\n for (const file of files) {\n for (const dep of file.deps) {\n delete dep.updates;\n }\n }\n }\n logger.debug('Deleted cached dep updates');\n } catch (err) {\n logger.info({ err }, 'Error deleting cached dep updates');\n }\n } else {\n await scm.checkoutBranch(baseBranch!);\n const extractResult = (await extractAllDependencies(config)) || {};\n packageFiles = extractResult.packageFiles;\n const { extractionFingerprints } = extractResult;\n // TODO: fix types (#22198)\n cache.scan[baseBranch!] = {\n revision: EXTRACT_CACHE_REVISION,\n sha: baseBranchSha!,\n configHash,\n extractionFingerprints,\n packageFiles,\n };\n // Clean up cached branch extracts\n const baseBranches = is.nonEmptyArray(config.baseBranches)\n ? config.baseBranches\n : [baseBranch];\n Object.keys(cache.scan).forEach((branchName) => {\n if (!baseBranches.includes(branchName)) {\n delete cache.scan![branchName];\n }\n });\n }\n const stats = extractStats(packageFiles);\n logger.info(\n { baseBranch: config.baseBranch, stats },\n `Dependency extraction complete`,\n );\n logger.trace({ config: packageFiles }, 'packageFiles');\n ensureGithubToken(packageFiles);\n return packageFiles;\n}\n\nasync function fetchVulnerabilities(\n config: RenovateConfig,\n packageFiles: Record<string, PackageFile[]>,\n): Promise<void> {\n if (config.osvVulnerabilityAlerts) {\n logger.debug('fetchVulnerabilities() - osvVulnerabilityAlerts=true');\n try {\n const vulnerabilities = await Vulnerabilities.create();\n await vulnerabilities.appendVulnerabilityPackageRules(\n config,\n packageFiles,\n );\n } catch (err) {\n logger.warn({ err }, 'Unable to read vulnerability information');\n }\n }\n}\n\nexport async function lookup(\n config: RenovateConfig,\n packageFiles: Record<string, PackageFile[]>,\n): Promise<ExtractResult> {\n await fetchVulnerabilities(config, packageFiles);\n await fetchUpdates(config, packageFiles);\n const { branches, branchList } = await branchifyUpgrades(\n config,\n packageFiles,\n );\n logger.debug(\n { baseBranch: config.baseBranch, config: packageFiles },\n 'packageFiles with updates',\n );\n sortBranches(branches);\n return { branches, branchList, packageFiles };\n}\n\nexport async function update(\n config: RenovateConfig,\n branches: BranchConfig[],\n): Promise<WriteUpdateResult | undefined> {\n let res: WriteUpdateResult | undefined;\n // istanbul ignore else\n if (config.repoIsOnboarded) {\n res = await writeUpdates(config, branches);\n }\n\n return res;\n}\n"]}
|
1
|
+
{"version":3,"file":"extract-update.js","sourceRoot":"","sources":["../../../../lib/workers/repository/process/extract-update.ts"],"names":[],"mappings":";;;AAqEA,kDA2DC;AAED,0BAyDC;AAoBD,wBAgBC;AAED,wBAWC;;AA5OD,kEAAkC;AAElC,4CAAyC;AACzC,sDAAmD;AAEnD,uDAAoD;AACpD,+DAA0D;AAE1D,2DAAkF;AAClF,2DAAwD;AAExD,wCAAoD;AACpD,sFAAkF;AAClF,oDAAyD;AACzD,mCAAuC;AACvC,iCAAsC;AACtC,uDAAoD;AAEpD,mCAAuC;AAEvC,6DAA6D;AAChD,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAkBxC,uBAAuB;AACvB,SAAS,YAAY,CACnB,YAA2C;IAE3C,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAU;QACnB,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC;SACZ;KACF,CAAC;IACF,KAAK,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CA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CAAC,CAAC;IACzC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,6BAAiB,EACtD,MAAM,EACN,YAAY,CACb,CAAC;IACF,eAAM,CAAC,KAAK,CACV,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,EACvD,2BAA2B,CAC5B,CAAC;IACF,IAAA,mBAAY,EAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAChD,CAAC;AAEM,KAAK,UAAU,MAAM,CAC1B,MAAsB,EACtB,QAAwB;IAExB,IAAI,GAAkC,CAAC;IACvC,uBAAuB;IACvB,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,GAAG,GAAG,MAAM,IAAA,oBAAY,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport type { RenovateConfig } from '../../../config/types';\nimport { logger } from '../../../logger';\nimport { hashMap } from '../../../modules/manager';\nimport type { PackageFile } from '../../../modules/manager/types';\nimport { scm } from '../../../modules/platform/scm';\nimport { getCache } from '../../../util/cache/repository';\nimport type { BaseBranchCache } from '../../../util/cache/repository/types';\nimport { checkGithubToken as ensureGithubToken } from '../../../util/check-token';\nimport { fingerprint } from '../../../util/fingerprint';\nimport type { BranchConfig } from '../../types';\nimport { extractAllDependencies } from '../extract';\nimport { generateFingerprintConfig } from '../extract/extract-fingerprint-config';\nimport { branchifyUpgrades } from '../updates/branchify';\nimport { fetchUpdates } from './fetch';\nimport { sortBranches } from './sort';\nimport { Vulnerabilities } from './vulnerabilities';\nimport type { WriteUpdateResult } from './write';\nimport { writeUpdates } from './write';\n\n// Increment this if needing to cache bust ALL extract caches\nexport const EXTRACT_CACHE_REVISION = 1;\n\nexport interface ExtractResult {\n branches: BranchConfig[];\n branchList: string[];\n packageFiles: Record<string, PackageFile[]>;\n}\n\nexport interface StatsResult {\n fileCount: number;\n depCount: number;\n}\n\nexport interface Stats {\n managers: Record<string, StatsResult>;\n total: StatsResult;\n}\n\n// istanbul ignore next\nfunction extractStats(\n packageFiles: Record<string, PackageFile[]>,\n): Stats | null {\n if (!packageFiles) {\n return null;\n }\n const stats: Stats = {\n managers: {},\n total: {\n fileCount: 0,\n depCount: 0,\n },\n };\n for (const [manager, managerPackageFiles] of Object.entries(packageFiles)) {\n const fileCount = managerPackageFiles.length;\n let depCount = 0;\n for (const file of managerPackageFiles) {\n depCount += file.deps.length;\n }\n stats.managers[manager] = {\n fileCount,\n depCount,\n };\n stats.total.fileCount += fileCount;\n stats.total.depCount += depCount;\n }\n return stats;\n}\n\nexport function isCacheExtractValid(\n baseBranchSha: string,\n configHash: string,\n cachedExtract?: BaseBranchCache,\n): boolean {\n if (!cachedExtract) {\n return false;\n }\n\n if (!cachedExtract.revision) {\n logger.debug('Cached extract is missing revision, so cannot be used');\n return false;\n }\n\n if (cachedExtract.revision !== EXTRACT_CACHE_REVISION) {\n logger.debug(\n `Extract cache revision has changed (old=${cachedExtract.revision}, new=${EXTRACT_CACHE_REVISION})`,\n );\n return false;\n }\n\n if (!(cachedExtract.sha && cachedExtract.configHash)) {\n return false;\n }\n if (cachedExtract.sha !== baseBranchSha) {\n logger.debug(\n `Cached extract result cannot be used due to base branch SHA change (old=${cachedExtract.sha}, new=${baseBranchSha})`,\n );\n return false;\n }\n if (cachedExtract.configHash !== configHash) {\n logger.debug('Cached extract result cannot be used due to config change');\n return false;\n }\n if (!cachedExtract.extractionFingerprints) {\n logger.debug(\n 'Cached extract is missing extractionFingerprints, so cannot be used',\n );\n return false;\n }\n const changedManagers = new Set();\n for (const [manager, fingerprint] of Object.entries(\n cachedExtract.extractionFingerprints,\n )) {\n if (fingerprint !== hashMap.get(manager)) {\n changedManagers.add(manager);\n }\n }\n if (changedManagers.size > 0) {\n logger.debug(\n { changedManagers: [...changedManagers] },\n 'Manager fingerprint(s) have changed, extract cache cannot be reused',\n );\n return false;\n }\n logger.debug(\n `Cached extract for sha=${baseBranchSha} is valid and can be used`,\n );\n return true;\n}\n\nexport async function extract(\n config: RenovateConfig,\n): Promise<Record<string, PackageFile[]>> {\n logger.debug('extract()');\n const { baseBranch } = config;\n const baseBranchSha = await scm.getBranchCommit(baseBranch!);\n let packageFiles: Record<string, PackageFile[]>;\n const cache = getCache();\n cache.scan ??= {};\n const cachedExtract = cache.scan[baseBranch!];\n const configHash = fingerprint(generateFingerprintConfig(config));\n // istanbul ignore if\n if (isCacheExtractValid(baseBranchSha!, configHash, cachedExtract)) {\n packageFiles = cachedExtract.packageFiles;\n try {\n for (const files of Object.values(packageFiles)) {\n for (const file of files) {\n for (const dep of file.deps) {\n delete dep.updates;\n }\n }\n }\n logger.debug('Deleted cached dep updates');\n } catch (err) {\n logger.info({ err }, 'Error deleting cached dep updates');\n }\n } else {\n await scm.checkoutBranch(baseBranch!);\n const extractResult = (await extractAllDependencies(config)) || {};\n packageFiles = extractResult.packageFiles;\n const { extractionFingerprints } = extractResult;\n // TODO: fix types (#22198)\n cache.scan[baseBranch!] = {\n revision: EXTRACT_CACHE_REVISION,\n sha: baseBranchSha!,\n configHash,\n extractionFingerprints,\n packageFiles,\n };\n // Clean up cached branch extracts\n const baseBranches = is.nonEmptyArray(config.baseBranches)\n ? config.baseBranches\n : [baseBranch];\n Object.keys(cache.scan).forEach((branchName) => {\n if (!baseBranches.includes(branchName)) {\n delete cache.scan![branchName];\n }\n });\n }\n const stats = extractStats(packageFiles);\n logger.info(\n { baseBranch: config.baseBranch, stats },\n `Dependency extraction complete`,\n );\n logger.trace({ config: packageFiles }, 'packageFiles');\n ensureGithubToken(packageFiles);\n return packageFiles;\n}\n\nasync function fetchVulnerabilities(\n config: RenovateConfig,\n packageFiles: Record<string, PackageFile[]>,\n): Promise<void> {\n if (config.osvVulnerabilityAlerts) {\n logger.debug('fetchVulnerabilities() - osvVulnerabilityAlerts=true');\n try {\n const vulnerabilities = await Vulnerabilities.create();\n await vulnerabilities.appendVulnerabilityPackageRules(\n config,\n packageFiles,\n );\n } catch (err) {\n logger.warn({ err }, 'Unable to read vulnerability information');\n }\n }\n}\n\nexport async function lookup(\n config: RenovateConfig,\n packageFiles: Record<string, PackageFile[]>,\n): Promise<ExtractResult> {\n await fetchVulnerabilities(config, packageFiles);\n await fetchUpdates(config, packageFiles);\n const { branches, branchList } = await branchifyUpgrades(\n config,\n packageFiles,\n );\n logger.debug(\n { baseBranch: config.baseBranch, config: packageFiles },\n 'packageFiles with updates',\n );\n sortBranches(branches);\n return { branches, branchList, packageFiles };\n}\n\nexport async function update(\n config: RenovateConfig,\n branches: BranchConfig[],\n): Promise<WriteUpdateResult | undefined> {\n let res: WriteUpdateResult | undefined;\n // istanbul ignore else\n if (config.repoIsOnboarded) {\n res = await writeUpdates(config, branches);\n }\n\n return res;\n}\n"]}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "renovate",
|
3
3
|
"description": "Automated dependency updates. Flexible so you don't need to be.",
|
4
|
-
"version": "39.
|
4
|
+
"version": "39.78.0",
|
5
5
|
"type": "commonjs",
|
6
6
|
"bin": {
|
7
7
|
"renovate": "dist/renovate.js",
|
@@ -311,20 +311,20 @@
|
|
311
311
|
"@types/url-join": "4.0.3",
|
312
312
|
"@types/validate-npm-package-name": "4.0.2",
|
313
313
|
"@types/xmldoc": "1.1.9",
|
314
|
-
"@typescript-eslint/eslint-plugin": "8.
|
315
|
-
"@typescript-eslint/parser": "8.
|
314
|
+
"@typescript-eslint/eslint-plugin": "8.18.0",
|
315
|
+
"@typescript-eslint/parser": "8.18.0",
|
316
316
|
"aws-sdk-client-mock": "4.1.0",
|
317
317
|
"callsite": "1.0.0",
|
318
318
|
"common-tags": "1.8.2",
|
319
319
|
"conventional-changelog-conventionalcommits": "8.0.0",
|
320
320
|
"emojibase-data": "16.0.2",
|
321
321
|
"eslint": "8.57.1",
|
322
|
-
"eslint-formatter-gha": "1.5.
|
323
|
-
"eslint-import-resolver-typescript": "3.
|
322
|
+
"eslint-formatter-gha": "1.5.2",
|
323
|
+
"eslint-import-resolver-typescript": "3.7.0",
|
324
324
|
"eslint-plugin-import": "2.31.0",
|
325
|
-
"eslint-plugin-jest": "28.
|
325
|
+
"eslint-plugin-jest": "28.9.0",
|
326
326
|
"eslint-plugin-jest-formatting": "3.1.0",
|
327
|
-
"eslint-plugin-promise": "7.1
|
327
|
+
"eslint-plugin-promise": "7.2.1",
|
328
328
|
"eslint-plugin-typescript-enum": "2.1.0",
|
329
329
|
"expect": "29.7.0",
|
330
330
|
"expect-more-jest": "5.5.0",
|
package/renovate-schema.json
CHANGED
@@ -340,7 +340,7 @@
|
|
340
340
|
"type": "object",
|
341
341
|
"default": {
|
342
342
|
"fileMatch": [
|
343
|
-
"(
|
343
|
+
"(^|/|\\.)MODULE\\.bazel$"
|
344
344
|
]
|
345
345
|
},
|
346
346
|
"$ref": "#"
|
@@ -2789,6 +2789,7 @@
|
|
2789
2789
|
"gomodTidyE",
|
2790
2790
|
"gomodUpdateImportPaths",
|
2791
2791
|
"gomodSkipVendor",
|
2792
|
+
"gomodVendor",
|
2792
2793
|
"helmUpdateSubChartArchives",
|
2793
2794
|
"npmDedupe",
|
2794
2795
|
"pnpmDedupe",
|
@@ -3631,6 +3632,7 @@
|
|
3631
3632
|
"conan",
|
3632
3633
|
"deb",
|
3633
3634
|
"debian",
|
3635
|
+
"devbox",
|
3634
3636
|
"docker",
|
3635
3637
|
"git",
|
3636
3638
|
"glasskube",
|