-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removal of peerDependencies #332
Comments
@tyler-johnson NPM won’t install all those validator modules automatically unless you specify those in dependencies section. It’s just a reference to tell end users which version of those validators that are compatible with samlify. |
Correct, but that is an improper use of peer dependencies. See the NPM reference on peer dependencies. https://nodejs.org/en/blog/npm/peer-dependencies/ Peer dependencies are way to signal that a package needs a required shared package, so in this case the validators should have samlify as a peer dependency, not the other way around. |
@tyler-johnson Yes, I have read through the documentation. The usage of peer dependencies is not correct inside samlify. I will modify it soon and also those validator modules. Thanks for pointing out. |
@tngan publish 2.6.3? |
@big-kahuna-burger Yes, I have just published 2.6.3. |
Since this package includes all of the different validators in the
peerDependencies
in the package.json, I get warnings from yarn and NPM that look like this:I think these packages should be removed from peer dependencies and instead just rely on the runtime error you have to signal that a user needs to install one of the validators.
By putting these packages into peer dependencies, you are forcing me to either install all 4 packages (which is unnecessary since I only need one), or forcing my users to have to interpret (and ignore) the warnings on install.
The text was updated successfully, but these errors were encountered: