UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

126 lines (125 loc) 5.58 kB
{ "_args": [ [ { "raw": "package-json@^4.0.0", "scope": null, "escapedName": "package-json", "name": "package-json", "rawSpec": "^4.0.0", "spec": ">=4.0.0 <5.0.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/latest-version" ] ], "_from": "package-json@>=4.0.0 <5.0.0", "_id": "package-json@4.0.1", "_inCache": true, "_location": "/package-json", "_nodeVersion": "4.7.3", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/package-json-4.0.1.tgz_1492413595681_0.06575552024878561" }, "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "_npmVersion": "2.15.11", "_phantomChildren": { "create-error-class": "3.0.2", "duplexer3": "0.1.4", "is-redirect": "1.0.0", "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", "lowercase-keys": "1.0.1", "safe-buffer": "5.1.2", "timed-out": "4.0.1", "unzip-response": "2.0.1" }, "_requested": { "raw": "package-json@^4.0.0", "scope": null, "escapedName": "package-json", "name": "package-json", "rawSpec": "^4.0.0", "spec": ">=4.0.0 <5.0.0", "type": "range" }, "_requiredBy": [ "/latest-version" ], "_resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", "_shasum": "8869a0401253661c4c4ca3da6c2121ed555f5eed", "_shrinkwrap": null, "_spec": "package-json@^4.0.0", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/latest-version", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/package-json/issues" }, "dependencies": { "got": "^6.7.1", "registry-auth-token": "^3.0.1", "registry-url": "^3.0.3", "semver": "^5.1.0" }, "description": "Get metadata of a package from the npm registry", "devDependencies": { "ava": "*", "mock-private-registry": "^1.1.0", "xo": "*" }, "directories": {}, "dist": { "shasum": "8869a0401253661c4c4ca3da6c2121ed555f5eed", "tarball": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz" }, "engines": { "node": ">=4" }, "files": [ "index.js" ], "gitHead": "2312d0437c16d7117d354ae76f640c5ac25fe0e0", "homepage": "https://github.com/sindresorhus/package-json#readme", "keywords": [ "npm", "registry", "package", "pkg", "package.json", "json", "module", "scope", "scoped" ], "license": "MIT", "maintainers": [ { "name": "rexxars", "email": "rexxars@gmail.com" }, { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "name": "package-json", "optionalDependencies": {}, "readme": "# package-json [![Build Status](https://travis-ci.org/sindresorhus/package-json.svg?branch=master)](https://travis-ci.org/sindresorhus/package-json)\n\n> Get metadata of a package from the npm registry\n\n\n## Install\n\n```\n$ npm install --save package-json\n```\n\n\n## Usage\n\n```js\nconst packageJson = require('package-json');\n\npackageJson('ava').then(json => {\n\tconsole.log(json);\n\t//=> {name: 'ava', ...}\n});\n\n// Also works with scoped packages\npackageJson('@sindresorhus/df').then(json => {\n\tconsole.log(json);\n\t//=> {name: '@sindresorhus/df', ...}\n});\n```\n\n\n## API\n\n### packageJson(name, [options])\n\n#### name\n\nType: `string`\n\nName of the package.\n\n#### options\n\nType: `Object`\n\n##### version\n\nType: `string`<br>\nDefault: `latest`\n\nPackage version such as `1.0.0` or a [dist tag](https://docs.npmjs.com/cli/dist-tag) such as `latest`.\n\nThe version can also be in any format supported by the [semver](https://github.com/npm/node-semver) module. For example:\n\n- `1` - get the latest `1.x.x`\n- `1.2` - get the latest `1.2.x`\n- `^1.2.3` - get the latest `1.x.x` but at least `1.2.3`\n- `~1.2.3` - get the latest `1.2.x` but at least `1.2.3`\n\n##### fullMetadata\n\nType: `boolean`<br>\nDefault: `false`\n\nBy default, only an abbreviated metadata object is returned for performance reasons. [Read more.](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md)\n\n##### allVersions\n\nType: `boolean`<br>\nDefault: `false`\n\nReturn the [main entry](https://registry.npmjs.org/ava) containing all versions.\n\n\n## Authentication\n\nBoth public and private registries are supported, for both scoped and unscoped packages, as long as the registry uses either bearer tokens or basic authentication.\n\n\n## Related\n\n- [package-json-cli](https://github.com/sindresorhus/package-json-cli) - CLI for this module\n- [latest-version](https://github.com/sindresorhus/latest-version) - Get the latest version of an npm package\n- [pkg-versions](https://github.com/sindresorhus/pkg-versions) - Get the version numbers of a package from the npm registry\n- [npm-keyword](https://github.com/sindresorhus/npm-keyword) - Get a list of npm packages with a certain keyword\n- [npm-user](https://github.com/sindresorhus/npm-user) - Get user info of an npm user\n- [npm-email](https://github.com/sindresorhus/npm-email) - Get the email of an npm user\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/package-json.git" }, "scripts": { "test": "xo && ava" }, "version": "4.0.1" }