{"_id":"hapi-compat","_rev":"2-c2d0f95536afa0ac40e81d74b54e0c13","name":"hapi-compat","description":"hapi plugin which tries to detect, warn and auto-fix Hapi 17 breaking changes","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.1":{"name":"hapi-compat","description":"hapi plugin which tries to detect, warn and auto-fix Hapi 17 breaking changes","version":"1.0.1","license":"MIT","main":"lib/index.js","homepage":"https://github.com/bakjs/hapi-compat","scripts":{"lint":"eslint lib","test":"npm run lint","release":"standard-version && git push --follow-tags && npm publish","prepare":"npm run test"},"publishConfig":{"access":"public"},"contributors":[{"name":"Pooya Parsa","email":"pooya@pi0.ir"}],"files":["lib"],"dependencies":{"caller-id":"^0.1.0","chalk":"^2.2.0","hoek":"^5.0.0","joi":"^13.0.1"},"devDependencies":{"eslint":"^4.8.0","eslint-config-standard":"^10.2.1","eslint-plugin-html":"^3.2.2","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","standard-version":"^4.2.0"},"gitHead":"6d0c2eb2e5379d2bf7e222b333c6ce335d830cc8","_id":"hapi-compat@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"dist":{"integrity":"sha512-99+dqfteVz2XftB6Tt6jLJPEVMO4QnfPAzbKBo3KWqKX5HZWf/8CinrHXxYPaGLI11GYawZAslK/GhGFG3rIqQ==","shasum":"bf9901b64079b4d2661c2553545a6d9cb1ebb688","tarball":"https://registry.npmjs.org/hapi-compat/-/hapi-compat-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKmnANInjiZ8fjUc+K3Q0OH1fZEQXvBU8X7i71lzxgGwIhALLInNN8cKntPFKWirdm8p9+YIyPAKgIdvJK7ijZ+Yo0"}]},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hapi-compat-1.0.1.tgz_1508542518911_0.7204141377005726"}},"1.1.0":{"name":"hapi-compat","description":"hapi plugin which tries to detect, warn and auto-fix Hapi 17 breaking changes","version":"1.1.0","license":"MIT","main":"lib/index.js","homepage":"https://github.com/bakjs/hapi-compat","scripts":{"lint":"eslint lib","test":"npm run lint","release":"standard-version && git push --follow-tags && npm publish","prepare":"npm run test"},"publishConfig":{"access":"public"},"contributors":[{"name":"Pooya Parsa","email":"pooya@pi0.ir"}],"files":["lib"],"dependencies":{"caller-id":"^0.1.0","chalk":"^2.2.0","hoek":"^5.0.0","joi":"^13.0.1"},"devDependencies":{"eslint":"^4.8.0","eslint-config-standard":"^10.2.1","eslint-plugin-html":"^3.2.2","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","standard-version":"^4.2.0"},"gitHead":"8a4a2420c89249908fb60ae68cf51c1b2c3ef01e","_id":"hapi-compat@1.1.0","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"dist":{"integrity":"sha512-B3CQYheQzwZ2tQUZ+Qo73GJrKMsKFpLxYwNBJEMwSIv/sbjPaRLXkO5Mp3zhGN1aSXccDGWHchN44QD1KUn5lQ==","shasum":"e90ce5e9e0b8b2a8585e24242f625fe8581a1e5f","tarball":"https://registry.npmjs.org/hapi-compat/-/hapi-compat-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICwJPcV4wcp71b2ErE5AHuOk+zInOIDNMYdHgM4SyS9PAiBeQ4fAl/U0YPawlm+TRChj7UInxZM9En/BoUqNx74VEw=="}]},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hapi-compat-1.1.0.tgz_1508543496978_0.22760716266930103"}}},"readme":"# hapi-compat\n\n<p>\n<a href=\"https://github.com/bakjs/bak\">\n    <img alt=\"\" src=\"https://david-dm.org/bakjs/hapi-compat.svg?style=flat-square\">\n</a>\n<a href=\"https://www.npmjs.com/package/hapi-compat\">\n    <img alt=\"\" src=\"https://img.shields.io/npm/dt/hapi-compat.svg?style=flat-square\">\n</a>\n<a href=\"https://www.npmjs.com/package/hapi-compat\">\n    <img alt=\"\" src=\"https://img.shields.io/npm/v/hapi-compat.svg?style=flat-square\">\n</a>\n<br>\n<a href=\"https://github.com/bakjs/hapi-compat\">\n    <img alt=\"\" src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\">\n</a>\n<a href=\"https://circleci.com/gh/bakjs/hapi-compat\">\n    <img alt=\"\" src=\"https://img.shields.io/circleci/project/github/bakjs/hapi-compat.svg?style=flat-square\">\n</a>\n<!-- <a href=\"https://codecov.io/gh/bakjs/hapi-compat\">\n    <img alt=\"\" src=\"https://img.shields.io/codecov/c/github/bakjs/hapi-compat.svg?style=flat-square\">\n</a> -->\n<a href=\"https://hapijs.com/\">\n    <img alt=\"\" src=\"https://img.shields.io/badge/hapi.js-17.x-yellow.svg?style=flat-square\">\n</a>\n<br>\n</p>\n\nThis plugin tries to detect, warn and auto-fix Hapi 17 breaking changes which are not fixed in plugins with a best effort.\n\nHooks are recursive so if a plugin requires incompatible plugins, hapi-compat plugin will support them too.\n\n## What's supported?\n\nID                | Auto Fix    | Perf Impact  | Description\n------------------|-------------|--------------|--------------------------------------------------------------------\nASYNC_PLUGINS     | YES         | I            | plugins with next callback should return a Promise now\nSERVER_REGISTER   | YES         | -            | `server.register({ register })` should be `{ plugin }`\nPLUGIN_ATTRS      | YES         | -            | `register.attributes` ~> `{register, pkg}`\nSERVER_ON         | YES         | I* + R*      | `server.on` ~> `server.events.on`\nASYNC_SERVER_EXT  | YES         | I            | Support for server.ext where the method expects having `next` callback\n\n- Perf Impact indicates if this support impacts performance of framework (I)init or (R)untime.\n- `*` means only impacts perf when old code detected not newer plugins\n\nFor more details please look at breaking changes list [here](https://github.com/hapijs/hapi/milestone/221?closed=1)\n\n## Setup\n\nInstall package:\n\n```bash\nnpm install hapi-compat\n\n# or using yarn...\n\nyarn add hapi-compat\n```\n\nAdd plugin and push main Hapi instance as `options.server` to allow globally registering hooks:\n\n```js\n// ...\nconst server = new Hapi.Server(....)\n\n// ...\nserver.register({\n    plugin: 'hapi-compat',\n    options: {\n        server\n    }\n})\n```\n\n## Questions\n\n+ Does this plugin magically fixes everything for migration?\n\n  Absolutely no. This is just a helper utility for making migration easier and faster.\n\n# License \n\nCopyright (c) 2016-2017 Fandogh - Pooya Parsa\n\nReleased under The MIT [LICENSE](./LICENSE)","maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"time":{"modified":"2022-05-04T16:50:06.296Z","created":"2017-10-20T23:35:19.794Z","1.0.1":"2017-10-20T23:35:19.794Z","1.1.0":"2017-10-20T23:51:37.883Z"},"homepage":"https://github.com/bakjs/hapi-compat","contributors":[{"name":"Pooya Parsa","email":"pooya@pi0.ir"}],"license":"MIT","readmeFilename":"README.md"}