Socket
Socket
Sign inDemoInstall

@semantic-release/error

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-release/error - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

1

index.js

@@ -7,3 +7,4 @@ module.exports = class SemanticReleaseError extends Error {

this.code = code;
this.semanticRelease = true;
}
};

2

package.json

@@ -1,1 +0,1 @@

{"name":"@semantic-release/error","description":"errors with more than just a message","version":"2.0.1","author":"Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)","bugs":{"url":"https://github.com/semantic-release/error/issues"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"devDependencies":{"ava":"^0.23.0","codecov":"^3.0.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.7.0","eslint-config-prettier":"^2.5.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-prettier":"^2.2.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","nyc":"^11.2.1","prettier":"^1.7.0","rimraf":"^2.6.2","semantic-release":"^8.0.0"},"eslintConfig":{"extends":["standard","prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":2}},"files":["index.js"],"homepage":"https://github.com/semantic-release/error#readme","keywords":["error","semantic-release"],"license":"MIT","main":"index.js","nyc":{"include":["index.js"],"reporter":["json","text","html"],"all":true},"prettier":{"printWidth":120,"singleQuote":true,"bracketSpacing":false,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/semantic-release/error.git"},"scripts":{"clean":"rimraf coverage && rimraf .nyc_output","cm":"git-cz","codecov":"codecov -f coverage/coverage-final.json","lint":"eslint .","pretest":"npm run clean && npm run lint","semantic-release":"semantic-release pre && npm publish && semantic-release post","test":"nyc ava -v"}}
{"name":"@semantic-release/error","description":"errors with more than just a message","version":"2.1.0","author":"Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)","bugs":{"url":"https://github.com/semantic-release/error/issues"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"devDependencies":{"ava":"^0.23.0","codecov":"^3.0.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.7.0","eslint-config-prettier":"^2.5.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-prettier":"^2.2.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","nyc":"^11.2.1","prettier":"^1.7.0","rimraf":"^2.6.2","semantic-release":"^8.0.0"},"eslintConfig":{"extends":["standard","prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":2}},"files":["index.js"],"homepage":"https://github.com/semantic-release/error#readme","keywords":["error","semantic-release"],"license":"MIT","main":"index.js","nyc":{"include":["index.js"],"reporter":["json","text","html"],"all":true},"prettier":{"printWidth":120,"singleQuote":true,"bracketSpacing":false,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/semantic-release/error.git"},"scripts":{"clean":"rimraf coverage && rimraf .nyc_output","cm":"git-cz","codecov":"codecov -f coverage/coverage-final.json","lint":"eslint .","pretest":"npm run clean && npm run lint","semantic-release":"semantic-release pre && npm publish && semantic-release post","test":"nyc ava -v"}}

@@ -5,2 +5,6 @@ # @semantic-release/error

Errors of type `SemanticReleaseError` or an inherited type will be considered by [semantic-release](https://github.com/semantic-release/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](https://github.com/semantic-release/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.
[![npm](https://img.shields.io/npm/v/@semantic-release/error.svg)](https://www.npmjs.com/package/@semantic-release/error)

@@ -29,2 +33,15 @@ [![Greenkeeper badge](https://badges.greenkeeper.io/semantic-release/error.svg)](https://greenkeeper.io/)

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');
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc