{"name":"update-check","version":"1.5.0","description":"Minimalistic update notifications for command line interfaces","main":"./index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","lint":"zeit-eslint --ext .jsx,.js .","lint-staged":"git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint"},"repository":{"type":"git","url":"git+https://github.com/zeit/update-check.git"},"keywords":["update","notifications","checker","notifier"],"author":{"name":"leo"},"license":"MIT","devDependencies":{"@zeit/eslint-config-node":"0.2.13","@zeit/git-hooks":"0.1.4","eslint":"4.19.1"},"eslintConfig":{"extends":["@zeit/eslint-config-node"]},"git":{"pre-commit":"lint-staged"},"dependencies":{"registry-auth-token":"3.3.2","registry-url":"3.1.0"},"gitHead":"eee937d6e6af3080a9d3916dcfc587e19e39fb58","bugs":{"url":"https://github.com/zeit/update-check/issues"},"homepage":"https://github.com/zeit/update-check#readme","_id":"update-check@1.5.0","_npmVersion":"5.6.0","_nodeVersion":"10.1.0","_npmUser":{"name":"leo","email":"leo@zeit.co"},"dist":{"integrity":"sha512-bSzhZ5bTcihI+Yab37pDAQc4Nmf/MvO9gwKoF+Sn5XMr2twBZG4Ri4iuSK7rpe+j8UmA9N2GUzyJtySEYjaf7w==","shasum":"9faf2d4ff3c50bcf058df61cebf690c8b484e7bc","tarball":"http://registry-npm.ywwl.com/update-check/download/update-check-1.5.0.tgz","fileCount":6,"unpackedSize":9165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+eDxCRA9TVsSAnZWagAAg8MP/10zPHgLC6gi7nhp0GH7\n5x1pFyQG4U7xZYGkYmXjtRrj5yPR+EKzW2B7OCz3Q+JBIP1HCud0zK+b5uwl\nkU+JbjY8+4cEgokrRWe+GtCBePFvr8TiT57f/vn+anyk9DhxQqAV/bP4abQ7\nlkQFadkv11E7UQxS/yTp/Ij5/z6ZYAjt5Lf6bygGqL+2LghqQ52V3Ol9s1pM\nCoXGM2pAMisrLVNqCcbJ6QZjU48zpmOQ237smfpkkRozYtv5RwrTjkAz6j5h\nCcKczmuLqemL5Eq51qqE9j1LvbWttgcaNlvjj4C0XHxlqDVpfQJ+IeOJR0Fz\nG6cs/5pW0SAJgb10g/RZNSYHV0ZdNJ8MCKYo6dSbCv8AH69N5nK84skdP9dV\nqr7Yl4wM262YXveYWuIdNXUQTjXCuYpTqp2JC5TPFSFQFXtJ0qXDVng18yed\nTlq1cGet+3k051tuyZlLnMj5pNaJfaj70QOsh9l6jkBrrr8XCLy7tg/cbV5t\nZTbqqMA0NilI1Ww2uz8RH9v/cr1iqMBCzEV0fPZh60m+TrDRrSU+oDaAMW6v\ndSap7bQnrybYZJ1p/joRwe/0SfxhSGgrLGvbOERxRYzbSjYLhBvaGCUPh1y5\nLYz4uAhhOz4ciAV+6jwqrbDPW9zJJ4HCToyUbjAWS69q9jY6jldBu3HsuHN5\njUnN\r\n=xQK8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBUeEoGTYYs2ZYiE2s1GsPqRGMl9HtHpFLjoJK5ksxIBAiEAuk+fnMT7XovRY3YivNzP2ewC5CqRRGbalZ9fA2TPb8w="}],"size":4332,"noattachment":false,"key":"/update-check/-/update-check-1.5.0.tgz"},"maintainers":[{"email":"igor@klopov.com","name":"igorklopov"},{"email":"jamo@isotalo.fi","name":"jamo"},{"email":"leo@zeit.co","name":"leo"},{"email":"me@matheus.top","name":"matheuss"},{"email":"naoyuki.kanezawa@gmail.com","name":"nkzawa"},{"email":"rauchg@gmail.com","name":"rauchg"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/update-check_1.5.0_1526325488858_0.0014307740197918584"},"_hasShrinkwrap":false,"readme":"# update-check \n\n[![npm version](https://img.shields.io/npm/v/update-check.svg)](https://www.npmjs.com/package/update-check)\n[![install size](https://packagephobia.now.sh/badge?p=update-check)](https://packagephobia.now.sh/result?p=update-check)\n\nThis is a very minimal approach to update checking for [globally installed](https://docs.npmjs.com/getting-started/installing-npm-packages-globally) packages.\n\nBecause it's so simple, the error surface is very tiny and your user's are guaranteed to receive the update message if there's a new version.\n\nYou can read more about the reasoning behind this project [here](https://twitter.com/notquiteleo/status/983193273224200192).\n\n## Usage\n\nFirstly, install the package with [yarn](https://yarnpkg.com/en/)...\n\n```bash\nyarn add update-check\n```\n\n...or [npm](https://www.npmjs.com/):\n\n```bash\nnpm install update-check\n```\n\nNext, initialize it.\n\nIf there's a new update available, the package will return the content of latest version's `package.json` file:\n\n```js\nconst pkg = require('./package');\nconst checkForUpdate = require('update-check');\n\nlet update = null;\n\ntry {\n\tupdate = await checkForUpdate(pkg);\n} catch (err) {\n\tconsole.error(`Failed to check for updates: ${err}`);\n}\n\nif (update) {\n\tconsole.log(`The latest version is ${update.latest}. Please update!`);\n}\n```\n\nThat's it! You're done.\n\n### Configuration\n\nIf you want, you can also pass options to customize the package's behavior:\n\n```js\nconst pkg = require('./package');\nconst checkForUpdate = require('update-check');\n\nlet update = null;\n\ntry {\n\tupdate = await checkForUpdate(pkg, {\n\t\tinterval: 3600000,  // For how long to cache latest version (default: 1 day)\n\t\tdistTag: 'canary'   // A npm distribution tag for comparision (default: 'latest')\n\t});\n} catch (err) {\n\tconsole.error(`Failed to check for updates: ${err}`);\n}\n\nif (update) {\n\tconsole.log(`The latest version is ${update.latest}. Please update!`);\n}\n```\n\n## Contributing\n\n1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device\n2. Link the package to the global module directory: `npm link`\n3. Within the module you want to test your local development instance of the package, just link it: `npm link update-check`. Instead of the default one from npm, node will now use your clone.\n\n## Author\n\nLeo Lamprecht ([@notquiteleo](https://twitter.com/notquiteleo)) - [ZEIT](https://zeit.co)\n\n","publish_time":1526325488987,"_cnpm_publish_time":1526325488987,"dist-tags":{"latest":"1.5.4"}}