diff --git a/src/lib/commits.js b/src/lib/commits.js index b5034be7..76f0da5f 100644 --- a/src/lib/commits.js +++ b/src/lib/commits.js @@ -32,9 +32,9 @@ module.exports = function ({lastRelease, options}, cb) { `The commit the last release of this package was derived from is not in the direct history of the "${branch}" branch. This means semantic-release can not extract the commits between now and then. This is usually caused by force pushing, releasing from an unrelated branch, or using an already existing package name. -You can recover from this error by publishing manually or restoring the commit "${from}".` + (branches && branches.length ? - `\nHere is a list of branches that still contain the commit in question: \n * ${branches.join('\n * ')}` : - '' +You can recover from this error by publishing manually or restoring the commit "${from}".` + (branches && branches.length + ? `\nHere is a list of branches that still contain the commit in question: \n * ${branches.join('\n * ')}` + : '' )) return cb(new SemanticReleaseError('Commit not in history', 'ENOTINHISTORY')) } diff --git a/src/lib/plugins.js b/src/lib/plugins.js index f5a0da4d..3f1186b2 100644 --- a/src/lib/plugins.js +++ b/src/lib/plugins.js @@ -12,9 +12,9 @@ let exports = module.exports = function (options) { if (!Array.isArray(options[plugin])) { plugins[plugin] = exports.normalize( options[plugin], - plugin === 'verifyConditions' ? - '@semantic-release/condition-travis' : - './plugin-noop' + plugin === 'verifyConditions' + ? '@semantic-release/condition-travis' + : './plugin-noop' ) return } diff --git a/src/pre.js b/src/pre.js index f770e55f..4d2cd3e8 100644 --- a/src/pre.js +++ b/src/pre.js @@ -28,9 +28,9 @@ module.exports = function (config, cb) { const nextRelease = { type: results.type, - version: results.type === 'initial' ? - '1.0.0' : - semver.inc(results.lastRelease.version, results.type) + version: results.type === 'initial' + ? '1.0.0' + : semver.inc(results.lastRelease.version, results.type) } plugins.verifyRelease(_.assign({ diff --git a/test/mocks/child-process.js b/test/mocks/child-process.js index f1281b6a..a0c0f6a4 100644 --- a/test/mocks/child-process.js +++ b/test/mocks/child-process.js @@ -12,9 +12,9 @@ module.exports = { cb( null, - /\.\.HEAD/.test(command) ? - rawCommits[0] : - rawCommits.join() + /\.\.HEAD/.test(command) + ? rawCommits[0] + : rawCommits.join() ) }, '@noCallThru': true diff --git a/test/specs/plugins.js b/test/specs/plugins.js index a38548cf..137c80ca 100644 --- a/test/specs/plugins.js +++ b/test/specs/plugins.js @@ -67,7 +67,6 @@ test('plugin pipelines', (t) => { }) test('normalize and load plugin', (t) => { - t.test('load from string', (tt) => { const plugin = plugins.normalize('./dist/lib/plugin-noop')