{"id":16533148,"url":"https://github.com/stefanbuck/peer-version-check","last_synced_at":"2025-10-28T11:31:28.229Z","repository":{"id":57321761,"uuid":"135771257","full_name":"stefanbuck/peer-version-check","owner":"stefanbuck","description":"Check whether every peerDependency is defined as a devDependency","archived":false,"fork":false,"pushed_at":"2018-06-03T19:52:08.000Z","size":57,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T14:51:10.538Z","etag":null,"topics":["checker","cli","cli-app","devdependencies","peerdependencies","semantic","semver","version"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanbuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-01T23:15:43.000Z","updated_at":"2020-01-26T16:17:36.000Z","dependencies_parsed_at":"2022-08-25T21:01:13.192Z","dependency_job_id":null,"html_url":"https://github.com/stefanbuck/peer-version-check","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Fpeer-version-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Fpeer-version-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Fpeer-version-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Fpeer-version-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanbuck","download_url":"https://codeload.github.com/stefanbuck/peer-version-check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238645752,"owners_count":19506906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["checker","cli","cli-app","devdependencies","peerdependencies","semantic","semver","version"],"created_at":"2024-10-11T18:14:12.541Z","updated_at":"2025-10-28T11:31:27.836Z","avatar_url":"https://github.com/stefanbuck.png","language":"JavaScript","readme":"# peer-version-check [![Build Status](https://travis-ci.com/stefanbuck/peer-version-check.svg?branch=master)](https://travis-ci.com/stefanbuck/peer-version-check)\n\n\u003e Check whether every peerDependency is defined as a devDependency\n\nAs we all know, npm 3 changed to not install peerDependencies automatically. peerDependencies are still be useful and used by many package authors these days. \n\nAs a package author it's quite anoying during development that peerDependencies are not installed automacily anymore. There is an open feature request in the yarn repostiroy to [allow install peerDependencies during development](https://github.com/yarnpkg/yarn/issues/1503).\n\nRecently one of my colleague suggested me to add them as devDependencies. Obviously duplicating is not the best solution, but it works. However there is a risk that they can get out of sync easily. To solve this issue, I wrote this CLI which checks if every peerDependency is defined as a devDependency with the same semver range.\n\n## Install\n\n```\n$ npm install peer-version-check\n```\n\n\n## Usage\n\n### On travis-ci\n\n```\nbefore_script:\n  npx peer-version-check\n```\n\n### Command line\n\n```\n$ peer-version-check \u003cpath-to-package.json\u003e (optional)\n```\n\n\n## \tExample\n```\n$ peer-version-check ./package.json\n\nExpected devDependency 'lodash' to be:\n    ^4.0.0\nFound:\n    ^3.0.0\n```\n\nExits with code 0 if every peerDependency is defined as a devDependency with the same semver range. If not exits with code 1 and an error message. \n\n\n## Related\n\n[Common npm mistakes](https://medium.com/@jacob.h.page/common-npm-mistakes-51bf8989079f) - Excellent article to read\n\n\n## License\n\nMIT © [Stefan Buck](http://stefanbuck.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbuck%2Fpeer-version-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanbuck%2Fpeer-version-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbuck%2Fpeer-version-check/lists"}