{"name":"@semantic-release/error","description":"errors with more than just a message","version":"3.0.0","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":"3.15.0","codecov":"3.8.3","nyc":"15.1.0","xo":"0.38.2"},"engines":{"node":">=14.17"},"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,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/semantic-release/error.git"},"scripts":{"codecov":"codecov -f coverage/coverage-final.json","lint":"xo","pretest":"npm run lint","semantic-release":"semantic-release","test":"nyc ava -v","test:ci":"nyc ava -v"},"xo":{"prettier":true,"space":true,"rules":{"unicorn/string-content":"off"}},"renovate":{"extends":["github>semantic-release/.github"]},"gitHead":"3012b70495ac07a2fea403ad19fd16ce08a6af4e","_id":"@semantic-release/error@3.0.0","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==","shasum":"30a3b97bbb5844d695eb22f9d3aa40f6a92770c2","tarball":"http://registry-npm.ywwl.com/@semantic-release/error/download/@semantic-release/error-3.0.0.tgz","fileCount":4,"unpackedSize":4673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2aEICRA9TVsSAnZWagAAiZIQAKOcX5Lub4OpbvVoTzI3\nxJxdTY8R/2oiIyC4rYUb6tCwVIQkQK9DkHWIo99VfatgYrO93Yn0mhfnE3A1\nRpCwQTcR/99NPvE/memOX9OzBV/ixdD1n8ZMO56UaZEYEfzdE8kKmUa3aAtB\nUIMjFPls2j0/eETh5iXV+7PGklizxsX+gm3rm6VCdGBxwtnApvXvWSsQTYCp\n8wrhshObLF2khCLBpRxpqCpLph+ckwI35vo1ufdIxv7++JfBurpDdL/IVLBo\nr34/kSSUWxFLSs0AwT929O1lNB/blnFV4IXcv7z5Cdl8DNy+/+CisN4tPflI\ngYDtcrUwWQKVM+ndxbFEW50RbyIDRlu5CoBo/0onuolYscr9GfM1tAkW+sEO\nEVilImbGeyWOF9EyQAqV6Y0M7gmcQsZA9mjJXd4X41W7NxbL1OakHVg+A/Sr\nbJASJL56KK5eK9pkqTjn3kIY3EhvtCM/WI1cZ6Z0M8NY8goSBYwQKdnw38tz\nxeUUBNnRiwfTShDkbnZImLo7+SbLz7Pc/ZYFqkYTERaOhI1zFO4ls7U0WgZr\nR7boGptXR7q1syQEbAsG/DhNY+Tl/HKbGo+pB93nDVlqlAUz3K2/1ZJeSD7d\njGybNemBqS8vzc4NvCtDOBTY4blaWsTTI7IzpBBOHco2W1kon/z3zPHjcMce\nCULB\r\n=Unyd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiz3Rd7JnQ4eWgQ+QcsB0sTNnrlNqi3GL5YonoT0o7dwIgPmyxTrUs/oO8r06pnigpC8yf/DaZ5Z9hXF/X04zBHMA="}],"size":2077,"noattachment":false,"key":"/@semantic-release/error/-/@semantic-release/error-3.0.0.tgz"},"_npmUser":{"name":"semantic-release-bot","email":"semantic-release@martynus.net"},"directories":{},"maintainers":[{"name":"pvdlg","email":"pierre.denis.vanduynslager@gmail.com"},{"name":"semantic-release-bot","email":"semantic-release@martynus.net"},{"name":"boennemann","email":"me@sbw.one"},{"name":"christophwitzko","email":"npm@christophwitzko.com"},{"name":"gr2m","email":"gregor@martynus.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.0.0_1631908483585_0.2874657526509401"},"_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":1631908483722,"_cnpm_publish_time":1631908483722,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.0"}}