{
  "_args": [
    [
      {
        "raw": "update-notifier@2.5.0",
        "scope": null,
        "escapedName": "update-notifier",
        "name": "update-notifier",
        "rawSpec": "2.5.0",
        "spec": "2.5.0",
        "type": "version"
      },
      "/home/zkochan/src/pnpm/packages/pnpm"
    ]
  ],
  "_from": "update-notifier@2.5.0",
  "_id": "update-notifier@2.5.0",
  "_inCache": true,
  "_location": "/update-notifier",
  "_nodeVersion": "9.11.1",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/update-notifier_2.5.0_1523694723540_0.7739814020274551"
  },
  "_npmUser": {
    "name": "sboudrias",
    "email": "admin@simonboudrias.com"
  },
  "_npmVersion": "5.6.0",
  "_phantomChildren": {},
  "_requested": {
    "raw": "update-notifier@2.5.0",
    "scope": null,
    "escapedName": "update-notifier",
    "name": "update-notifier",
    "rawSpec": "2.5.0",
    "spec": "2.5.0",
    "type": "version"
  },
  "_requiredBy": [
    "/",
    "/@zkochan/libnpx"
  ],
  "_resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz",
  "_shasum": "d0744593e13f161e406acb1d9408b72cad08aff6",
  "_shrinkwrap": null,
  "_spec": "update-notifier@2.5.0",
  "_where": "/home/zkochan/src/pnpm/packages/pnpm",
  "author": {
    "name": "Sindre Sorhus",
    "email": "sindresorhus@gmail.com",
    "url": "https://sindresorhus.com"
  },
  "bugs": {
    "url": "https://github.com/yeoman/update-notifier/issues"
  },
  "dependencies": {
    "boxen": "^1.2.1",
    "chalk": "^2.0.1",
    "configstore": "^3.0.0",
    "import-lazy": "^2.1.0",
    "is-ci": "^1.0.10",
    "is-installed-globally": "^0.1.0",
    "is-npm": "^1.0.0",
    "latest-version": "^3.0.0",
    "semver-diff": "^2.0.0",
    "xdg-basedir": "^3.0.0"
  },
  "description": "Update notifications for your CLI app",
  "devDependencies": {
    "ava": "*",
    "clear-module": "^2.1.0",
    "fixture-stdout": "^0.2.1",
    "mock-require": "^2.0.2",
    "strip-ansi": "^4.0.0",
    "xo": "^0.18.2"
  },
  "directories": {},
  "dist": {
    "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==",
    "shasum": "d0744593e13f161e406acb1d9408b72cad08aff6",
    "tarball": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz",
    "fileCount": 5,
    "unpackedSize": 13492,
    "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa0byECRA9TVsSAnZWagAAwcAQAIKWpqzQYQrLjHKrF90G\n8BJ4WladdcNdmRzle0UzqJ2/ldYl6gk6WnsG/l4wAA4xkr8Hwfb3GBLxEwq+\nLDatcRBI+voVHNJPJhBHqEPO6TUPCGrg6+p2/A6AhZ9s8nfDjTd7rzpFeXDD\nuUyC40FTxfLUSEPW70kCmADzD1PilhCQ35Qimt+Zx+hge/Ejj97+8+Lumm6w\ni+rjvgR2UaLeF5U14NLj+DPV48SkWU5iaVPk6FsTo0u6E41By9o+qcVXaJDX\nsOzMDKRW/CPCGLEi+fRpmaIHtVJDfaW5LMc6Y8v8OU2A95z08eC0FpNbRi/z\nvfiDHAhZXGYRnbvg2HscM4UxXYyGWsTVlOh7Mce9wm8k6mIZlJTAhR2baVSq\nMLLj+1R2bBe9IRSKdH3jvGvtpPMqQnoVM4ZCtHfSkBd+ySiNIP+8uBW3bmkN\nDVPtHdP9/SnQJ3J0uXbM9PA9h5D+8qT9RP54GQvTNBLwurAnqmguYv8J+Vkp\nwOQ+QjNNacneD41ez4n4xIXkC2eaSvGtAMa+E77hFywiFlj4njYRXBt+bzbe\nym02+UdHOgPRQ3DpLQWbObjLp8bgk24Ss1h/+Dl/nXRlfrr2srLVrOnygvaC\nDQWCYILkMghDJ0nBjWG+ROKpaArLDfqZA4SWrB9oCXK+EUnpdUHeHgGIy0iZ\nP9WU\r\n=3rA1\r\n-----END PGP SIGNATURE-----\r\n"
  },
  "engines": {
    "node": ">=4"
  },
  "files": [
    "index.js",
    "check.js"
  ],
  "gitHead": "5cd65771e2fab2567592ae217d3ce647679462af",
  "homepage": "https://github.com/yeoman/update-notifier#readme",
  "keywords": [
    "npm",
    "update",
    "updater",
    "notify",
    "notifier",
    "check",
    "checker",
    "cli",
    "module",
    "package",
    "version"
  ],
  "license": "BSD-2-Clause",
  "maintainers": [
    {
      "name": "addyosmani",
      "email": "addyosmani@gmail.com"
    },
    {
      "name": "arthurvr",
      "email": "contact@arthurverschaeve.be"
    },
    {
      "name": "eddiemonge",
      "email": "eddie+npm@eddiemonge.com"
    },
    {
      "name": "hemanth",
      "email": "hemanth.hm@gmail.com"
    },
    {
      "name": "mischah",
      "email": "mail@michael-kuehnel.de"
    },
    {
      "name": "passy",
      "email": "phartig@rdrei.net"
    },
    {
      "name": "sboudrias",
      "email": "admin@simonboudrias.com"
    },
    {
      "name": "sindresorhus",
      "email": "sindresorhus@gmail.com"
    },
    {
      "name": "zckrs",
      "email": "mdara@eleven-labs.com"
    }
  ],
  "name": "update-notifier",
  "optionalDependencies": {},
  "readme": "# update-notifier [![Build Status](https://travis-ci.org/yeoman/update-notifier.svg?branch=master)](https://travis-ci.org/yeoman/update-notifier)\n\n> Update notifications for your CLI app\n\n![](screenshot.png)\n\nInform users of your package of updates in a non-intrusive way.\n\n#### Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [How](#how)\n- [API](#api)\n- [About](#about)\n- [Users](#users)\n\n\n## Install\n\n```\n$ npm install update-notifier\n```\n\n\n## Usage\n\n### Simple\n\n```js\nconst updateNotifier = require('update-notifier');\nconst pkg = require('./package.json');\n\nupdateNotifier({pkg}).notify();\n```\n\n### Comprehensive\n\n```js\nconst updateNotifier = require('update-notifier');\nconst pkg = require('./package.json');\n\n// Checks for available update and returns an instance\nconst notifier = updateNotifier({pkg});\n\n// Notify using the built-in convenience method\nnotifier.notify();\n\n// `notifier.update` contains some useful info about the update\nconsole.log(notifier.update);\n/*\n{\n\tlatest: '1.0.1',\n\tcurrent: '1.0.0',\n\ttype: 'patch', // Possible values: latest, major, minor, patch, prerelease, build\n\tname: 'pageres'\n}\n*/\n```\n\n### Options and custom message\n\n```js\nconst notifier = updateNotifier({\n\tpkg,\n\tupdateCheckInterval: 1000 * 60 * 60 * 24 * 7 // 1 week\n});\n\nif (notifier.update) {\n\tconsole.log(`Update available: ${notifier.update.latest}`);\n}\n```\n\n\n## How\n\nWhenever you initiate the update notifier and it's not within the interval threshold, it will asynchronously check with npm in the background for available updates, then persist the result. The next time the notifier is initiated, the result will be loaded into the `.update` property. This prevents any impact on your package startup performance.\nThe update check is done in a unref'ed [child process](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). This means that if you call `process.exit`, the check will still be performed in its own process.\n\nThe first time the user runs your app, it will check for an update, and even if an update is available, it will wait the specified `updateCheckInterval` before notifying the user. This is done to not be annoying to the user, but might surprise you as an implementer if you're testing whether it works. Check out [`example.js`](example.js) to quickly test out `update-notifier` and see how you can test that it works in your app.\n\n\n## API\n\n### notifier = updateNotifier(options)\n\nChecks if there is an available update. Accepts options defined below. Returns an instance with an `.update` property there is an available update, otherwise `undefined`.\n\n### options\n\n#### pkg\n\nType: `Object`\n\n##### name\n\n*Required*<br>\nType: `string`\n\n##### version\n\n*Required*<br>\nType: `string`\n\n#### updateCheckInterval\n\nType: `number`<br>\nDefault: `1000 * 60 * 60 * 24` *(1 day)*\n\nHow often to check for updates.\n\n#### callback(error, update)\n\nType: `Function`\n\nPassing a callback here will make it check for an update directly and report right away. Not recommended as you won't get the benefits explained in [`How`](#how). `update` is equal to `notifier.update`.\n\n### notifier.notify([options])\n\nConvenience method to display a notification message. *(See screenshot)*\n\nOnly notifies if there is an update and the process is [TTY](https://nodejs.org/api/process.html#process_tty_terminals_and_process_stdout).\n\n#### options\n\nType: `Object`\n\n##### defer\n\nType: `boolean`<br>\nDefault: `true`\n\nDefer showing the notification to after the process has exited.\n\n##### message\n\nType: `string`<br>\nDefault: [See above screenshot](https://github.com/yeoman/update-notifier#update-notifier-)\n\nMessage that will be shown when an update is available.\n\n##### isGlobal\n\nType: `boolean`<br>\nDefault: `true`\n\nInclude the `-g` argument in the default message's `npm i` recommendation. You may want to change this if your CLI package can be installed as a dependency of another project, and don't want to recommend a global installation. This option is ignored if you supply your own `message` (see above).\n\n##### boxenOpts\n\nType: `Object`<br>\nDefault: `{padding: 1, margin: 1, align: 'center', borderColor: 'yellow', borderStyle: 'round'}` *(See screenshot)*\n\nOptions object that will be passed to [`boxen`](https://github.com/sindresorhus/boxen).\n\n##### shouldNotifyInNpmScript\n\nType: `boolean`<br>\nDefault: `false`\n\nAllows notification to be shown when running as an npm script.\n\n### User settings\n\nUsers of your module have the ability to opt-out of the update notifier by changing the `optOut` property to `true` in `~/.config/configstore/update-notifier-[your-module-name].json`. The path is available in `notifier.config.path`.\n\nUsers can also opt-out by [setting the environment variable](https://github.com/sindresorhus/guides/blob/master/set-environment-variables.md) `NO_UPDATE_NOTIFIER` with any value or by using the `--no-update-notifier` flag on a per run basis.\n\nThe check is also skipped on CI automatically.\n\n\n## About\n\nThe idea for this module came from the desire to apply the browser update strategy to CLI tools, where everyone is always on the latest version. We first tried automatic updating, which we discovered wasn't popular. This is the second iteration of that idea, but limited to just update notifications.\n\n\n## Users\n\nThere are a bunch projects using it:\n\n- [npm](https://github.com/npm/npm) - Package manager for JavaScript\n- [Yeoman](http://yeoman.io) - Modern workflows for modern webapps\n- [AVA](https://ava.li) - Simple concurrent test runner\n- [XO](https://github.com/xojs/xo) - JavaScript happiness style linter\n- [Pageres](https://github.com/sindresorhus/pageres) - Capture website screenshots\n- [Node GH](http://nodegh.io) - GitHub command line tool\n\n[And 1600+ more…](https://www.npmjs.org/browse/depended/update-notifier)\n\n\n## License\n\nBSD-2-Clause © Google\n",
  "readmeFilename": "readme.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/yeoman/update-notifier.git"
  },
  "scripts": {
    "test": "xo && ava --timeout=20s"
  },
  "version": "2.5.0"
}
