-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const url = require('url'); | ||
const pkg = require('../../package.json'); | ||
|
||
const homepage = url.format({...url.parse(pkg.homepage), ...{hash: null}}); | ||
const linkify = file => `${homepage}/blob/master/${file}`; | ||
|
||
module.exports = { | ||
EINVALIDCHANGELOGFILE: ({changelogFile}) => ({ | ||
message: 'Invalid `changelogFile` option.', | ||
details: `The [changelogFile option](${linkify( | ||
'README.md#changelogfile' | ||
)}) option, if defined, must be a non empty \`String\`. | ||
Your configuration for the \`assets\` option is \`${changelogFile}\`.`, | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const SemanticReleaseError = require('@semantic-release/error'); | ||
const ERROR_DEFINITIONS = require('./definitions/errors'); | ||
|
||
module.exports = (code, ctx) => { | ||
const {message, details} = ERROR_DEFINITIONS[code](ctx); | ||
return new SemanticReleaseError(message, code, details); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters