From 150273c8fe336444b1764f981247f0ed1fd6aa89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6nnemann?= Date: Mon, 13 Jul 2015 11:53:32 +0200 Subject: [PATCH] fix(plugins): rename plugins --- src/lib/plugins.js | 4 ++-- src/lib/type.js | 2 +- src/pre.js | 2 +- test/specs/pre.js | 4 ++-- test/specs/type.js | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/plugins.js b/src/lib/plugins.js index 8d7b662b..791dcaba 100644 --- a/src/lib/plugins.js +++ b/src/lib/plugins.js @@ -1,8 +1,8 @@ let exports = module.exports = function (source) { return { - analyze: exports.normalize(source.analyze, '@semantic-release/commit-analyzer'), + analyzeCommits: exports.normalize(source.analyzeCommits, '@semantic-release/commit-analyzer'), generateNotes: exports.normalize(source.generateNotes, '@semantic-release/release-notes-generator'), - verify: exports.normalize(source.verify, './plugin-noop') + verifyRelease: exports.normalize(source.verifyRelease, './plugin-noop') } } diff --git a/src/lib/type.js b/src/lib/type.js index e4b581b7..25c3516b 100644 --- a/src/lib/type.js +++ b/src/lib/type.js @@ -1,7 +1,7 @@ const SemanticReleaseError = require('./error') module.exports = function (plugins, commits, lastRelease, cb) { - plugins.analyze(commits, (err, type) => { + plugins.analyzeCommits(commits, (err, type) => { if (err) return cb(err) if (!type) { diff --git a/src/pre.js b/src/pre.js index 7e0b1372..30464885 100644 --- a/src/pre.js +++ b/src/pre.js @@ -26,7 +26,7 @@ module.exports = function (pkg, npmConfig, plugins, cb) { semver.inc(results.lastRelease.version, results.type) } - plugins.verify(nextRelease, (err) => { + plugins.verifyRelease(nextRelease, (err) => { if (err) return cb(err) cb(null, nextRelease) }) diff --git a/test/specs/pre.js b/test/specs/pre.js index 47815f20..64feea76 100644 --- a/test/specs/pre.js +++ b/test/specs/pre.js @@ -7,8 +7,8 @@ const pre = proxyquire('../../dist/pre', { }) const plugins = { - verify: (release, cb) => cb(null, release), - analyze: (commits, cb) => cb(null, 'major') + verifyRelease: (release, cb) => cb(null, release), + analyzeCommits: (commits, cb) => cb(null, 'major') } test('full pre run', (t) => { diff --git a/test/specs/type.js b/test/specs/type.js index 9e151c0e..7d1f9180 100644 --- a/test/specs/type.js +++ b/test/specs/type.js @@ -7,7 +7,7 @@ test('get type from commits', (t) => { tt.plan(2) type({ - analyze: (commits, cb) => cb(null, 'major') + analyzeCommits: (commits, cb) => cb(null, 'major') }, [{ hash: '0', message: 'a' @@ -23,7 +23,7 @@ test('get type from commits', (t) => { tt.plan(1) type({ - analyze: (commits, cb) => cb(null, null) + analyzeCommits: (commits, cb) => cb(null, null) }, [], {}, (err) => { tt.is(err.code, 'ENOCHANGE') @@ -34,7 +34,7 @@ test('get type from commits', (t) => { tt.plan(2) type({ - analyze: (commits, cb) => cb(null, 'major') + analyzeCommits: (commits, cb) => cb(null, 'major') }, [], {}, (err, type) => { tt.error(err)