-
Notifications
You must be signed in to change notification settings - Fork 489
Labels
good first issueGood issue for new contributorsGood issue for new contributorshelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing feature
Description
We don't perform much in the way of validation on loaded libp2p config but we really should.
Ideally each module parsing it's config would use something like superstruct to validate at creation time and fail fast with good feedback to the user as to how they can fix their broken config.
This should negate the need for PRs like #1572 as the config would have been validated in src/config.ts already.
Update
@achingbrain explored a few different options and we determined that zod is perhaps the best choice. Currently Zod is 8kb minified + zipped but based on this discussion there are a few different approaches to making Zod tree-shakeable.
Anyone who takes up this work can continue with the commits on #2133 and have look at the discussion on that PR
maschad, tabcat and wemeetagain
Metadata
Metadata
Assignees
Labels
good first issueGood issue for new contributorsGood issue for new contributorshelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing feature