{"name":"@semantic-release/error","description":"errors with more than just a message","version":"4.0.0","type":"module","author":{"name":"Stephan Bönnemann","email":"stephan@boennemann.me","url":"http://boennemann.me"},"ava":{"files":["test/**/*.test.js"]},"bugs":{"url":"https://github.com/semantic-release/error/issues"},"devDependencies":{"ava":"5.1.0","c8":"7.14.0","codecov":"3.8.3","prettier":"2.8.8"},"engines":{"node":">=18"},"homepage":"https://github.com/semantic-release/error#readme","keywords":["error","semantic-release"],"license":"MIT","exports":"./index.js","c8":{"include":["index.js"],"reporter":["json","text","html"],"all":true},"prettier":{"printWidth":120,"trailingComma":"es5"},"publishConfig":{"access":"public","provenance":true},"repository":{"type":"git","url":"git+https://github.com/semantic-release/error.git"},"scripts":{"lint":"prettier --check \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"{bin,lib,test}/*.js\"","lint:fix":"prettier --write \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"{bin,lib,test}/*.js\"","pretest":"npm run lint","test":"c8 ava -v","test:ci":"c8 ava -v"},"renovate":{"extends":["github>semantic-release/.github"]},"gitHead":"d378487e563b5eb65a499e8d44dceb438f6806dd","_id":"@semantic-release/error@4.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==","shasum":"692810288239637f74396976a9340fbc0aa9f6f9","tarball":"http://registry-npm.ywwl.com/@semantic-release/error/download/@semantic-release/error-4.0.0.tgz","fileCount":4,"unpackedSize":4682,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@semantic-release%2ferror@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6CK0CZgX5sZIM7LUOCo2ZDuHK9PdMsdi8ojKEBjRGMwIhAN1BhhCbwjmubUIOuA2TpMnazBN7TXC1D7uLGtRvjB+p"}],"size":2046,"noattachment":false,"key":"/@semantic-release/error/-/@semantic-release/error-4.0.0.tgz"},"_npmUser":{"name":"semantic-release-bot","email":"semantic-release@martynus.net"},"directories":{},"maintainers":[{"name":"travi","email":"npm@travi.org"},{"name":"pvdlg","email":"pierre.denis.vanduynslager@gmail.com"},{"name":"semantic-release-bot","email":"semantic-release@martynus.net"},{"name":"gr2m","email":"gregor@martynus.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_4.0.0_1686171815581_0.5882817095591448"},"_hasShrinkwrap":false,"readme":"# @semantic-release/error\n\nError type used by all [semantic-release](https://github.com/semantic-release/semantic-release) packages.\n\n[![Build Status](https://github.com/semantic-release/error/workflows/Test/badge.svg)](https://github.com/semantic-release/error/actions?query=workflow%3ATest+branch%3Amaster)\n\nErrors 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.\n\nAny 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.\n\n## Usage\n\n```js\nimport SemanticReleaseError from \"@semantic-release/error\";\n\n// Default\nthrow new SemanticReleaseError();\n\n// With error message\nthrow new SemanticReleaseError(\"An error happened\");\n\n// With error message and error code\nthrow new SemanticReleaseError(\"An error happened\", \"ECODE\");\n\n// With error message, error code and details\nthrow new SemanticReleaseError(\"An error happened\", \"ECODE\", \"Here is some suggestions to solve this error.\");\n\n// With inheritance\nclass InheritedError extends SemanticReleaseError {\n  constructor(message, code, newProperty, details) {\n    super(message);\n    Error.captureStackTrace(this, this.constructor);\n    this.name = this.constructor.name;\n    this.code = code;\n    this.details = details;\n    this.newProperty = \"newProperty\";\n  }\n}\n\nthrow new InheritedError(\"An error happened\", \"ECODE\", \"Here is some suggestions to solve this error.\");\n```\n","publish_time":1686171815736,"_cnpm_publish_time":1686171815736,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.0"}}