Socket
Socket
Sign inDemoInstall

@semantic-release/error

Package Overview
Dependencies
Maintainers
5
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.2.0 to 3.0.0-beta.1

50

package.json
{
"name": "@semantic-release/error",
"description": "errors with more than just a message",
"version": "2.2.0",
"version": "3.0.0-beta.1",
"author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
"ava": {
"files": [
"test/**/*.test.js"
]
},
"bugs": {
"url": "https://github.com/semantic-release/error/issues"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"devDependencies": {
"ava": "^0.25.0",
"codecov": "^3.0.0",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.0.0",
"eslint-config-prettier": "^2.5.0",
"eslint-plugin-prettier": "^2.2.0",
"nyc": "^11.2.1",
"prettier": "~1.10.0",
"semantic-release": "^12.2.2",
"xo": "^0.18.2"
"ava": "3.15.0",
"codecov": "3.8.1",
"nyc": "15.1.0",
"xo": "0.38.2"
},
"engines": {
"node": ">=14.17"
},
"files": [

@@ -49,4 +46,2 @@ "index.js"

"printWidth": 120,
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "es5"

@@ -62,3 +57,2 @@ },

"scripts": {
"cm": "git-cz",
"codecov": "codecov -f coverage/coverage-final.json",

@@ -68,15 +62,17 @@ "lint": "xo",

"semantic-release": "semantic-release",
"test": "nyc ava -v"
"test": "nyc ava -v",
"test:ci": "nyc ava -v"
},
"xo": {
"extends": [
"prettier"
],
"plugins": [
"prettier"
],
"prettier": true,
"space": true,
"rules": {
"prettier/prettier": 2
"unicorn/string-content": "off"
}
},
"renovate": {
"extends": [
"github>semantic-release/.github"
]
}
}

@@ -5,5 +5,3 @@ # @semantic-release/error

[![Travis](https://img.shields.io/travis/semantic-release/error.svg)](https://travis-ci.org/semantic-release/error)
[![Codecov](https://img.shields.io/codecov/c/github/semantic-release/error.svg)](https://codecov.io/gh/semantic-release/error)
[![Greenkeeper badge](https://badges.greenkeeper.io/semantic-release/error.svg)](https://greenkeeper.io)
[![Build Status](https://github.com/semantic-release/error/workflows/Test/badge.svg)](https://github.com/semantic-release/error/actions?query=workflow%3ATest+branch%3Amaster)

@@ -17,3 +15,3 @@ 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.

```js
const SemanticReleaseError = require('@semantic-release/error');
const SemanticReleaseError = require("@semantic-release/error");

@@ -24,9 +22,9 @@ // Default

// With error message
throw new SemanticReleaseError('An error happened');
throw new SemanticReleaseError("An error happened");
// With error message and error code
throw new SemanticReleaseError('An error happened', 'ECODE');
throw new SemanticReleaseError("An error happened", "ECODE");
// With error message, error code and details
throw new SemanticReleaseError('An error happened', 'ECODE', 'Here is some suggestions to solve this error.');
throw new SemanticReleaseError("An error happened", "ECODE", "Here is some suggestions to solve this error.");

@@ -41,7 +39,7 @@ // With inheritance

this.details = details;
this.newProperty = 'newProperty';
this.newProperty = "newProperty";
}
}
throw new InheritedError('An error happened', 'ECODE', 'Here is some suggestions to solve this error.');
throw new InheritedError("An error happened", "ECODE", "Here is some suggestions to solve this error.");
```
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