{"name":"please-upgrade-node","version":"3.2.0","description":"Displays a beginner-friendly message telling your user to upgrade their version of Node","main":"index.js","scripts":{"test":"node test","lint":"eslint .","fix":"npm run lint -- --fix","prepublishOnly":"npm test && npm run lint && pkg-ok"},"repository":{"type":"git","url":"git+https://github.com/typicode/please-upgrade-node.git"},"keywords":["node","engines","version","check","verify","upgrade"],"author":{"name":"typicode"},"license":"MIT","bugs":{"url":"https://github.com/typicode/please-upgrade-node/issues"},"homepage":"https://github.com/typicode/please-upgrade-node#readme","devDependencies":{"eslint":"^4.19.1","eslint-plugin-prettier":"^2.6.0","husky":"^1.0.0-rc.12","pkg-ok":"^1.1.0","prettier":"1.12.1","tape":"^4.9.1"},"dependencies":{"semver-compare":"^1.0.0"},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"gitHead":"cf4e00d3adced6cbc08411cabba7d35b180eea6f","_id":"please-upgrade-node@3.2.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==","shasum":"aeddd3f994c933e4ad98b99d9a556efa0e2fe942","tarball":"http://registry-npm.ywwl.com/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz","fileCount":7,"unpackedSize":5539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTBBfCRA9TVsSAnZWagAA6IUQAKAkzJgP58OmQxJucMlY\ngciWxgN3ShsoSHdIqn5h1kcxt+gbuvOkRBG6iOVQ0uXt5E2OCPnLyraNLAMm\n7jUpG1xQvnIa0ghIUsBwuEk41ba8Vvvyc9zt26ClcK1posAEZuHcjaCGTlRZ\ny+qkZD0RPVTS/oJl5t29sYOi1FpYcbxZ4cm5vMKB532CGPVqIrVFA8Sy/vcM\nY5+SGl61nQQ79W2ibRcqso9zMhXa+FjMFbC92Vy6SG1cyhzkGPtNWWvASFeQ\nmLLuuy3om3Z4xJlyipbrNLKiA/jqKbojEAnK8kiGzpXgerS4d7buVM12orj4\nAasPktoAxfyfMKlJqiYKsjJzmU+F+l5JTWo+hVPfTMJY34aK/Bs1TNHJKsYb\nuETyINDWF8MPuUGeOXOUsnycZZwC2KT8AuB1edFrYniWFRvXAbDnmV+WIN/J\nbaG6YtoQhgBSasZkvJ1PtE4JcZCc80IkaUxRwEDhF0D0FiWttquDI7gUjp+o\nRN52Bl3olk4dQoQTQa9JxqJib1mcGImtFH9ef3kfXJcVbYgHraJIE0dI7TU3\n3ka0emCsxCSna4rxwg4VUCuvjH5MwRXqWuJ/BOrq7l2GN89Vzj2Q0ugz8tDL\n1CXJcrcRVCs5sA5eisOxwz8+FyDqmedpoBypaAVTAApWWIgxMeRpeO/8KVb3\nDSOr\r\n=YsBO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB2pW1rfIvt0jvGyZUdgw05hTpVLIwz6ljAnchJzHCM4AiB4obF2A3yF+DKLs7o72DWtqR1aBeJiAvF33ZxenI7NVQ=="}],"size":2800,"noattachment":false,"key":"/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/please-upgrade-node_3.2.0_1565266014834_0.39415581326854676"},"_hasShrinkwrap":false,"readme":"# Please upgrade Node [![](http://img.shields.io/npm/dm/please-upgrade-node.svg?style=flat)](https://www.npmjs.org/package/please-upgrade-node) [![Build Status](https://travis-ci.org/typicode/please-upgrade-node.svg?branch=master)](https://travis-ci.org/typicode/please-upgrade-node) [![npm](https://img.shields.io/npm/v/please-upgrade-node.svg)](https://www.npmjs.com/package/please-upgrade-node)\n\n> :information_desk_person: show a message to your users to upgrade Node instead of a stacktrace \n\nIt's common for new Node users to miss or not understand engines warning when installing a CLI. This package displays a beginner-friendly message if their Node version is below the one expected.\n\n```sh\n$ node -v\n0.12\n\n$ modern-cli\nmodern-cli requires at least version 6 of Node, please upgrade\n```\n\n## Support\n\nIf you like this project, you can support me on [GitHub Sponsors](https://github.com/users/typicode/sponsorship)\n\n## Usage\n\n```sh\nnpm install please-upgrade-node\n```\n\nAdd `please-upgrade-node` at the top of your CLI\n\n```js\n#!/usr/bin/env node\nconst pkg = require('./package.json')\nrequire('please-upgrade-node')(pkg) // <- Must run BEFORE requiring any other modules\n\n// ...\n```\n\nSet in your `package.json` the required Node version\n\n```js\n{\n  \"engines\": {\n    \"node\": \">=6\"\n  }\n}\n```\n\n__Important__: `>=` is the only operator supported by `please-upgrade-node` (e.g. `>=6`, `>=6.0`, `>=6.0.0`).\n\n## Options\n\nYou can set custom `exitCode` and `message` function if needed\n\n```js\npleaseUpgradeNode(pkg, {\n  exitCode: 0, // Default: 1\n  message: function(requiredVersion) {\n    return 'Oops this program require Node ' +  requiredVersion\n  }\n})\n```\n\n__Important__: to keep `message` function compatible with older versions of Node, avoid using ES6 features like `=>` or string interpolation.\n\n## See also\n\n* [pkg-ok](https://github.com/typicode/pkg-ok) - :ok_hand: Prevents publishing a module with bad paths\n* [husky](https://github.com/typicode/husky) - :dog: Git hooks made easy\n* [update-notifier](https://github.com/yeoman/update-notifier) - Update notifications for your CLI app \n\nThanks to [zeit/serve](https://github.com/zeit/serve) for the error message inspiration.\n\n## License\n\nMIT - [Typicode :cactus:](https://github.com/typicode) - [Patreon](https://patreon.com/typicode)\n","publish_time":1565266014978,"_cnpm_publish_time":1565266014978,"dist-tags":{"latest":"3.2.0"}}