diff --git a/lib/workers/repository/updates/flatten.js b/lib/workers/repository/updates/flatten.js index af9ead4240f45758d48d78fe873de2953a1ae613..10ccf0e3836266fb4fd77461b21d2146ada56317 100644 --- a/lib/workers/repository/updates/flatten.js +++ b/lib/workers/repository/updates/flatten.js @@ -39,8 +39,20 @@ function flattenUpdates(config, packageFiles) { updateConfig, updateConfig[updateConfig.updateType] ); + const updateTypes = [ + 'major', + 'minor', + 'patch', + 'pin', + 'digest', + 'lockFileMaintenance', + ]; + for (const updateType of updateTypes) { + delete updateConfig[updateType]; + } // Apply again in case any were added by the updateType config updateConfig = applyPackageRules(updateConfig); + delete updateConfig.packageRules; updateConfig.depNameSanitized = updateConfig.depName ? updateConfig.depName .replace('@types/', '') diff --git a/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap b/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap index 51fb5ef63bd87a4772df1bd1bf078ee04188d583..31655be5970cf12761624d76bd413ee2df7a1673 100644 --- a/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap +++ b/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap @@ -32,20 +32,6 @@ Array [ "groupSlug": null, "labels": Array [], "lazyGrouping": true, - "lockFileMaintenance": Object { - "branchTopic": "lock-file-maintenance", - "commitMessageAction": "Lock file maintenance", - "commitMessageExtra": null, - "commitMessageTopic": null, - "enabled": true, - "groupName": null, - "prBody": "This Pull Request updates \`package.json\` lock files to use the latest dependency versions.\\n\\n{{#if schedule}}\\n**Note**: This PR was created on a configured schedule (\\"{{{schedule}}}\\"{{#if timezone}} in timezone \`{{{timezone}}}\`{{/if}}) and will not receive updates outside those times.\\n{{/if}}\\n\\n{{#if hasErrors}}\\n\\n---\\n\\n# Errors\\n\\nRenovate encountered some errors when processing your repository, so you are being notified here even if they do not directly apply to this PR.\\n\\n{{#each errors as |error|}}\\n- \`{{error.depName}}\`: {{error.message}}\\n{{/each}}\\n{{/if}}\\n\\n{{#if hasWarnings}}\\n\\n---\\n\\n# Warnings\\n\\nPlease make sure the following warnings are safe to ignore:\\n\\n{{#each warnings as |warning|}}\\n- \`{{warning.depName}}\`: {{warning.message}}\\n{{/each}}\\n{{/if}}", - "rebaseStalePrs": true, - "recreateClosed": true, - "schedule": Array [ - "before 5am on monday", - ], - }, "manager": "npm", "managerBranchPrefix": "", "newValue": "1.0.0", @@ -104,20 +90,6 @@ Array [ "groupSlug": null, "labels": Array [], "lazyGrouping": true, - "lockFileMaintenance": Object { - "branchTopic": "lock-file-maintenance", - "commitMessageAction": "Lock file maintenance", - "commitMessageExtra": null, - "commitMessageTopic": null, - "enabled": true, - "groupName": null, - "prBody": "This Pull Request updates \`package.json\` lock files to use the latest dependency versions.\\n\\n{{#if schedule}}\\n**Note**: This PR was created on a configured schedule (\\"{{{schedule}}}\\"{{#if timezone}} in timezone \`{{{timezone}}}\`{{/if}}) and will not receive updates outside those times.\\n{{/if}}\\n\\n{{#if hasErrors}}\\n\\n---\\n\\n# Errors\\n\\nRenovate encountered some errors when processing your repository, so you are being notified here even if they do not directly apply to this PR.\\n\\n{{#each errors as |error|}}\\n- \`{{error.depName}}\`: {{error.message}}\\n{{/each}}\\n{{/if}}\\n\\n{{#if hasWarnings}}\\n\\n---\\n\\n# Warnings\\n\\nPlease make sure the following warnings are safe to ignore:\\n\\n{{#each warnings as |warning|}}\\n- \`{{warning.depName}}\`: {{warning.message}}\\n{{/each}}\\n{{/if}}", - "rebaseStalePrs": true, - "recreateClosed": true, - "schedule": Array [ - "before 5am on monday", - ], - }, "manager": "npm", "managerBranchPrefix": "", "newValue": "2.0.0", @@ -250,20 +222,6 @@ Array [ "labels": Array [], "language": "docker", "lazyGrouping": true, - "lockFileMaintenance": Object { - "branchTopic": "lock-file-maintenance", - "commitMessageAction": "Lock file maintenance", - "commitMessageExtra": null, - "commitMessageTopic": null, - "enabled": true, - "groupName": null, - "prBody": "This Pull Request updates \`package.json\` lock files to use the latest dependency versions.\\n\\n{{#if schedule}}\\n**Note**: This PR was created on a configured schedule (\\"{{{schedule}}}\\"{{#if timezone}} in timezone \`{{{timezone}}}\`{{/if}}) and will not receive updates outside those times.\\n{{/if}}\\n\\n{{#if hasErrors}}\\n\\n---\\n\\n# Errors\\n\\nRenovate encountered some errors when processing your repository, so you are being notified here even if they do not directly apply to this PR.\\n\\n{{#each errors as |error|}}\\n- \`{{error.depName}}\`: {{error.message}}\\n{{/each}}\\n{{/if}}\\n\\n{{#if hasWarnings}}\\n\\n---\\n\\n# Warnings\\n\\nPlease make sure the following warnings are safe to ignore:\\n\\n{{#each warnings as |warning|}}\\n- \`{{warning.depName}}\`: {{warning.message}}\\n{{/each}}\\n{{/if}}", - "rebaseStalePrs": true, - "recreateClosed": true, - "schedule": Array [ - "before 5am on monday", - ], - }, "manager": "docker", "managerBranchPrefix": "", "newValue": "10.0.1",