fix!: refactor v7 internal state and options logic, fixes #764 #776
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.
Putting this PR up as an alternative to #768 that addresses #764 and a few other concerns.
v7()
-with-options fromv7()
-without-options.seq
field rather than 31.@robinpokorny My apologies for closing #768. I wanted to merge it, but the switch to typescript and these other issues just made it easier to address in a new PR. I'll do my best to credit your work here.
... and if you could help review this, I'd appreciate it. I feel pretty good about this refactor but there's enough code churn that an extra set of eyes would be very helpful.
Where #764 is concerned, the heart of this PR is in this code, where the behavior very deliberately branches based on whether
options
are present.Note
options#seq
andoptions#msecs
.v1()
code would probably benefit from a similar refactoring, if for nothing else than to make the APIs consistent. I'll put up a PR for that shortly.