Skip to content

Commit

Permalink
fix: don’t imply patch from automerge settings (#8747)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 18, 2021
1 parent 199cfaa commit 1d4672c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -977,52 +977,6 @@ Array [
]
`;
exports[`workers/repository/process/lookup .lookupUpdates() returns patch update if automerging patch 1`] = `
Array [
Object {
"bucket": "non-major",
"currentVersion": "0.9.0",
"isSingleVersion": true,
"newMajor": 0,
"newMinor": 9,
"newValue": "0.9.7",
"newVersion": "0.9.7",
"releaseTimestamp": "2013-09-04T17:07:22.948Z",
"skippedOverVersions": Array [
"0.9.1",
"0.9.2",
"0.9.3",
"0.9.4",
"0.9.5",
"0.9.6",
],
"updateType": "patch",
},
Object {
"bucket": "major",
"currentVersion": "0.9.0",
"isSingleVersion": true,
"newMajor": 1,
"newMinor": 4,
"newValue": "1.4.1",
"newVersion": "1.4.1",
"releaseTimestamp": "2015-05-17T04:25:07.299Z",
"skippedOverVersions": Array [
"1.0.0",
"1.0.1",
"1.1.0",
"1.1.1",
"1.1.2",
"1.2.0",
"1.2.1",
"1.3.0",
"1.4.0",
],
"updateType": "major",
},
]
`;
exports[`workers/repository/process/lookup .lookupUpdates() returns patch update if separateMinorPatch 1`] = `
Array [
Object {
Expand Down
13 changes: 0 additions & 13 deletions lib/workers/repository/process/lookup/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,6 @@ describe('workers/repository/process/lookup', () => {
expect(res.updates[0].updateType).not.toEqual('patch');
expect(res.updates[1].updateType).not.toEqual('patch');
});
it('returns patch update if automerging patch', async () => {
config.patch = {
automerge: true,
};
config.currentValue = '0.9.0';
config.rangeStrategy = 'pin';
config.depName = 'q';
config.datasource = datasourceNpmId;
nock('https://registry.npmjs.org').get('/q').reply(200, qJson);
const res = await lookup.lookupUpdates(config);
expect(res.updates).toMatchSnapshot();
expect(res.updates[0].updateType).toEqual('patch');
});
it('returns minor update if automerging both patch and minor', async () => {
config.patch = {
automerge: true,
Expand Down
3 changes: 0 additions & 3 deletions lib/workers/repository/process/lookup/update-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ export function getUpdateType(
if (config.separateMinorPatch) {
return 'patch';
}
if (config.patch.automerge && !config.minor.automerge) {
return 'patch';
}
return 'minor';
}

0 comments on commit 1d4672c

Please sign in to comment.