Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@semantic-release/error
Advanced tools
Error type used by all semantic-release packages.
Errors of type SemanticReleaseError
or an inherited type will be considered by semantic-release as an expected exception case (no release to be done, running on a PR etc..). That indicate to the semantic-release
process to stop and exit with the 0
success code.
Any other type of error will be considered by semantic-release as an unexpected error (i/o issue, code problem etc...). That indicate to the semantic-release
process to stop, log the error and exit with the 1
failure code.
const SemanticReleaseError = require('@semantic-release/error');
// Default
throw new SemanticReleaseError();
// With error message
throw new SemanticReleaseError('An error happened');
// With error message and error code
throw new SemanticReleaseError('An error happened', 'ECODE');
// With inheritance
class InheritedError extends SemanticReleaseError {
constructor(message, code, newProperty) {
super(message);
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.code = code;
this.newProperty = 'newProperty';
}
}
throw new InheritedError('An error happened', 'ECODE');
FAQs
errors with more than just a message
The npm package @semantic-release/error receives a total of 1,779,659 weekly downloads. As such, @semantic-release/error popularity was classified as popular.
We found that @semantic-release/error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.