renovate 39.77.0 → 39.79.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/datasource/orb/index.d.ts +2 -1
- package/dist/modules/datasource/orb/index.js +4 -2
- package/dist/modules/datasource/orb/index.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 +1 -0
@@ -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,6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AAE,CAAC;YACvD,MAAM,eAAe,CAAC,+BAA+B,CACnD,MAAM,EACN,YAAY,CACb,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,eAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,0CAA0C,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,MAAM,CAC1B,MAAsB,EACtB,YAA2C;IAE3C,MAAM,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACjD,MAAM,IAAA,oBAAY,EAAC,MAAM,EAAE,YAAY,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"]}
|
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,s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,sDAAsD,CAAC,CAAC;QACrE,IAAI,CAAC;YACH,MAAM,eAAe,GAAG,MAAM,iCAAe,CAAC,MAAM,EAAE,CAAC;YACvD,MAAM,eAAe,CAAC,+BAA+B,CACnD,MAAM,EACN,YAAY,CACb,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,eAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,0CAA0C,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,MAAM,CAC1B,MAAsB,EACtB,YAA2C;IAE3C,MAAM,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACjD,MAAM,IAAA,oBAAY,EAAC,MAAM,EAAE,YAAY,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.79.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",
|