Description
Hey Michał , thanks for writing this plugin it has been very useful in the current project I am working on.
I hope you would consider adding support for the following issues;
- Is it possible to have support for an option to use a custom node_modules or bower_components folder to check against?
My current use case is that I have two node_modules folder, one for third party public libraries and one for inhouse developed modules which we have packaged as npm modules.
Currently to get that to work I am adding something like this as an override (check-dependencies.js L65):
if (options.customDepsDir) { depsDirName = options.customDepsDir; } else { depsDirName = options.packageManager === 'npm' ? node_modules' : 'bower_components'; }
- If package.json or bower.json has resolutions it is not taken into account. Would it be possible to have an option to take into account resolutions?
For example in the following package.json, check dependencies will throw an error that 2.0.0 is installed and 1.0.0 is required:
{ "dependencies" : { "my-node-module" :" 1.0.0" }, "resolutions" : { "my-node-module" : "2.0.0" } }
To get resolutions taken into account I am adding the following lines (check-dependencies.js L195):
const resolutionsMappings = getDepsMappingsFromScopeList(['resolutions']); const fullDepsMappings = Object.assign({}, depsMappings, optionalDepsMappings, resolutionsMappings);
Maybe an option can be added to allow resolutions to override what is set in dependencies version.
I am able to work on these changes and send you a PR for review if you decide to include these features.
Thanks for your time.