From 561b60fc7669ec8ec8186539dd35914805a9df18 Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Wed, 22 Feb 2017 23:13:17 -0500 Subject: [PATCH] fix(initial): handle initial release, close #3 --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 76668ef..c552f74 100644 --- a/src/index.js +++ b/src/index.js @@ -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') @@ -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.')