diff --git a/lib/manager/docker/package.js b/lib/manager/docker/package.js index 41eec1d000e1bddfb535404e2105aa660ceb2b7f..02fc783e5c533aa7d7e26f0bfb54bda93122ef70 100644 --- a/lib/manager/docker/package.js +++ b/lib/manager/docker/package.js @@ -51,9 +51,9 @@ async function getPackageUpdates(config) { upgrade.newFrom += `${depName}:${upgrade.newTag}@${newDigest}`; if (currentDigest) { - upgrade.type = 'digest'; + upgrade.updateType = 'digest'; } else { - upgrade.type = 'pin'; + upgrade.updateType = 'pin'; } upgrades.push(upgrade); } @@ -94,7 +94,7 @@ async function getPackageUpdates(config) { const versionUpgrades = {}; for (const version of versionList) { const newMajor = getMajor(version); - const type = newMajor > currentMajor ? 'major' : 'minor'; + const updateType = newMajor > currentMajor ? 'major' : 'minor'; let upgradeKey; if ( !config.separateMajorMinor || @@ -103,7 +103,7 @@ async function getPackageUpdates(config) { ) { // If we're not separating releases then we use a common lookup key upgradeKey = 'latest'; - } else if (!config.separateMultipleMajor && type === 'major') { + } else if (!config.separateMultipleMajor && updateType === 'major') { upgradeKey = 'major'; } else { // Use major version as lookup key @@ -148,9 +148,9 @@ async function getPackageUpdates(config) { } } if (upgrade.newMajor > currentMajor) { - upgrade.type = 'major'; + upgrade.updateType = 'major'; } else { - upgrade.type = 'minor'; + upgrade.updateType = 'minor'; } upgrades.push(upgrade); logger.info( diff --git a/lib/manager/npm/post-update/index.js b/lib/manager/npm/post-update/index.js index 975ffbb20048ab832dc581d7e2ff1435d8d65666..ddf21b6bdb3321e06c7d3f5a74e0521d7ebad9e6 100644 --- a/lib/manager/npm/post-update/index.js +++ b/lib/manager/npm/post-update/index.js @@ -25,7 +25,7 @@ function determineLockFileDirs(config, packageFiles) { const lernaDirs = []; for (const upgrade of config.upgrades) { - if (upgrade.type === 'lockFileMaintenance') { + if (upgrade.updateType === 'lockFileMaintenance') { // Return every directory that contains a lockfile for (const packageFile of packageFiles.npm) { if ( @@ -182,7 +182,7 @@ async function writeExistingFiles(config, packageFiles) { const { npmLock } = packageFile; if (npmLock) { const npmLockPath = upath.join(config.tmpDir.path, npmLock); - if (config.type === 'lockFileMaintenance') { + if (config.updateType === 'lockFileMaintenance') { logger.debug(`Ensuring ${npmLock} is removed`); await fs.remove(npmLockPath); } else { @@ -194,7 +194,7 @@ async function writeExistingFiles(config, packageFiles) { const { yarnLock } = packageFile; if (yarnLock) { const yarnLockPath = upath.join(config.tmpDir.path, yarnLock); - if (config.type === 'lockFileMaintenance') { + if (config.updateType === 'lockFileMaintenance') { logger.debug(`Ensuring ${yarnLock} is removed`); await fs.remove(yarnLockPath); } else { @@ -208,7 +208,7 @@ async function writeExistingFiles(config, packageFiles) { // istanbul ignore next if ( packageFile.pnpmShrinkwrap && - config.type !== 'lockFileMaintenance' && + config.updateType !== 'lockFileMaintenance' && !pnpmBug992 ) { logger.debug(`Writing shrinkwrap.yaml to ${basedir}`); @@ -280,7 +280,7 @@ async function getAdditionalFiles(config, packageFiles) { } logger.debug('Getting updated lock files'); if ( - config.type === 'lockFileMaintenance' && + config.updateType === 'lockFileMaintenance' && config.parentBranch && (await platform.branchExists(config.branchName)) ) { diff --git a/lib/util/package-rules.js b/lib/util/package-rules.js index 0a620af8c79b95fa5a570e2d9a2ace5f3539a1f8..1630607ba9603f2afdab23c111e306a6aadb4d8f 100644 --- a/lib/util/package-rules.js +++ b/lib/util/package-rules.js @@ -16,7 +16,7 @@ function applyPackageRules(inputConfig) { depName, currentValue, fromVersion, - type, + updateType, } = config; const packageRules = config.packageRules || []; logger.trace( @@ -66,7 +66,7 @@ function applyPackageRules(inputConfig) { negativeMatch = negativeMatch || !isMatch; } if (updateTypes.length) { - const isMatch = updateTypes.includes(type); + const isMatch = updateTypes.includes(updateType); positiveMatch = positiveMatch || isMatch; negativeMatch = negativeMatch || !isMatch; } diff --git a/lib/workers/branch/get-updated.js b/lib/workers/branch/get-updated.js index a028ac86ea80fcf4af89184803743e23c1859edc..2d613b99297a0c97da7fbc2cfab08766eddca1d3 100644 --- a/lib/workers/branch/get-updated.js +++ b/lib/workers/branch/get-updated.js @@ -11,7 +11,7 @@ async function getUpdatedPackageFiles(config) { for (const upgrade of config.upgrades) { const { manager } = upgrade; - if (upgrade.type !== 'lockFileMaintenance') { + if (upgrade.updateType !== 'lockFileMaintenance') { const existingContent = updatedPackageFiles[upgrade.packageFile] || (await platform.getFile(upgrade.packageFile, config.parentBranch)); diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index 880f4098d840994c717c532d5c8a62e45dec64c0..1649d298398869c67fd456595b484ca3ed7e7054 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -50,14 +50,14 @@ async function processBranch(branchConfig, packageFiles) { if (existingPr.state === 'closed') { const subject = 'Renovate Ignore Notification'; let content; - if (config.type === 'major') { + if (config.updateType === 'major') { content = `As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for *any* future ${ config.newMajor }.x releases. However, if you upgrade to ${ config.newMajor }.x manually then Renovate will then reenable updates for minor and patch updates automatically.`; - } else if (config.type === 'digest') { - content = `As this PR has been closed unmerged, Renovate will ignore this upgrade type and you will not receive PRs for *any* future ${ + } else if (config.updateType === 'digest') { + content = `As this PR has been closed unmerged, Renovate will ignore this upgrade updateType and you will not receive PRs for *any* future ${ config.depName }:${ config.currentTag @@ -122,7 +122,7 @@ async function processBranch(branchConfig, packageFiles) { } if ( - config.type !== 'lockFileMaintenance' && + config.updateType !== 'lockFileMaintenance' && config.unpublishSafe && config.canBeUnpublished && (config.prCreation === 'not-pending' || @@ -157,7 +157,7 @@ async function processBranch(branchConfig, packageFiles) { const committedFiles = await commitFilesToBranch(config); // istanbul ignore if if ( - config.type === 'lockFileMaintenance' && + config.updateType === 'lockFileMaintenance' && !committedFiles && !config.parentBranch && branchExists diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index d1de430162a5ef0225db3f7765f50989b137464e..0d2aaabe0ba64d63b615617b33f761dadd6edcb5 100644 --- a/lib/workers/pr/index.js +++ b/lib/workers/pr/index.js @@ -275,7 +275,7 @@ async function ensurePr(prConfig) { } logger.info({ branchName, prTitle }, `Creating PR`); // istanbul ignore if - if (config.type === 'rollback') { + if (config.updateType === 'rollback') { logger.warn('Creating Rollback PR'); } let pr; diff --git a/lib/workers/repository/onboarding/pr/pr-list.js b/lib/workers/repository/onboarding/pr/pr-list.js index 0d2d346813b978b454f88de1d28db74ffddbd1bc..9f6feb088479369d95e5b5a4b42a98cc387a3bcf 100644 --- a/lib/workers/repository/onboarding/pr/pr-list.js +++ b/lib/workers/repository/onboarding/pr/pr-list.js @@ -24,10 +24,10 @@ function getPrList(config, branches) { ? ` - Merge into: \`${branch.baseBranch}\`\n` : ''; for (const upgrade of branch.upgrades) { - if (upgrade.type === 'lockFileMaintenance') { + if (upgrade.updateType === 'lockFileMaintenance') { prDesc += ' - Regenerates lock file to use latest dependency versions'; } else { - if (upgrade.type === 'pin') { + if (upgrade.updateType === 'pin') { prDesc += ' - Pins '; } else { prDesc += ' - Upgrades '; @@ -42,7 +42,7 @@ function getPrList(config, branches) { } else { prDesc += ' '; } - if (upgrade.type !== 'pin') { + if (upgrade.updateType !== 'pin') { prDesc += `from \`${upgrade.currentValue}\` `; } prDesc += `to \`${upgrade.newValue || upgrade.newDigest}\``; diff --git a/lib/workers/repository/process/lookup/index.js b/lib/workers/repository/process/lookup/index.js index f038144cc1b01d33409127be7405591d23de9718..ef60ad6868ac33843a169e0dcb28c9c770e62058 100644 --- a/lib/workers/repository/process/lookup/index.js +++ b/lib/workers/repository/process/lookup/index.js @@ -26,7 +26,7 @@ async function lookupUpdates(config) { if (!dependency) { // If dependency lookup fails then warn and return const result = { - type: 'warning', + updateType: 'warning', message: `Failed to look up dependency ${depName}`, }; logger.info( @@ -53,7 +53,7 @@ async function lookupUpdates(config) { // TODO: return an object res.updates.push([ { - type: 'warning', + updateType: 'warning', message, }, ]); @@ -69,7 +69,7 @@ async function lookupUpdates(config) { if (!rollback) { res.updates.push([ { - type: 'warning', + updateType: 'warning', message: `Can't find version matching ${currentValue} for ${depName}`, }, ]); @@ -81,7 +81,7 @@ async function lookupUpdates(config) { const fromVersion = getFromVersion(config, rangeStrategy, allVersions); if (rangeStrategy === 'pin' && !isSingleVersion(currentValue)) { res.updates.push({ - type: 'pin', + updateType: 'pin', isPin: true, newValue: getNewValue( currentValue, @@ -116,7 +116,7 @@ async function lookupUpdates(config) { } update.newMajor = getMajor(toVersion); update.newMinor = getMinor(toVersion); - update.type = getType(config, fromVersion, toVersion); + update.updateType = getType(config, fromVersion, toVersion); if (!isVersion(update.newValue)) { update.isRange = true; } @@ -164,7 +164,7 @@ function getType(config, fromVersion, toVersion) { function getBucket(config, update) { const { separateMajorMinor, separateMultipleMajor } = config; - const { type, newMajor } = update; + const { updateType, newMajor } = update; if ( !separateMajorMinor || config.groupName || @@ -173,10 +173,10 @@ function getBucket(config, update) { ) { return 'latest'; } - if (separateMultipleMajor && type === 'major') { + if (separateMultipleMajor && updateType === 'major') { return `major-${newMajor}`; } - return type; + return updateType; } function getFromVersion(config, rangeStrategy, allVersions) { diff --git a/lib/workers/repository/process/lookup/rollback.js b/lib/workers/repository/process/lookup/rollback.js index 80697eb43a69b792223862fdcd12fff782e40c10..150dca690566f784cd7ac92d16a4ce9fd9141927 100644 --- a/lib/workers/repository/process/lookup/rollback.js +++ b/lib/workers/repository/process/lookup/rollback.js @@ -37,7 +37,7 @@ function getRollbackUpdate(config, versions) { let fromVersion; const newValue = getNewValue(currentValue, 'replace', fromVersion, toVersion); return { - type: 'rollback', + updateType: 'rollback', branchName: '{{{branchPrefix}}}rollback-{{{depNameSanitized}}}-{{{newMajor}}}.x', commitMessageAction: 'Roll back', diff --git a/lib/workers/repository/process/sort.js b/lib/workers/repository/process/sort.js index 9084bb72e82d16ce092af654db9b5c19f5a7ddf4..b0cda2787bebbb0a891598066e2b6afe28a72731 100644 --- a/lib/workers/repository/process/sort.js +++ b/lib/workers/repository/process/sort.js @@ -12,11 +12,11 @@ function sortBranches(branches) { ]; logger.trace({ branches }, 'branches'); branches.sort((a, b) => { - const sortDiff = sortOrder.indexOf(a.type) - sortOrder.indexOf(b.type); + const sortDiff = sortOrder.indexOf(a.updateType) - sortOrder.indexOf(b.updateType); if (sortDiff !== 0) { return sortDiff; } - // Sort by prTitle if type is the same + // Sort by prTitle if updateType is the same return a.prTitle < b.prTitle ? -1 : 1; }); } diff --git a/lib/workers/repository/process/write.js b/lib/workers/repository/process/write.js index 77085ac77ad733e97d0a2f6ce8f33aa7e6eb967a..af171e9b31288e2224eff90e27180dd5d4c1fd9f 100644 --- a/lib/workers/repository/process/write.js +++ b/lib/workers/repository/process/write.js @@ -10,8 +10,8 @@ module.exports = { async function writeUpdates(config, packageFiles, allBranches) { let branches = allBranches; logger.info(`Processing ${branches.length} branch(es)`); - if (!config.mirrorMode && branches.some(upg => upg.type === 'pin')) { - branches = branches.filter(upg => upg.type === 'pin'); + if (!config.mirrorMode && branches.some(upg => upg.updateType === 'pin')) { + branches = branches.filter(upg => upg.updateType === 'pin'); logger.info(`Processing ${branches.length} "pin" PRs first`); } const tmpDir = await tmp.dir({ unsafeCleanup: true }); diff --git a/lib/workers/repository/updates/branchify.js b/lib/workers/repository/updates/branchify.js index 25bcb63d215a5a3829bcc7c25df54adccb716bfb..137406d16563b6a9fb913766c78ee80e10e232c1 100644 --- a/lib/workers/repository/updates/branchify.js +++ b/lib/workers/repository/updates/branchify.js @@ -32,9 +32,9 @@ function branchifyUpgrades(config, packageFiles) { for (const u of updates) { const update = { ...u }; // Split out errors and warnings first - if (update.type === 'error') { + if (update.updateType === 'error') { errors.push(update); - } else if (update.type === 'warning') { + } else if (update.updateType === 'warning') { warnings.push(update); } else { // Massage legacy vars just in case @@ -42,8 +42,8 @@ function branchifyUpgrades(config, packageFiles) { update.newVersion = update.newValue; // massage for handlebars const upper = str => str.charAt(0).toUpperCase() + str.substr(1); - if (update.type) { - update[`is${upper(update.type)}`] = true; + if (update.updateType) { + update[`is${upper(update.updateType)}`] = true; } // Check whether to use a group name if (update.groupName) { diff --git a/lib/workers/repository/updates/flatten.js b/lib/workers/repository/updates/flatten.js index 24c6ef928ab11b78865c02eff30e8f9ca17238e5..85a6488f2f5cf90daa40bd001c2b26868ab07ea5 100644 --- a/lib/workers/repository/updates/flatten.js +++ b/lib/workers/repository/updates/flatten.js @@ -27,7 +27,7 @@ function flattenUpdates(config, packageFiles) { // apply major/minor/patch/pin/digest updateConfig = mergeChildConfig( updateConfig, - updateConfig[updateConfig.type] + updateConfig[updateConfig.updateType] ); updateConfig = applyPackageRules(updateConfig); updateConfig.depNameSanitized = updateConfig.depName @@ -60,7 +60,7 @@ function flattenUpdates(config, packageFiles) { managerConfig, managerConfig.lockFileMaintenance ); - lockFileConfig.type = 'lockFileMaintenance'; + lockFileConfig.updateType = 'lockFileMaintenance'; updates.push(lockFileConfig); } } diff --git a/test/manager/docker/__snapshots__/package.spec.js.snap b/test/manager/docker/__snapshots__/package.spec.js.snap index a9a63c0b807a5a8ce86ac00e311b8c8c8ae158ac..18a83e9608518005e87501fd2531e9e656cb4137 100644 --- a/test/manager/docker/__snapshots__/package.spec.js.snap +++ b/test/manager/docker/__snapshots__/package.spec.js.snap @@ -8,7 +8,7 @@ Array [ "newFrom": "some-dep:1.0.0-something@sha256:one", "newTag": "1.0.0-something", "newValue": "one", - "type": "pin", + "updateType": "pin", }, Object { "newDepTag": "some-dep:1.1.0-something", @@ -17,7 +17,7 @@ Array [ "newMajor": "1", "newTag": "1.1.0-something", "newValue": "1.1.0", - "type": "minor", + "updateType": "minor", }, ] `; @@ -30,7 +30,7 @@ Array [ "newMajor": "8", "newTag": "8", "newValue": "8", - "type": "major", + "updateType": "major", }, ] `; @@ -43,7 +43,7 @@ Array [ "newFrom": "docker.io/some-dep:1.0.0@sha256:1234567890", "newTag": "1.0.0", "newValue": "123456", - "type": "digest", + "updateType": "digest", }, ] `; @@ -57,7 +57,7 @@ Array [ "newMajor": "1", "newTag": "1.2.0", "newValue": "1.2.0", - "type": "minor", + "updateType": "minor", }, Object { "newDepTag": "some-dep:2.0.0", @@ -66,7 +66,7 @@ Array [ "newMajor": "2", "newTag": "2.0.0", "newValue": "2.0.0", - "type": "major", + "updateType": "major", }, Object { "newDepTag": "some-dep:3.0.0", @@ -75,7 +75,7 @@ Array [ "newMajor": "3", "newTag": "3.0.0", "newValue": "3.0.0", - "type": "major", + "updateType": "major", }, ] `; @@ -89,7 +89,7 @@ Array [ "newMajor": "1", "newTag": "1.2.0", "newValue": "1.2.0", - "type": "minor", + "updateType": "minor", }, Object { "newDepTag": "some-dep:3.0.0", @@ -98,7 +98,7 @@ Array [ "newMajor": "3", "newTag": "3.0.0", "newValue": "3.0.0", - "type": "major", + "updateType": "major", }, ] `; @@ -112,7 +112,7 @@ Array [ "newMajor": "3", "newTag": "3.0.0", "newValue": "3.0.0", - "type": "major", + "updateType": "major", }, ] `; @@ -126,7 +126,7 @@ Array [ "newMajor": "3", "newTag": "3.0.0", "newValue": "3.0.0", - "type": "major", + "updateType": "major", }, ] `; @@ -139,7 +139,7 @@ Array [ "newMajor": "8", "newTag": "8", "newValue": "8", - "type": "major", + "updateType": "major", }, ] `; @@ -152,7 +152,7 @@ Array [ "newMajor": "9", "newTag": "9", "newValue": "9", - "type": "major", + "updateType": "major", }, ] `; diff --git a/test/manager/docker/package.spec.js b/test/manager/docker/package.spec.js index 0de6055276fd91511168bb0d4a9e32e212d62bd8..d8e6d459968bdbb87e761b84a2b2ebcb83528c7c 100644 --- a/test/manager/docker/package.spec.js +++ b/test/manager/docker/package.spec.js @@ -47,7 +47,7 @@ describe('lib/manager/docker/package', () => { dockerApi.getDigest.mockReturnValueOnce('sha256:1234567890'); const res = await docker.getPackageUpdates(config); expect(res).toHaveLength(1); - expect(res[0].type).toEqual('digest'); + expect(res[0].updateType).toEqual('digest'); }); it('returns a digest when registry is present', async () => { config.dockerRegistry = 'docker.io'; @@ -56,7 +56,7 @@ describe('lib/manager/docker/package', () => { const res = await docker.getPackageUpdates(config); expect(res).toMatchSnapshot(); expect(res).toHaveLength(1); - expect(res[0].type).toEqual('digest'); + expect(res[0].updateType).toEqual('digest'); }); it('adds latest tag', async () => { delete config.currentTag; @@ -64,7 +64,7 @@ describe('lib/manager/docker/package', () => { dockerApi.getDigest.mockReturnValueOnce('sha256:1234567890'); const res = await docker.getPackageUpdates(config); expect(res).toHaveLength(1); - expect(res[0].type).toEqual('digest'); + expect(res[0].updateType).toEqual('digest'); }); it('returns a pin', async () => { delete config.currentDigest; @@ -74,7 +74,7 @@ describe('lib/manager/docker/package', () => { dockerApi.getDigest.mockReturnValueOnce('sha256:1234567890'); const res = await docker.getPackageUpdates(config); expect(res).toHaveLength(1); - expect(res[0].type).toEqual('pin'); + expect(res[0].updateType).toEqual('pin'); }); it('returns empty if current tag is not valid version', async () => { config.currentTag = 'some-text-tag'; @@ -115,9 +115,9 @@ describe('lib/manager/docker/package', () => { const res = await docker.getPackageUpdates(config); expect(res).toMatchSnapshot(); expect(res).toHaveLength(3); - expect(res[0].type).toEqual('minor'); + expect(res[0].updateType).toEqual('minor'); expect(res[0].newValue).toEqual('1.2.0'); - expect(res[1].type).toEqual('major'); + expect(res[1].updateType).toEqual('major'); expect(res[2].newMajor).toEqual('3'); }); it('returns only one major', async () => { @@ -133,9 +133,9 @@ describe('lib/manager/docker/package', () => { const res = await docker.getPackageUpdates(config); expect(res).toMatchSnapshot(); expect(res).toHaveLength(2); - expect(res[0].type).toEqual('minor'); + expect(res[0].updateType).toEqual('minor'); expect(res[0].newValue).toEqual('1.2.0'); - expect(res[1].type).toEqual('major'); + expect(res[1].updateType).toEqual('major'); expect(res[1].newMajor).toEqual('3'); }); it('returns only one upgrade', async () => { @@ -151,7 +151,7 @@ describe('lib/manager/docker/package', () => { const res = await docker.getPackageUpdates(config); expect(res).toMatchSnapshot(); expect(res).toHaveLength(1); - expect(res[0].type).toEqual('major'); + expect(res[0].updateType).toEqual('major'); expect(res[0].newMajor).toEqual('3'); }); it('ignores unstable upgrades', async () => { @@ -170,7 +170,7 @@ describe('lib/manager/docker/package', () => { const res = await docker.getPackageUpdates(config); expect(res).toMatchSnapshot(); expect(res).toHaveLength(1); - expect(res[0].type).toEqual('major'); + expect(res[0].updateType).toEqual('major'); expect(res[0].newValue).toEqual('8'); }); it('upgrades from unstable to stable', async () => { @@ -189,7 +189,7 @@ describe('lib/manager/docker/package', () => { const res = await docker.getPackageUpdates(config); expect(res).toMatchSnapshot(); expect(res).toHaveLength(1); - expect(res[0].type).toEqual('major'); + expect(res[0].updateType).toEqual('major'); expect(res[0].newValue).toEqual('8'); }); it('upgrades from unstable to unstable if not ignoring', async () => { @@ -222,7 +222,7 @@ describe('lib/manager/docker/package', () => { const res = await docker.getPackageUpdates(config); expect(res).toMatchSnapshot(); expect(res).toHaveLength(2); - expect(res[1].type).toEqual('minor'); + expect(res[1].updateType).toEqual('minor'); expect(res[1].newValue).toEqual('1.1.0'); }); it('ignores deps with custom registry', async () => { diff --git a/test/util/package-rules.spec.js b/test/util/package-rules.spec.js index 938809f020678ba169082bdc8a3cb7e96d2a98f9..2dff3bf845d366a6c82cb8372a05853cf1214401 100644 --- a/test/util/package-rules.spec.js +++ b/test/util/package-rules.spec.js @@ -132,7 +132,7 @@ describe('applyPackageRules()', () => { const dep = { depType: 'dependencies', depName: 'a', - type: 'patch', + updateType: 'patch', }; const res = applyPackageRules({ ...config, ...dep }); expect(res.x).toBe(1); diff --git a/test/workers/branch/index.spec.js b/test/workers/branch/index.spec.js index 5d1c7611e456e14d11f25a7783de12f0c6e885f9..5b2d1ad0c567a3ab26c3836534a4d7378bf90df9 100644 --- a/test/workers/branch/index.spec.js +++ b/test/workers/branch/index.spec.js @@ -71,7 +71,7 @@ describe('workers/branch', () => { it('skips branch if closed major PR found', async () => { schedule.isScheduledNow.mockReturnValueOnce(false); platform.branchExists.mockReturnValueOnce(true); - config.type = 'major'; + config.updateType = 'major'; checkExisting.prAlreadyExisted.mockReturnValueOnce({ number: 13, state: 'closed', @@ -82,7 +82,7 @@ describe('workers/branch', () => { it('skips branch if closed digest PR found', async () => { schedule.isScheduledNow.mockReturnValueOnce(false); platform.branchExists.mockReturnValueOnce(true); - config.type = 'digest'; + config.updateType = 'digest'; checkExisting.prAlreadyExisted.mockReturnValueOnce({ number: 13, state: 'closed', diff --git a/test/workers/branch/lock-files/index.spec.js b/test/workers/branch/lock-files/index.spec.js index d313808d69d836a0b1f5f350a951f056dde332ba..1bf815154564f48de8012cdc3eb1d48c496a04de 100644 --- a/test/workers/branch/lock-files/index.spec.js +++ b/test/workers/branch/lock-files/index.spec.js @@ -44,7 +44,7 @@ describe('manager/npm/post-update', () => { ]; }); it('returns all directories if lock file maintenance', () => { - config.upgrades = [{ type: 'lockFileMaintenance' }]; + config.upgrades = [{ updateType: 'lockFileMaintenance' }]; const res = determineLockFileDirs(config, packageFiles); expect(res).toMatchSnapshot(); }); @@ -317,7 +317,7 @@ describe('manager/npm/post-update', () => { expect(res.updatedLockFiles).toHaveLength(0); }); it('returns no error and empty lockfiles if lock file maintenance exists', async () => { - config.type = 'lockFileMaintenance'; + config.updateType = 'lockFileMaintenance'; config.parentBranch = 'renovate/lock-file-maintenance'; platform.branchExists.mockReturnValueOnce(true); const res = await getAdditionalFiles(config, { npm: [{}] }); diff --git a/test/workers/repository/onboarding/pr/pr-list.spec.js b/test/workers/repository/onboarding/pr/pr-list.spec.js index c3da8579eed35635d3f1fd68ba510b1ebfd8d647..43bbb59461e605251275b7a92f92ea4728864bf1 100644 --- a/test/workers/repository/onboarding/pr/pr-list.spec.js +++ b/test/workers/repository/onboarding/pr/pr-list.spec.js @@ -26,7 +26,7 @@ describe('workers/repository/onboarding/pr/pr-list', () => { branchName: 'renovate/lock-file-maintenance', upgrades: [ { - type: 'lockFileMaintenance', + updateType: 'lockFileMaintenance', }, ], }, @@ -41,14 +41,14 @@ describe('workers/repository/onboarding/pr/pr-list', () => { branchName: 'renovate/pin-dependencies', upgrades: [ { - type: 'pin', + updateType: 'pin', repositoryUrl: 'https://a', depName: 'a', depType: 'devDependencies', newValue: '1.1.0', }, { - type: 'pin', + updateType: 'pin', depName: 'b', newValue: '1.5.3', }, diff --git a/test/workers/repository/process/__snapshots__/sort.spec.js.snap b/test/workers/repository/process/__snapshots__/sort.spec.js.snap index 973edd26c1e3bb752a4255ee2ff5feaa4f405357..449b66d61e0217649cf5e4d3e467a8c53586de13 100644 --- a/test/workers/repository/process/__snapshots__/sort.spec.js.snap +++ b/test/workers/repository/process/__snapshots__/sort.spec.js.snap @@ -1,22 +1,22 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`workers/repository/process/sort sortBranches() sorts based on type and prTitle 1`] = ` +exports[`workers/repository/process/sort sortBranches() sorts based on updateType and prTitle 1`] = ` Array [ Object { "prTitle": "some other pin", - "type": "pin", + "updateType": "pin", }, Object { "prTitle": "some pin", - "type": "pin", + "updateType": "pin", }, Object { "prTitle": "a minor update", - "type": "minor", + "updateType": "minor", }, Object { "prTitle": "some major update", - "type": "major", + "updateType": "major", }, ] `; diff --git a/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap b/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap index ca5882ed6d7661876dc0ae78de0f868374392d40..9ae06a6dff46a813ef1ffaf0d67d2f95bda0950e 100644 --- a/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap +++ b/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap @@ -6,7 +6,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "0.4.4", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -16,7 +16,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -31,7 +31,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -42,7 +42,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "==0.9.4", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -53,7 +53,7 @@ Array [ "newValue": "==0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -64,7 +64,7 @@ Array [ "newValue": "==1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -73,7 +73,7 @@ exports[`manager/npm/lookup .lookupUpdates() handles github 404 1`] = ` Array [ Object { "message": "Failed to look up dependency foo", - "type": "warning", + "updateType": "warning", }, ] `; @@ -82,7 +82,7 @@ exports[`manager/npm/lookup .lookupUpdates() handles packagist 1`] = ` Array [ Object { "message": "Failed to look up dependency foo/bar", - "type": "warning", + "updateType": "warning", }, ] `; @@ -98,7 +98,7 @@ Array [ "newValue": "^2.9.1-insiders.20180516", "releaseTimestamp": "2018-05-16T23:16:36.911Z", "toVersion": "2.9.1-insiders.20180516", - "type": "minor", + "updateType": "minor", }, ] `; @@ -107,7 +107,7 @@ exports[`manager/npm/lookup .lookupUpdates() handles pypi 404 1`] = ` Array [ Object { "message": "Failed to look up dependency foo", - "type": "warning", + "updateType": "warning", }, ] `; @@ -116,7 +116,7 @@ exports[`manager/npm/lookup .lookupUpdates() handles unknown purl 1`] = ` Array [ Object { "message": "Failed to look up dependency foo", - "type": "warning", + "updateType": "warning", }, ] `; @@ -127,7 +127,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "0.9.7", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -137,7 +137,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -148,7 +148,7 @@ Array [ "isPin": true, "newMajor": 1, "newValue": "1.4.1", - "type": "pin", + "updateType": "pin", }, ] `; @@ -172,7 +172,7 @@ Array [ "newValue": "^3.0.0", "releaseTimestamp": "2017-10-17T15:22:36.646Z", "toVersion": "3.8.1", - "type": "major", + "updateType": "major", }, ] `; @@ -188,7 +188,7 @@ Array [ "newValue": "~1.4.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -203,7 +203,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -214,7 +214,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "0.4.4", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -224,7 +224,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -234,7 +234,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -271,7 +271,7 @@ Object { "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ], } @@ -287,7 +287,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -297,7 +297,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -312,7 +312,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -322,7 +322,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -337,7 +337,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -348,7 +348,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "0.4.4", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -358,7 +358,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -369,7 +369,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "0.4.4", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -379,7 +379,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -394,7 +394,7 @@ Array [ "newValue": "0.8.12", "releaseTimestamp": "2012-12-29T22:51:00.329Z", "toVersion": "0.8.12", - "type": "patch", + "updateType": "patch", }, Object { "canBeUnpublished": false, @@ -404,7 +404,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -414,7 +414,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -429,7 +429,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "patch", + "updateType": "patch", }, Object { "canBeUnpublished": false, @@ -439,7 +439,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -454,7 +454,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "patch", + "updateType": "patch", }, Object { "canBeUnpublished": false, @@ -464,7 +464,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -478,7 +478,7 @@ Array [ "newMajor": 0, "newValue": "0.9.7", "semanticCommitType": "fix", - "type": "rollback", + "updateType": "rollback", }, Object { "canBeUnpublished": false, @@ -488,7 +488,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -502,7 +502,7 @@ Array [ "newMajor": 0, "newValue": "^0.9.7", "semanticCommitType": "fix", - "type": "rollback", + "updateType": "rollback", }, ] `; @@ -517,7 +517,7 @@ Array [ "newValue": "2.5.17-beta.0", "releaseTimestamp": "2018-03-23T23:29:13.819Z", "toVersion": "2.5.17-beta.0", - "type": "minor", + "updateType": "minor", }, ] `; @@ -532,7 +532,7 @@ Array [ "newValue": "2.5.17-beta.0", "releaseTimestamp": "2018-03-23T23:29:13.819Z", "toVersion": "2.5.17-beta.0", - "type": "minor", + "updateType": "minor", }, ] `; @@ -545,7 +545,7 @@ Object { "newMajor": 1, "newValue": "1.16.0", "semanticCommitType": "fix", - "type": "rollback", + "updateType": "rollback", } `; @@ -560,7 +560,7 @@ Array [ "newValue": "^0.0.35", "releaseTimestamp": "2017-04-27T16:59:06.479Z", "toVersion": "0.0.35", - "type": "minor", + "updateType": "minor", }, ] `; @@ -575,7 +575,7 @@ Array [ "newValue": "2.0.3", "releaseTimestamp": "2015-01-31T08:11:47.852Z", "toVersion": "2.0.3", - "type": "major", + "updateType": "major", }, ] `; @@ -591,7 +591,7 @@ Array [ "newValue": "1.x - 3.x", "releaseTimestamp": "2017-10-17T15:22:36.646Z", "toVersion": "3.8.1", - "type": "major", + "updateType": "major", }, ] `; @@ -607,7 +607,7 @@ Array [ "newValue": "^1.0.0 || ^2.0.0 || ^3.0.0", "releaseTimestamp": "2017-10-17T15:22:36.646Z", "toVersion": "3.8.1", - "type": "major", + "updateType": "major", }, ] `; @@ -622,7 +622,7 @@ Object { "newValue": "^0.7.0 || ^0.8.0 || ^0.9.0", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", } `; @@ -637,7 +637,7 @@ Array [ "newValue": "~1.2.0 || ~1.3.0 || ~1.4.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -653,7 +653,7 @@ Array [ "newValue": "^1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -669,7 +669,7 @@ Array [ "newValue": ">=1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -685,7 +685,7 @@ Array [ "newValue": "~1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -696,7 +696,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "0.4.4", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -706,7 +706,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -716,7 +716,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -727,7 +727,7 @@ Array [ "isPin": true, "newMajor": 0, "newValue": "0.4.4", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -737,7 +737,7 @@ Array [ "newValue": "0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -747,7 +747,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -763,7 +763,7 @@ Array [ "newValue": "1.2.x - 1.4.x", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -779,7 +779,7 @@ Array [ "newValue": "1.x", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -790,7 +790,7 @@ Array [ "isPin": true, "newMajor": 1, "newValue": "1.3.0", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -800,7 +800,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -816,7 +816,7 @@ Array [ "newValue": "1.4.x", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -832,7 +832,7 @@ Array [ "newValue": "<= 2", "releaseTimestamp": "2015-01-31T08:11:47.852Z", "toVersion": "2.0.3", - "type": "major", + "updateType": "major", }, ] `; @@ -848,7 +848,7 @@ Array [ "newValue": "<= 1.4", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -864,7 +864,7 @@ Array [ "newValue": "<= 0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -875,7 +875,7 @@ Array [ "newValue": "<= 1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -891,7 +891,7 @@ Array [ "newValue": "< 2", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -907,7 +907,7 @@ Array [ "newValue": "< 0.9.8", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -918,7 +918,7 @@ Array [ "newValue": "< 1.4.2", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -934,7 +934,7 @@ Array [ "newValue": ">= 0.5.0 < 2.0.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -950,7 +950,7 @@ Array [ "newValue": "<= 1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -966,7 +966,7 @@ Array [ "newValue": "< 2.0.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -982,7 +982,7 @@ Array [ "newValue": ">= 0.5.0 <= 0.9.7", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -993,7 +993,7 @@ Array [ "newValue": ">= 0.5.0 <= 1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -1009,7 +1009,7 @@ Array [ "newValue": ">= 0.5.0 <0.10", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -1020,7 +1020,7 @@ Array [ "newValue": ">= 0.5.0 <1.5", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -1031,7 +1031,7 @@ Array [ "isPin": true, "newMajor": 1, "newValue": "1.0.1", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -1041,7 +1041,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -1057,7 +1057,7 @@ Array [ "newValue": "^0.9.0", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -1068,7 +1068,7 @@ Array [ "newValue": "^1.0.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -1084,7 +1084,7 @@ Array [ "newValue": "~0.9.0", "releaseTimestamp": "2013-09-04T17:07:22.948Z", "toVersion": "0.9.7", - "type": "minor", + "updateType": "minor", }, Object { "canBeUnpublished": false, @@ -1095,7 +1095,7 @@ Array [ "newValue": "~1.4.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -1111,7 +1111,7 @@ Array [ "newValue": "1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "major", + "updateType": "major", }, ] `; @@ -1127,7 +1127,7 @@ Array [ "newValue": "1.4", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -1138,7 +1138,7 @@ Array [ "isPin": true, "newMajor": 1, "newValue": "1.3.0", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -1148,7 +1148,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -1164,7 +1164,7 @@ Array [ "newValue": "~1.4.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -1175,7 +1175,7 @@ Array [ "isPin": true, "newMajor": 1, "newValue": "1.0.0", - "type": "pin", + "updateType": "pin", }, Object { "canBeUnpublished": false, @@ -1185,7 +1185,7 @@ Array [ "newValue": "1.4.1", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -1201,7 +1201,7 @@ Array [ "newValue": "1.x || 2.x || 3.x", "releaseTimestamp": "2017-10-17T15:22:36.646Z", "toVersion": "3.8.1", - "type": "major", + "updateType": "major", }, ] `; @@ -1217,7 +1217,7 @@ Array [ "newValue": "^2.0.0 || ^3.0.0", "releaseTimestamp": "2017-10-17T15:22:36.646Z", "toVersion": "3.8.1", - "type": "major", + "updateType": "major", }, ] `; @@ -1233,7 +1233,7 @@ Array [ "newValue": "~1.3.0 || ~1.4.0", "releaseTimestamp": "2015-05-17T04:25:07.299Z", "toVersion": "1.4.1", - "type": "minor", + "updateType": "minor", }, ] `; @@ -1249,7 +1249,7 @@ Array [ "newValue": "1 || 2 || 3", "releaseTimestamp": "2017-10-17T15:22:36.646Z", "toVersion": "3.8.1", - "type": "major", + "updateType": "major", }, ] `; diff --git a/test/workers/repository/process/lookup/index.spec.js b/test/workers/repository/process/lookup/index.spec.js index 216a4e8a4c5d7ce6f68b80ea33ba89ff9d7052a2..395c9ecb5aaf8e1a0e2d62be79ffb8b2721a7b94 100644 --- a/test/workers/repository/process/lookup/index.spec.js +++ b/test/workers/repository/process/lookup/index.spec.js @@ -126,8 +126,8 @@ describe('manager/npm/lookup', () => { const res = await lookup.lookupUpdates(config); expect(res.updates).toMatchSnapshot(); expect(res.updates.length).toBe(2); - expect(res.updates[0].type).not.toEqual('patch'); - expect(res.updates[1].type).not.toEqual('patch'); + 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 = { @@ -142,7 +142,7 @@ describe('manager/npm/lookup', () => { .reply(200, qJson); const res = await lookup.lookupUpdates(config); expect(res.updates).toMatchSnapshot(); - expect(res.updates[0].type).toEqual('patch'); + expect(res.updates[0].updateType).toEqual('patch'); }); it('returns minor update if automerging both patch and minor', async () => { config.patch = { @@ -160,7 +160,7 @@ describe('manager/npm/lookup', () => { .reply(200, qJson); const res = await lookup.lookupUpdates(config); expect(res.updates).toMatchSnapshot(); - expect(res.updates[0].type).toEqual('minor'); + expect(res.updates[0].updateType).toEqual('minor'); }); it('returns patch update if separateMinorPatch', async () => { config.separateMinorPatch = true; diff --git a/test/workers/repository/process/sort.spec.js b/test/workers/repository/process/sort.spec.js index 71e9fa3ece91589977488171173a5516241eea32..d32462551b61590da2a2d99b7fd90052d8b214bf 100644 --- a/test/workers/repository/process/sort.spec.js +++ b/test/workers/repository/process/sort.spec.js @@ -4,22 +4,22 @@ const { describe('workers/repository/process/sort', () => { describe('sortBranches()', () => { - it('sorts based on type and prTitle', () => { + it('sorts based on updateType and prTitle', () => { const branches = [ { - type: 'major', + updateType: 'major', prTitle: 'some major update', }, { - type: 'pin', + updateType: 'pin', prTitle: 'some pin', }, { - type: 'pin', + updateType: 'pin', prTitle: 'some other pin', }, { - type: 'minor', + updateType: 'minor', prTitle: 'a minor update', }, ]; diff --git a/test/workers/repository/process/write.spec.js b/test/workers/repository/process/write.spec.js index d78222b92f97f2896baf7a240e5d9d2cfc4d4e85..5a9ac9962082a7c3e4c5a37207bcf137e8a9a371 100644 --- a/test/workers/repository/process/write.spec.js +++ b/test/workers/repository/process/write.spec.js @@ -17,7 +17,7 @@ describe('workers/repository/write', () => { describe('writeUpdates()', () => { const packageFiles = {}; it('runs pins first', async () => { - const branches = [{ type: 'pin' }, {}, {}]; + const branches = [{ updateType: 'pin' }, {}, {}]; const res = await writeUpdates(config, packageFiles, branches); expect(res).toEqual('done'); expect(branchWorker.processBranch.mock.calls).toHaveLength(1); diff --git a/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap b/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap index 9f9f0f69c2bf37aa5c6e5cae9abe04b4cdf3593d..1bde98904545ac46fe2c57c0cf4a1ea18379293a 100644 --- a/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap +++ b/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap @@ -209,10 +209,10 @@ Array [ "semanticCommits": null, "statusCheckVerify": false, "timezone": null, - "type": "lockFileMaintenance", "unpublishSafe": false, "updateLockFiles": true, "updateNotScheduled": true, + "updateType": "lockFileMaintenance", "warnings": Array [], "yarnrc": null, }, diff --git a/test/workers/repository/updates/branchify.spec.js b/test/workers/repository/updates/branchify.spec.js index 1ee9ad34fc5afd778d560646cecb8c28ff6400db..e75c7f14426266d485f18ff9a4c2b5f789326641 100644 --- a/test/workers/repository/updates/branchify.spec.js +++ b/test/workers/repository/updates/branchify.spec.js @@ -29,7 +29,7 @@ describe('workers/repository/updates/branchify', () => { branchName: 'foo-{{version}}', version: '1.1.0', prTitle: 'some-title', - type: 'minor', + updateType: 'minor', }, ]); config.repoIsOnboarded = true; @@ -117,7 +117,7 @@ describe('workers/repository/updates/branchify', () => { it('mixes errors and warnings', async () => { flattenUpdates.mockReturnValueOnce([ { - type: 'error', + updateType: 'error', }, { branchName: 'foo-{{version}}', @@ -125,7 +125,7 @@ describe('workers/repository/updates/branchify', () => { version: '1.1.0', }, { - type: 'warning', + updateType: 'warning', branchName: 'foo-{{version}}', prTitle: 'some-title', version: '2.0.0',