-
Notifications
You must be signed in to change notification settings - Fork 454
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
Configuration validation #1573
Labels
good first issue
Good issue for new contributors
help wanted
Seeking public contribution on this issue
kind/enhancement
A net-new feature or improvement to an existing feature
Comments
achingbrain
added
need/triage
Needs initial labeling and prioritization
kind/enhancement
A net-new feature or improvement to an existing feature
need/analysis
Needs further analysis before proceeding
exp/intermediate
Prior experience is likely helpful
and removed
need/triage
Needs initial labeling and prioritization
labels
Feb 1, 2023
This was referenced Apr 3, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
May 29, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
Jul 3, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
Jul 4, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
Jul 5, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
Jul 5, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
Jul 21, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
Aug 20, 2023
maschad
added a commit
to maschad/js-libp2p
that referenced
this issue
Aug 21, 2023
Re-opening this as original PR which addressed this was reverted and subsequent work has taken place on #2133 I've also updated the description |
maschad
added
help wanted
Seeking public contribution on this issue
good first issue
Good issue for new contributors
and removed
exp/intermediate
Prior experience is likely helpful
labels
Jan 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good issue for new contributors
help wanted
Seeking public contribution on this issue
kind/enhancement
A net-new feature or improvement to an existing feature
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
The text was updated successfully, but these errors were encountered: