`@hapi/joi` dependency - necessary?
See original GitHub issueJust evaluating this lib for use in a project and the one issue that stood out for me was the dependency on @hapi/joi
, which has a chain of various dependencies.
This is only used in src
for validateEvent
. This isn’t exported or part of the package’s public API, but it’s used as part of createEvent
. Is it really necessary to validate the package’s output at runtime? Seems like more of a job for unit tests.
If it’s possible to move @hapi/joi
into devDependencies
and drop this runtime check that’d be a nice win (and presumably also a good performance boost for createEvent
, if that matters)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Dependency Problem with "@hapi/joi" · Issue #19 - GitHub
Regarding peer dependency, the dependency on @hapi/joi is self contained and isolated within the module. As such, the typical use case of ...
Read more >@hapi/joi - npm
a required string · must contain only alphanumeric characters · at least 3 characters long but no more than 30 · must be...
Read more >Validation - hapi.dev
First, joi states that post must be a minimum of 1 character, and a maximum of 140 characters. It also states that date...
Read more >How to properly share Hapi Joi validation schemas between ...
I found the easy way would be to centralize all schemas in a single file that could be required in all validators, but...
Read more >@hapi/joi - npm Package Health Analysis | Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. ... We found a way for you to contribute to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great suggestion, I’ll take a look
Heard and merged!