fix(plugins): rename plugins
This commit is contained in:
parent
f247ed8741
commit
150273c8fe
@ -1,8 +1,8 @@
|
|||||||
let exports = module.exports = function (source) {
|
let exports = module.exports = function (source) {
|
||||||
return {
|
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'),
|
generateNotes: exports.normalize(source.generateNotes, '@semantic-release/release-notes-generator'),
|
||||||
verify: exports.normalize(source.verify, './plugin-noop')
|
verifyRelease: exports.normalize(source.verifyRelease, './plugin-noop')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const SemanticReleaseError = require('./error')
|
const SemanticReleaseError = require('./error')
|
||||||
|
|
||||||
module.exports = function (plugins, commits, lastRelease, cb) {
|
module.exports = function (plugins, commits, lastRelease, cb) {
|
||||||
plugins.analyze(commits, (err, type) => {
|
plugins.analyzeCommits(commits, (err, type) => {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
|
|
||||||
if (!type) {
|
if (!type) {
|
||||||
|
@ -26,7 +26,7 @@ module.exports = function (pkg, npmConfig, plugins, cb) {
|
|||||||
semver.inc(results.lastRelease.version, results.type)
|
semver.inc(results.lastRelease.version, results.type)
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.verify(nextRelease, (err) => {
|
plugins.verifyRelease(nextRelease, (err) => {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
cb(null, nextRelease)
|
cb(null, nextRelease)
|
||||||
})
|
})
|
||||||
|
@ -7,8 +7,8 @@ const pre = proxyquire('../../dist/pre', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const plugins = {
|
const plugins = {
|
||||||
verify: (release, cb) => cb(null, release),
|
verifyRelease: (release, cb) => cb(null, release),
|
||||||
analyze: (commits, cb) => cb(null, 'major')
|
analyzeCommits: (commits, cb) => cb(null, 'major')
|
||||||
}
|
}
|
||||||
|
|
||||||
test('full pre run', (t) => {
|
test('full pre run', (t) => {
|
||||||
|
@ -7,7 +7,7 @@ test('get type from commits', (t) => {
|
|||||||
tt.plan(2)
|
tt.plan(2)
|
||||||
|
|
||||||
type({
|
type({
|
||||||
analyze: (commits, cb) => cb(null, 'major')
|
analyzeCommits: (commits, cb) => cb(null, 'major')
|
||||||
}, [{
|
}, [{
|
||||||
hash: '0',
|
hash: '0',
|
||||||
message: 'a'
|
message: 'a'
|
||||||
@ -23,7 +23,7 @@ test('get type from commits', (t) => {
|
|||||||
tt.plan(1)
|
tt.plan(1)
|
||||||
|
|
||||||
type({
|
type({
|
||||||
analyze: (commits, cb) => cb(null, null)
|
analyzeCommits: (commits, cb) => cb(null, null)
|
||||||
}, [], {},
|
}, [], {},
|
||||||
(err) => {
|
(err) => {
|
||||||
tt.is(err.code, 'ENOCHANGE')
|
tt.is(err.code, 'ENOCHANGE')
|
||||||
@ -34,7 +34,7 @@ test('get type from commits', (t) => {
|
|||||||
tt.plan(2)
|
tt.plan(2)
|
||||||
|
|
||||||
type({
|
type({
|
||||||
analyze: (commits, cb) => cb(null, 'major')
|
analyzeCommits: (commits, cb) => cb(null, 'major')
|
||||||
}, [], {},
|
}, [], {},
|
||||||
(err, type) => {
|
(err, type) => {
|
||||||
tt.error(err)
|
tt.error(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user