for #2543 BREAKING CHANGE: semantic-release is now ESM-only. since it is used through its own executable, the impact on consuming projects should be minimal BREAKING CHANGE: references to plugin files in configs need to include the file extension because of executing in an ESM context
8 lines
280 B
JavaScript
8 lines
280 B
JavaScript
import SemanticReleaseError from '@semantic-release/error';
|
|
import * as ERROR_DEFINITIONS from './definitions/errors.js';
|
|
|
|
export default (code, ctx = {}) => {
|
|
const {message, details} = ERROR_DEFINITIONS[code](ctx);
|
|
return new SemanticReleaseError(message, code, details);
|
|
}
|