renovate/lib/workers/repository/process/extract-update.js

27 lines
998 B
JavaScript
Raw Normal View History

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);
2018-05-28 20:25:33 +00:00
logger.trace({ config: packageFiles }, 'packageFiles');
await fetchUpdates(config, packageFiles);
2018-05-14 05:56:17 +00:00
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 };
}