• Stefan Cameron's avatar
    Usability feedback · 6ccb8410
    Stefan Cameron authored
    - Provides direct access to all types and qualifiers right
      off the `rtv` object, such as `rtv.STRING` or `rtv.OPTIONAL`.
    - Lifts the restriction on typesets to only have a single
      occurrence of a given type. The same type may now appear
      multiple times in the same typeset, which makes typeset
      composition a lot simpler (e.g. you won't have to a
      custom validator if a value could be the string "foo"
      or a string that begins with "bar").
    - Deprecates `rtv.t` in favor of the more self-explanatory
      `rtv.types`.
    - Deprecates `rtv.q` in favor of the more self-explanatory
      `rtv.qualifiers`.
    - Deprecates `rtv.e` in favor of the more self-explanatory
      `rtv.enabled`.
    - `RtvError`: Don't include the typeset in the print output nor the
      serialization since it could be _very_ long and could bloat log
      unnecessarily since the path and cause should be enough to identify
      most issues (and with the path, it's possible to look at the code
      where the full typeset is defined and see what might have gone
      wrong). NOTE: The typeset is still included as a _property_ of
      the error object; this change just affects what's output to the
      console in event an `RtvError` is thrown (and what's output to
      string if you do `error.toString()`).
    - If an exception is thrown in `impl`, it's no longer wrapped
      in an "outer" exception, so you won't get an error message like
      `"Cannot check value: Cannot check value: Cannot check value:
      Invalid typeset..."` because the invalid typeset was nested
      3 levels deep. You'll just get `"Invalid typeset..."` now
      (or whatever the exception was).
    
    Also:
    
    - Added `yup` as an alternative (kind of...) in the README.
    - Fixed a few typos in the docs here and there.
    6ccb8410
.eslintrc 5.19 KB