fix(plugins): rename plugins
This commit is contained in:
		
							parent
							
								
									f247ed8741
								
							
						
					
					
						commit
						150273c8fe
					
				| @ -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') | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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) | ||||
|     }) | ||||
|  | ||||
| @ -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) => { | ||||
|  | ||||
| @ -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) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user