Skip to content
Snippets Groups Projects
Commit 74b34cda authored by Rhys Arkins's avatar Rhys Arkins
Browse files

chore: move updateTypes def

parent 6ed4b80b
Branches
Tags
No related merge requests found
...@@ -18,6 +18,14 @@ function getUpdateTypeRules(packageRules) { ...@@ -18,6 +18,14 @@ function getUpdateTypeRules(packageRules) {
function flattenUpdates(config, packageFiles) { function flattenUpdates(config, packageFiles) {
const updates = []; const updates = [];
const updateTypes = [
'major',
'minor',
'patch',
'pin',
'digest',
'lockFileMaintenance',
];
for (const [manager, files] of Object.entries(packageFiles)) { for (const [manager, files] of Object.entries(packageFiles)) {
const managerConfig = getManagerConfig(config, manager); const managerConfig = getManagerConfig(config, manager);
for (const packageFile of files) { for (const packageFile of files) {
...@@ -39,14 +47,6 @@ function flattenUpdates(config, packageFiles) { ...@@ -39,14 +47,6 @@ function flattenUpdates(config, packageFiles) {
updateConfig, updateConfig,
updateConfig[updateConfig.updateType] updateConfig[updateConfig.updateType]
); );
const updateTypes = [
'major',
'minor',
'patch',
'pin',
'digest',
'lockFileMaintenance',
];
for (const updateType of updateTypes) { for (const updateType of updateTypes) {
delete updateConfig[updateType]; delete updateConfig[updateType];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment