{"name":"update-check","version":"1.5.4","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":"fbba1e84543850bb10cb76a8276c2f2defcb5d13","bugs":{"url":"https://github.com/zeit/update-check/issues"},"homepage":"https://github.com/zeit/update-check#readme","_id":"update-check@1.5.4","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==","shasum":"5b508e259558f1ad7dbc8b4b0457d4c9d28c8743","tarball":"http://registry-npm.ywwl.com/update-check/download/update-check-1.5.4.tgz","fileCount":7,"unpackedSize":10113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelKPzCRA9TVsSAnZWagAAcSYP/0cKrIyZdjm9UGxZrIIS\nZVZ7W+rD7XcGV+3FQyNvSyS5PpaFrZrPw9wAF5hIvRroxT3nGhxXy5mceXYh\n57YmVFU2QWzn90KMEcOmn5GF7rRSf42k15cxgLTWOKZgMTVhx1P+eGJxi0Ld\n8LPTdGmdx2c1OqlVZmT0RaqPsZvDG2Ka19klMHI9r+BY6gB6yn0numa2dskk\nx9hRacNvXQUwjwc4MgvQCEwJJmxiWYkp+wUrjMAZR/V3p+S1WxKzKd9t1rmA\n9QGME9/4TZZ8jOCLAzGV3dhEVJKQCNTg7su6lnTEegfXOaYPVgB8ymM2LqYZ\nImblKtWM4YkPDpILWZ8fuEaz1+WR+WkRQfsu6heuAMA9MeKMhJDMns5KFeVa\n4d7NBZFfldnBnKmpWILdhxc+AkPVdKx6IKLulRxHW2ig6mmdfbJjeyJe9rc5\nkSW+s8WKAZWFTFwtxD8QDm8Xxh/MBMSnza9oD3x1JZw8FwRJsq+AyOlK7rSh\ng0FG9z2uusvMLg9AxxfNvEAsb7AQ5NLR/mx4Y4nQRXJAEQozNEoE4hCFkCAL\nxiqlDix+X3E45JzOojQY8gj3Cp84WZ9nfpoTJ+eJz8ixEIw+gY9NKYIqJxA3\no68v6TklMB9p21IA/xzg7J1pCjTReiK/0NKc6LtPzHMMKm9KwmM2WK1Y1qYN\n1XPq\r\n=V4Dr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDQaSPY/QCxkB8ts2NAdua+f2+F2BKOUOlr4E/8PnMolAiAX6BCo7S7q1hQ19Kb0kB7NmG+GbrSU7Q3tIidjZtEDJw=="}],"size":4615,"noattachment":false,"key":"/update-check/-/update-check-1.5.4.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"}],"_npmUser":{"name":"leo","email":"mindrun@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/update-check_1.5.4_1586799602672_0.9360918603409989"},"_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":1586799602844,"_cnpm_publish_time":1586799602844,"dist-tags":{"latest":"1.5.4"}}