Fix default maxLength and update deps #13
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are two commits in here; a fix and an update for the dependencies. Happy to separate them into separate PRs if you'd like.
Default maxLength
Currently the maxLength is only being specified if the param is not given to
readFixedMessage
orreadVarintMessage
. The problem with that is that both functions are private and they are always called with maxLength, even if it's undefined. I set the default maxLength on the opts prior to those functions being called so it always exists. I also removed the, maxLength is the callback, check inside those methods, as it's not needed since they are private and we always supply the maxLength.String literals were being passed as errors, which also breaks linting, so I turned those into actual errors and updated the tests.
Dependency Updates
The major update here is to the latest version of Aegir, which required npm script updates.
It also includes the latest pull-reader (1.3.0), which adds the support needed for #8.