Silence noisy notifications, clarify not-noisy ones, tweak to template#8
Open
Silence noisy notifications, clarify not-noisy ones, tweak to template#8
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We used to only allow
{debug: true}(orfalse) for getting debugging info. And, for developing or working on the snippet, that was actually pretty good! But the challenge is/was, that when you're just using the JS, it was making a ton of noises about the internal states of the JS. This was not helpful to the implementor, who just needs to know some more basic stuff about which fields we've latched on to, etc.So we've changed it now to be either
true(a boolean),false(also boolean) or"verbose"(a string).truenow just gives you the basic info that you need to troubleshoot which fields it's attaching to, etc. Andverbosewill give you the old behavior.One thing we should probably do before merging this - the validator uses "BooleanOrString" - but that's not correct; it's "BooleanOrVerbose" - matching only that string. This way if someone accidentally passes in{debug: "trace"}it will fail immediately and not just act weird. Let me get that handled real quick.(This is now done; in the process I found that when
debug=falseit was not giving good error reporting when types were actually incorrect for the passed-in parameters)