Fix:
- Fix deep nested dynamic types validation [#132]
Refactors:
- The whole part of schemas and attribute definitions was refactored
- Tests are now run by Jest (and Electron for browser tests)
- Prettier was added
- Move to mono-repo
Enhancements
- Implement jest-structure assertions
- It's possible to set custom getters e setters directly in the structure class
- Allows to disable coercion
Breaking changes:
- Joi is updated to v16
- Attribute path in validation errors is an array instead of a string
- Attribute path in validation messages contains the whole path joined by '.'
- The name used for the dynamic import should aways be the same as the name of its type or else a custom identifier must be used
- Non-nullable attributes with value null will use default value the same way undefined does
- Structure classes now have two methods to generically set and get the value of the attributes,
.get(attributeName)
and.set(attributeName, attributeValue)
- Minimum Node version is now 10
Docs:
- Rename the term
type descriptor
toattribute definition
in the docs and in the code - Reorganize and add more specific pages to docs
- Publish only src folder for jest-structure
- Reorganize md files
- Invert symlinks
- Add symlinks to md files to packages/structure
Refactors:
- The whole part of schemas and attribute definitions was refactored
- Tests are now run by Jest (and Electron for browser tests)
- Prettier was added
- Move to mono-repo
Enhancements
- Implement jest-structure assertions
- It's possible to set custom getters e setters directly in the structure class
Breaking changes:
- Joi is updated to v16
- Attribute path in validation errors is an array instead of a string
- Attribute path in validation messages contains the whole path joined by '.'
- The name used for the dynamic import should aways be the same as the name of its type or else a custom identifier must be used
- Non-nullable attributes with value null will use default value the same way undefined does
- Structure classes now have two methods to generically set and get the value of the attributes,
.get(attributeName)
and.set(attributeName, attributeValue)
- Minimum Node version is now 10
Enhancements:
- Add
unique
validation to arrays
Enhancements:
- Add method to clone structures
Enhancements:
- Allow custom error class to static mode
Enhancements:
- Add
buildStrict
static method
Enhancements:
- Add
nullable
option
Fix:
- The actual instance is passed to the dynamic defaults
Enhancements:
- When using default function to initialize attributes you can now refer to another attribute values to compose value
Features:
- Allow circular reference on type definitions (@talyssonoc)
Enhancements:
- Make validation faster (@talyssonoc)
Dependencies update:
- Update joi from 9.2.0 to 10.2.0 (@talyssonoc)
- Added static method
validate()
to structures (@talyssonoc)