Skip to content

Commit

Permalink
fix(initial): handle initial release, close #3
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Feb 23, 2017
1 parent 38262d7 commit 561b60f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const la = require('lazy-ass')
const dontBreak = require('dont-break')
const alwaysError = require('always-error')

const isReleaseType = is.oneOf(['major', 'minor', 'patch'])
const isReleaseType = is.oneOf(['major', 'minor', 'patch', 'initial'])

function dontCrack (opts, config, callback) {
log('dont-crack arguments')
Expand All @@ -17,6 +17,11 @@ function dontCrack (opts, config, callback) {
la(isReleaseType(config.nextRelease.type),
'invalid next release type', config.nextRelease)

if (config.nextRelease.type === 'initial') {
log('initial release')
return callback()
}

if (config.nextRelease.type === 'major') {
log('major release will crack dependents by definition')
log('no need to check.')
Expand Down

0 comments on commit 561b60f

Please sign in to comment.