-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(esm): converted the package to esm-only
BREAKING CHANGE: `@semantic-release/error` is now an ES Module fixes #247
- Loading branch information
Showing
6 changed files
with
17 additions
and
16 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
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
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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
const SemanticReleaseError = require('../../index.js'); | ||
import SemanticReleaseError from '../../index.js'; | ||
|
||
module.exports = class InheritedError extends SemanticReleaseError { | ||
export default class InheritedError extends SemanticReleaseError { | ||
constructor(message, code) { | ||
super(message); | ||
Error.captureStackTrace(this, this.constructor); | ||
this.name = 'InheritedError'; | ||
this.code = code; | ||
this.newProperty = 'newProperty'; | ||
} | ||
}; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const SemanticReleaseError = require('../../index.js'); | ||
import SemanticReleaseError from '../../index.js'; | ||
|
||
module.exports = () => { | ||
export default () => { | ||
throw new SemanticReleaseError('message', 'code'); | ||
}; | ||
} |
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