• Stefan Cameron's avatar
    MAJOR REFACTORING: ARRAY args, validations, and validators · d399830e
    Stefan Cameron authored
    All tests are passing, however coverage has dropped and needs
    some attention.
    
    - ARRAY type: In fully-qualified notation, the typeset must now
      be specified in the `typeset` property of the args object. The
      shorthand notation is no longer supported in fully-qualified
      typesets (i.e. an element with a JavaScript type of Array directly
      inside an Array typeset is no longer valid). This makes Arrays
      no longer a syntactical exception, keeping things more consistent.
    
      Shorthand: [[STRING]], array (possibly empty) of non-empty strings.
    
      Fully-qualified: [ARRAY, {typeset: STRING}], equivalent to above.
    
    - Validations and Validators:
    
      The primary motivation behind this major change was to get to the
      point where the Validators could return RtvSuccess/RtvError objects
      without causing cyclical dependency issues within the library.
    
      Validations (e.g. is<Type>() or is<Pseudo-Type>()) are now stictly
      used to check a value as being one of the types defined in this
      library. They do not consider type arguments, if applicable, and
      always validate assuming the REQUIRED qualifier. They are meant
      to be leaf modules. See /src/lib/validation/validation.jsdoc for
      more details. For example, isString() checks that a value is a
      non-empty string (which is the REQUIRED qualifier rule).
    
      Validators (e.g. val<Type>()) now use their pertaining Validations,
      consider the qualifier and args (as before), and now return an
      RtvSuccess object if validation passes, or an RtvError object if
      validation fails. This allows for better identification of errors
      in deeply-nested values (e.g. a shape that includes an array of
      shapes where the nested shape causes the failure). For example,
      valString() uses isString() and considers the qualifier (to permit
      an empty string in the non-REQUIRED case) and arguments, if any.
    d399830e
After you've reviewed these contribution guidelines, you'll be all set to contribute to this project.
CONTRIBUTING.md 114 Bytes