{"name":"install-peerdeps","version":"3.0.7","description":"CLI to automatically install peerDeps","main":"lib/cli.js","scripts":{"tape":"tape --require=@babel/polyfill","pretests-only":"npm run build:test","tests-only":"npm run tape test/*.test.js | tap-spec","lint":"eslint src/ --fix","clean":"rimraf lib","prebuild":"npm run clean","build":"babel src --out-dir lib --ignore *.test.js","prebuild:test":"rimraf test","build:test":"babel src --out-dir test","prepare":"npm run build","pretest":"npm run lint","test":"npm run tests-only"},"preferGlobal":true,"bin":{"install-peerdeps":"lib/cli.js"},"engines":{"node":">=8.0"},"repository":{"url":"git+https://github.com/nathanhleung/install-peerdeps.git","type":"git"},"bugs":{"url":"https://github.com/nathanhleung/install-peerdeps/issues"},"keywords":["install","peerdeps","automatically","yarn","npm","airbnb","eslint"],"author":{"name":"nathanhleung"},"license":"MIT","dependencies":{"@babel/polyfill":"^7.7.0","commander":"^4.0.1","picocolors":"^1.1.1","promptly":"^3.0.3","semver":"^6.3.0"},"devDependencies":{"@babel/cli":"^7.7.4","@babel/core":"^7.7.4","@babel/preset-env":"^7.7.4","@babel/register":"^7.7.4","eslint":"^6.7.2","eslint-config-airbnb-base":"^14.2.1","eslint-config-prettier":"^6.7.0","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.1.1","eslint-plugin-react":"^7.17.0","prettier":"^1.19.1","rimraf":"^3.0.0","tap-spec":"^5.0.0","tape":"^4.11.0"},"_id":"install-peerdeps@3.0.7","gitHead":"b4e371351f2076d2b005869b82b63cc4180cacbb","homepage":"https://github.com/nathanhleung/install-peerdeps#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-MXarcV1DQkjOsppFkSXXWI6E7u+V0GXZzbtZWZkoQACEJnzUi8LYofyc6annnD7NqlbNg6X2kdHmJVLF8amyxg==","shasum":"9955fbf4a1e7c6d8a77f8086a6c75459647940ec","tarball":"http://registry-npm.ywwl.com/install-peerdeps/download/install-peerdeps-3.0.7.tgz","fileCount":47,"unpackedSize":126283,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICniwRfLDadZRQPWA448qW4V9WDeV9es5FgLA4gxSs54AiBmBTQV0H2K+zUyMjsp7gIQZcKdZk5+5gdN54fgkasg7A=="}],"size":20506,"noattachment":false,"key":"/install-peerdeps/-/install-peerdeps-3.0.7.tgz"},"_npmUser":{"name":"nathanhleung","email":"npmjs.com@nathanhleung.com"},"directories":{},"maintainers":[{"name":"nathanhleung","email":"npmjs.com@nathanhleung.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/install-peerdeps_3.0.7_1744571271332_0.6335455208967178"},"_hasShrinkwrap":false,"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":1744571271555,"_cnpm_publish_time":1744571271555,"dist-tags":{"latest":"3.0.7"}}