mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-14 08:36:26 +00:00
7c0a17e9d0
Previously, deprecation warnings were done as part of dependency lookups, which were run concurrently. This meant the chance of duplicate issues was high, due to race conditions. Instead, raising the issues is done once all package are looked up, to ensure only one issue per manager/dependency. It also means we can list all of the affected package files, in case of a monorepo. Closes #2224, Closes #2225
26 lines
998 B
JavaScript
26 lines
998 B
JavaScript
const { writeUpdates } = require('./write');
|
|
const { sortBranches } = require('./sort');
|
|
const { fetchUpdates } = require('./fetch');
|
|
const { raiseDeprecationWarnings } = require('./deprecated');
|
|
const { branchifyUpgrades } = require('../updates/branchify');
|
|
const { extractAllDependencies } = require('../extract');
|
|
|
|
module.exports = {
|
|
extractAndUpdate,
|
|
};
|
|
|
|
async function extractAndUpdate(config) {
|
|
logger.debug('extractAndUpdate()');
|
|
const packageFiles = await extractAllDependencies(config);
|
|
logger.trace({ config: packageFiles }, 'packageFiles');
|
|
await fetchUpdates(config, packageFiles);
|
|
logger.debug({ config: packageFiles }, 'packageFiles with updates');
|
|
await raiseDeprecationWarnings(config, packageFiles);
|
|
const { branches, branchList } = branchifyUpgrades(config, packageFiles);
|
|
sortBranches(branches);
|
|
let res;
|
|
if (config.repoIsOnboarded) {
|
|
res = await writeUpdates(config, packageFiles, branches);
|
|
}
|
|
return { res, branches, branchList, packageFiles };
|
|
}
|