{"name":"install-peerdeps","version":"3.0.6","keywords":["install","peerdeps","automatically","yarn","npm","airbnb","eslint"],"author":{"name":"nathanhleung"},"license":"MIT","_id":"install-peerdeps@3.0.6","maintainers":[{"name":"nathanhleung","email":"npmjs.com@nathanhleung.com"}],"homepage":"https://github.com/nathanhleung/install-peerdeps#readme","bugs":{"url":"https://github.com/nathanhleung/install-peerdeps/issues"},"bin":{"install-peerdeps":"lib/cli.js"},"dist":{"shasum":"6833016db90bf66bd4a6f85e3ba0e586dc645370","tarball":"http://registry-npm.ywwl.com/install-peerdeps/download/install-peerdeps-3.0.6.tgz","fileCount":44,"integrity":"sha512-zSn5197AhU62SP2884cI1WOkQGJP1Y5i97BTn+sh1U9pHL3E4N86MBh7ZMjqueTYoBVo7sdoRpsTzQze9stCZA==","signatures":[{"sig":"MEQCIHNos39nd4+m/ao4excJkhQr8MQtA6M7xpheaFYueer4AiAk6mp1ESq/aLBUaer+n6t9fl0ohK3bybM14hiKaUSLjA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119090,"size":19514,"noattachment":false,"key":"/install-peerdeps/-/install-peerdeps-3.0.6.tgz"},"main":"lib/cli.js","engines":{"node":">=8.0"},"gitHead":"ba8072fc781beb432898f165d27998623261f815","scripts":{"lint":"eslint src/ --fix","tape":"tape --require=@babel/polyfill","test":"npm run tests-only","build":"babel src --out-dir lib --ignore *.test.js","clean":"rimraf lib","prepare":"npm run build","pretest":"npm run lint","prebuild":"npm run clean","build:test":"babel src --out-dir test","tests-only":"npm run tape test/*.test.js | tap-spec","prebuild:test":"rimraf test","pretests-only":"npm run build:test"},"_npmUser":{"name":"nathanhleung","email":"npmjs.com@nathanhleung.com"},"repository":{"url":"git+https://github.com/nathanhleung/install-peerdeps.git","type":"git"},"_npmVersion":"10.9.0","description":"CLI to automatically install peerDeps","directories":{},"_nodeVersion":"22.12.0","dependencies":{"semver":"^6.3.0","promptly":"^3.0.3","cli-color":"^2.0.0","commander":"^4.0.1","@babel/polyfill":"^7.7.0"},"preferGlobal":true,"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.11.0","eslint":"^6.7.2","rimraf":"^3.0.0","prettier":"^1.19.1","tap-spec":"^5.0.0","@babel/cli":"^7.7.4","@babel/core":"^7.7.4","@babel/register":"^7.7.4","@babel/preset-env":"^7.7.4","eslint-plugin-react":"^7.17.0","eslint-plugin-import":"^2.18.2","eslint-config-prettier":"^6.7.0","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.1.1","eslint-config-airbnb-base":"^14.2.1"},"_npmOperationalInternal":{"tmp":"tmp/install-peerdeps_3.0.6_1742776056131_0.17085107002348487","host":"s3://npm-registry-packages-npm-production"},"readme":"# install-peerdeps\n\n> As seen on the README of [Airbnb's ESLint config](https://www.npmjs.com/package/eslint-config-airbnb)!\n\n> _Disclaimer: Airbnb is not affiliated with, and does not endorse, this CLI tool_\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/nathanhleung/install-peerdeps/node.yml) ![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/nathanhleung/install-peerdeps)\n\n[![npm total downloads](https://img.shields.io/npm/dt/install-peerdeps.svg)](https://www.npmjs.com/package/install-peerdeps) [![npm monthly downloads](https://img.shields.io/npm/dm/install-peerdeps.svg)](https://www.npmjs.com/package/install-peerdeps) ![GitHub stars](https://img.shields.io/github/stars/nathanhleung/install-peerdeps?style=social)\n\n[![Node version](https://img.shields.io/node/v/install-peerdeps.svg)](https://github.com/nathanhleung/install-peerdeps) [![npm version](https://badge.fury.io/js/install-peerdeps.svg)](https://www.npmjs.com/package/install-peerdeps)\n[![GitHub license](https://img.shields.io/github/license/nathanhleung/install-peerdeps.svg)](https://github.com/nathanhleung/install-peerdeps/blob/master/LICENSE)\n\n💻 Quickly install an npm package and its peer dependencies automatically, using npm, Yarn, or pnpm. \n\nStarting with npm v3.0, peer dependencies are not automatically installed on `npm install`, and it can be a hassle to install them all manually. The `install-peerdeps` tool makes the process fast and easy.\n\nAlso works with [Yarn](https://yarnpkg.com/) (with the `--yarn` flag) and [pnpm](https://pnpm.io/) (with the `--pnpm` flag).\n\n## Quick Start\n\n```\ncd my-project-directory\n\nnpx install-peerdeps <package>[@<version>]\n\n# If you're using yarn\nyarn dlx install-peerdeps --yarn <package>[@<version>]\n\n# If you're using pnpm\npnpm dlx install-peerdeps --pnpm <package>[@<version>]\n```\n\nThe specified package along with its peer dependencies will be installed.\n\n## Why\n\nIt's true that on Linux you can run something like this to automatically install peerDeps (taken from [Airbnb's eslint config repo](https://github.com/airbnb/javascript)):\n\n```\n(\n  export PKG=eslint-config-airbnb;\n  npm info \"$PKG@latest\" peerDependencies --json | command sed 's/[\\{\\},]//g ; s/: /@/g' | xargs npm install --save-dev \"$PKG@latest\"\n)\n```\n\nHowever, the above solution is hard to remember, and doesn't work on Windows. This tool aims to solve both of these problems.\n\n## Usage\n\n```\nUsage: install-peerdeps <package>[@<version>], default version is 'latest'\n\nInstalls the specified package along with correct peerDeps.\n\nOptions:\n  -V, --version                    output the version number\n  -D                               Install the package as a devDependency (alias for `-d`)\n  -d, --dev                        Install the package as a devDependency\n  -g, --global                     Install the package globally\n  -o, --only-peers                 Install only peerDependencies of the package\n  -S, --silent                     If using npm, don't save in package.json\n  -Y, --yarn                       Install with Yarn\n  -P, --pnpm                       Install with pnpm\n  -n, --no-registry                Do not use a remote registry to find dependencies list\n  --dry-run                        Do not install packages, but show the install command that will be run\n  -x, --extra-args \"<extra_args>\"  Extra arguments to pass through to the underlying package manager\n  -h, --help                       output usage information\n```\n\n### Extra Arguments\n\nOnly core npm, Yarn, and pnpm arguments relating to package installation are officially provided by `install-peerdeps`. However, if you'd like to pass through additional arguments, you may do so with `--extra-args`. Here's how you'd install a package into a Yarn-workspace-enabled repository:\n\n`install-peerdeps <package> --dev -Y --extra-args \"-W\"`\n\nHere's how you'd use `--extra-args` to pass a custom npm config option (in this case, disabling `strict-ssl` when accessing a custom registry over HTTPS):\n\n`install-peerdeps <package> --extra-args \"--strict-ssl false\"`\n\n## Examples\n\n### Basic Peer Dependency Installation\n\n`eslint-config-airbnb` requires quite a few peer dependencies. Here's what you'd do to install them all:\n\n`install-peerdeps eslint-config-airbnb --dev`\n\n`install-peerdeps` will automatically detect whether you're using Yarn. If you are, it'll prompt you as to whether you want to use Yarn or npm to install the packages.\n\n```\n# If you're using npm\nnpm install eslint-config-airbnb@18.2.1 eslint@^7.2.0 eslint-plugin-import@^2.22.1 eslint-plugin-jsx-a11y@^6.4.1 eslint-plugin-react@^7.21.5 eslint-plugin-react-hooks@^1.7.0 --save-dev\n\n# If you're using yarn\nyarn add eslint-config-airbnb@18.2.1 eslint@^7.2.0 eslint-plugin-import@^2.22.1 eslint-plugin-jsx-a11y@^6.4.1 eslint-plugin-react@^7.21.5 eslint-plugin-react-hooks@^1.7.0 --dev\n```\n\n### Installing a Different Version Tag\n\nIf you'd like to install a different version of a package than the latest (the default), simply specify the version like so:\n\n`install-peerdeps @angular/core@next`\n\nThe tool will automatically install the version corresponding to the tag, as well as its peer dependencies:\n\n```\nInstalling peerdeps for @angular/core@next.\nyarn add @angular/core@11.2.0-next.0 rxjs@^6.5.3 zone.js@^0.11.3 --dev\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/nathanhleung/install-peerdeps/blob/master/CONTRIBUTING.md)\n\n## License\n\n[MIT](https://github.com/nathanhleung/install-peerdeps/blob/master/LICENSE)\n","publish_time":1742776056322,"_cnpm_publish_time":1742776056322,"dist-tags":{"latest":"3.0.7"}}