How to test an npm module with peerDependencies?
In my case, I developed a library last time that use ioredis
as peer dependency. My solution was to put that library as well in dev dependency.
// package.json
"peerDependencies": {
"ioredis": "4.x"
},
"devDependencies": {
"ioredis": "4.x"
}
it worked well and no issue so far using this approach.
I had connected with the authors of npm-install-peers, and the response from one of the authors,
When it comes to testing your package/project on CI, I believe the correct way to do things is manually adding your peer dependencies to your dev dependencies. No need for this little tool.