{"_id":"@adorade/plugin-error","_rev":"2-faa8701c7fec8cc8ca58a38f262616e8","name":"@adorade/plugin-error","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@adorade/plugin-error","version":"1.0.0","author":{"name":"Adorade"},"license":"MIT","_id":"@adorade/plugin-error@1.0.0","maintainers":[{"name":"adorade","email":"office.adorade@gmail.com"}],"homepage":"https://github.com/adorade/plugin-error#readme","bugs":{"url":"https://github.com/adorade/plugin-error/issues"},"dist":{"shasum":"bebb637290938d2c56bc9debc9ba87a7f7508629","tarball":"https://registry.npmjs.org/@adorade/plugin-error/-/plugin-error-1.0.0.tgz","fileCount":4,"integrity":"sha512-P480ufC7aG8ML2jwVT8AkLPmVazfF5cwnHHsSMjnzdLepapt6FS02bPUISFINN92m4yYdGBYNoPHbMNRzO20rA==","signatures":[{"sig":"MEUCIH7H9LkS5pNkhGRvHdTGgpCQaP8/7T5KWUBNThq4DpqOAiEAsFKlf6Mha9Hye5rjtEBkVLmaCwVTta0UbOY0ZbggMU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13174},"jest":{"roots":["test"],"testRegex":".*\\.test\\.js$","transform":{"\\.[jt]sx?$":"babel-jest"},"clearMocks":true,"collectCoverage":true,"testEnvironment":"node","coverageProvider":"v8","coverageDirectory":"./.coverage/","coverageReporters":["html","lcov","text"],"coverageThreshold":{"global":{"lines":85,"branches":85,"functions":85,"statements":85}},"collectCoverageFrom":["index.js"]},"main":"index.js","type":"module","gitHead":"e1886aadfa357c9f32a4a5bd8cf82fc2954c6150","scripts":{"lint":"eslint index.js test/","test":"node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -i","lint:fix":"eslint index.js test/ --fix"},"_npmUser":{"name":"adorade","email":"office.adorade@gmail.com"},"repository":{"url":"git+https://github.com/adorade/plugin-error.git","type":"git"},"_npmVersion":"10.2.4","description":"Error handling for Gulp plugins with ESM support","directories":{},"_nodeVersion":"20.11.0","dependencies":{"ansi-colors":"4.1.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","eslint":"8.56.0","babel-jest":"29.7.0","@babel/core":"7.23.9","@babel/preset-env":"7.23.9","@babel/eslint-parser":"7.23.10"},"_npmOperationalInternal":{"tmp":"tmp/plugin-error_1.0.0_1708002077492_0.5807184815454178","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@adorade/plugin-error","version":"2.0.0","keywords":["gulp","plugin","error","esm"],"author":{"name":"Adorade"},"license":"MIT","_id":"@adorade/plugin-error@2.0.0","maintainers":[{"name":"adorade","email":"office.adorade@gmail.com"}],"homepage":"https://github.com/adorade/plugin-error#readme","bugs":{"url":"https://github.com/adorade/plugin-error/issues"},"dist":{"shasum":"ccb2b266846890d83b7cce1c82d4d6fd474fa578","tarball":"https://registry.npmjs.org/@adorade/plugin-error/-/plugin-error-2.0.0.tgz","fileCount":5,"integrity":"sha512-YG2CuhBcInSLM/h3sMRviS3Ky2obJCSEtyBgqczHb/LyDbVik1La6xZZXnwIWiWInITel/e83tifQW9MX0fSBg==","signatures":[{"sig":"MEUCIQD2U2j3WnqZbzNzzIo0cWwD4XKiu22aHVUvR/uwRK6N9QIgPf9vEKaSZgG9vYQ7JCE45unEs0YC6eYIss4nQF8RNUo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14415},"main":"index.js","type":"module","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"5d5231cfe120c6c202256857a24df6eb639ce8ef","scripts":{"jest":"node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -i","lint":"eslint index.js test/","test":"yarn run lint && yarn run jest","lint:fix":"eslint index.js test/ --fix","jest:coverage":"yarn run jest --coverage","prepublishOnly":"yarn test"},"_npmUser":{"name":"adorade","email":"office.adorade@gmail.com"},"repository":{"url":"git+https://github.com/adorade/plugin-error.git","type":"git"},"_npmVersion":"10.8.3","description":"Error handling for Gulp plugins with ESM support","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ansi-colors":"4.1.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","eslint":"9.11.1","globals":"15.9.0","@eslint/js":"9.11.1","@babel/core":"7.25.2","@babel/preset-env":"7.25.4","@babel/eslint-parser":"7.25.1","@stylistic/eslint-plugin-js":"2.8.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-error_2.0.0_1727631626040_0.010023476435511158","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@adorade/plugin-error","version":"2.0.1","description":"Error handling for Gulp plugins with ESM support","main":"index.js","repository":{"type":"git","url":"git+https://github.com/adorade/plugin-error.git"},"author":{"name":"Adorade"},"type":"module","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"types":"index.d.ts","keywords":["gulp","plugin","error","esm"],"scripts":{"lint":"eslint index.js test/","lint:fix":"eslint index.js test/ --fix","jest":"node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -i","jest:coverage":"yarn run jest --coverage","test":"yarn run lint && yarn run jest","prepublishOnly":"yarn test"},"dependencies":{"ansi-colors":"4.1.3"},"devDependencies":{"@babel/core":"7.25.2","@babel/eslint-parser":"7.25.1","@babel/preset-env":"7.25.4","@eslint/js":"9.11.1","@stylistic/eslint-plugin-js":"2.8.0","eslint":"9.11.1","globals":"15.9.0","jest":"29.7.0"},"license":"MIT","_id":"@adorade/plugin-error@2.0.1","gitHead":"3a460f9f4287ea227210d210d3d906e9583ee8bd","bugs":{"url":"https://github.com/adorade/plugin-error/issues"},"homepage":"https://github.com/adorade/plugin-error#readme","_nodeVersion":"20.17.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-eY9IPPZoyJpNkwahjF3QtmlTwgeGL88XM+xZRdEuZhQj4WOER5Xp8lAVKHGpJ57GsthlzEzuu/4t+3ZACF+OpA==","shasum":"70767e291d54535587a935416379b91d1f721022","tarball":"https://registry.npmjs.org/@adorade/plugin-error/-/plugin-error-2.0.1.tgz","fileCount":5,"unpackedSize":14305,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7rfX2DkR7ejjpnCear/sPifVYRTyoMxQB5ABXHmWDVgIgHpXoCUHXxpNdteBtm/7lWbY3ufJDLbJuCryN+3U0YCA="}]},"_npmUser":{"name":"adorade","email":"office.adorade@gmail.com"},"directories":{},"maintainers":[{"name":"adorade","email":"office.adorade@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-error_2.0.1_1727710675112_0.5216643024235985"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-15T13:01:17.405Z","modified":"2024-09-30T15:37:55.515Z","1.0.0":"2024-02-15T13:01:17.623Z","2.0.0":"2024-09-29T17:40:26.302Z","2.0.1":"2024-09-30T15:37:55.369Z"},"bugs":{"url":"https://github.com/adorade/plugin-error/issues"},"author":{"name":"Adorade"},"license":"MIT","homepage":"https://github.com/adorade/plugin-error#readme","keywords":["gulp","plugin","error","esm"],"repository":{"type":"git","url":"git+https://github.com/adorade/plugin-error.git"},"description":"Error handling for Gulp plugins with ESM support","maintainers":[{"name":"adorade","email":"office.adorade@gmail.com"}],"readme":"# Plugin Error\n\n[![NPM version](https://img.shields.io/npm/v/@adorade/plugin-error?logo=npm)](https://www.npmjs.org/package/@adorade/plugin-error)\n[![GitHub package.json version](https://img.shields.io/github/package-json/v/adorade/plugin-error?color=green&logo=github)](https://github.com/adorade/plugin-error/blob/main/package.json)\n[![license](https://img.shields.io/github/license/adorade/plugin-error)](https://mit-license.org)\n[![Depfu Status](https://img.shields.io/depfu/dependencies/github/adorade/plugin-error)](https://depfu.com/repos/github/adorade/plugin-error)\n[![GitHub Actions](https://github.com/adorade/plugin-error/workflows/Node%20CI/badge.svg)](https://github.com/adorade/plugin-error/actions)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen)](https://renovatebot.com/)\n\n> Error handling for Gulp plugins with ESM support.  \n\nThis package is pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).\n\n## Installation\n\n```bash\nnpm install @adorade/plugin-error --save-dev\n# Or with yarn:\nyarn add @adorade/plugin-error --dev\n```\n\n## Usage\n\n```js\nimport PluginError from '@adorade/plugin-error';\n\nconst err = new PluginError('test', {\n  message: 'something broke',\n});\n\nconst err = new PluginError({\n  plugin: 'test',\n  message: 'something broke',\n});\n\nconst err = new PluginError('test', 'something broke');\n\nconst err = new PluginError('test', 'something broke', {\n    showStack: true,      // false (default) | true\n    showProperties: false // true (default) | false\n});\n\nconst existingError = new Error('OMG');\nconst err = new PluginError('test', existingError, { showStack: true });\n```\n\n## API\n\n`new PluginError(plugin, message[, options])`\n\nError constructor that takes:\n\n- `plugin` - a `String` that should be the module name of your plugin\n- `message` - a `String` message or an existing `Error` object\n- `options` - an `Object` of your options\n\n**Behavior:**\n\n- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.\n- If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.\n- If you pass in a custom stack string you need to include the message along with that.\n- Error properties will be included in `err.toString()`, but may be omitted by including `{ showProperties: false }` in the options.\n\n## License\n\nSee the [MIT LICENSE](LICENSE) file for license rights and limitations.\n","readmeFilename":"README.md"}