This removes defaults from superstruct and instead uses
mergeOptions to deeply set the defaults on configuration.
This ensures that defaults are properly set.
This is a step toward removing superstruct altogether, #406,
but it is still being used for basic type validation.
* docs: update browser example pubsub
* docs: fix pubsub example config
* fix: make pubsub default to enabled
This allows for only adding the module to have it enabled. Previously you would have to supply and enable the module which is unncessary for users
BREAKING CHANGE: new configuration for deciding the implementation of pubsub to be used.
In this context, the experimental flags were also removed. See the README for the latest usage.
Configuration for the peer discovery modules is now optional so this does not need to be validated. This also cleans up the config module to reduce repetition.
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
* docs: update chat example and add info to its readme
* docs: update echo example
* docs: update libp2p in browser example
* docs: update pubsub example
* docs: update peer and content routing examples
* docs: update discovery mechanisms example
* docs: update encrypted comms example
* docs: update protocol and stream muxing example
* feat: add config validation
* test: update CI configs, use only node 8