-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Dependency Problem with "@hapi/joi" #19
Comments
There is a pr, however it keeps the joi dependency pinned... Any objections to making this a peer dependency? |
Thank you and @deathgrindfreak for the quick notification and fixes. I agree that tests would be nice. Unfortunately, tests would not have prevented me from publishing a broken version. For some reason a random Ironically, a reason to pin the version is to prevent failures such as the one introduced by v0.5.1 of this module. Regarding peer dependency, the dependency on |
Tests and setting up ci/cd. I use that for all my npm packages and that actually just caught something today where an environment variable was only set locally. You could also just run your tests locally in a docker container. Super simple to spawn a container with a shell in the project directory with e.g.
Note: remove/add file links as appropriate from/to that command
Pinning is not really necessary if you're using a lock file in your repo, which you probably should, since that is the only way to include sub dependency versions. But if you prefer to pin - which I do as well for smaller, non-peer dependencies - auto dependency updates are the way to go (e.g. use dependabot). But separate from that, I would strongly encourage you to add a lock file to this project to really prevent the kind of failures you were talking about!
I consider Hope that clarified some things. Please let me know if you have any questions! Always happy to discuss my reasoning and best practices :) |
package-lock.jsonI honestly don't understand the utility you get out of In the example below note that the "locked"
Updating to
The only thing I've experienced sizeYeah, I can see how shipping all of peerDependenciesOn the other hand, while I don't think |
And that's why it would be great to have at least some tests :)
We're working on a pr to fix this now...
The text was updated successfully, but these errors were encountered: