refactor(error): use error module
This commit is contained in:
		
							parent
							
								
									43c8df0bfe
								
							
						
					
					
						commit
						0316babf7a
					
				| @ -9,13 +9,13 @@ | |||||||
|     "nyc": { |     "nyc": { | ||||||
|       "exclude": [ |       "exclude": [ | ||||||
|         ".test", |         ".test", | ||||||
|         "node_modules", |         "node_modules" | ||||||
|         "dist/lib/error.js" |  | ||||||
|       ] |       ] | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@semantic-release/commit-analyzer": "^1.0.0", |     "@semantic-release/commit-analyzer": "^1.0.0", | ||||||
|  |     "@semantic-release/error": "^1.0.0", | ||||||
|     "@semantic-release/release-notes-generator": "^1.0.0", |     "@semantic-release/release-notes-generator": "^1.0.0", | ||||||
|     "lodash": "^3.9.3", |     "lodash": "^3.9.3", | ||||||
|     "nopt": "^3.0.3", |     "nopt": "^3.0.3", | ||||||
|  | |||||||
| @ -1,7 +0,0 @@ | |||||||
| module.exports = class SemanticReleaseError extends Error { |  | ||||||
|   constructor (message, code) { |  | ||||||
|     super() |  | ||||||
|     this.message = message |  | ||||||
|     this.code = code |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,4 +1,4 @@ | |||||||
| const SemanticReleaseError = require('./error') | const SemanticReleaseError = require('@semantic-release/error') | ||||||
| 
 | 
 | ||||||
| module.exports = function (plugins, commits, lastRelease, cb) { | module.exports = function (plugins, commits, lastRelease, cb) { | ||||||
|   plugins.analyzeCommits(commits, (err, type) => { |   plugins.analyzeCommits(commits, (err, type) => { | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| const SemanticReleaseError = require('./error') | const SemanticReleaseError = require('@semantic-release/error') | ||||||
| 
 | 
 | ||||||
| module.exports = function (pkg, options, env) { | module.exports = function (pkg, options, env) { | ||||||
|   let errors = [] |   let errors = [] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user