-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump major to alpha * Move Node version to 10 * Replace Object.assign with spread * Replace every var with let or const * Migrate tests that run on Node to use Jest * Update Node version on Travis * Base on Node 8 instead of 10 * Change linter to accept jest tests * Update joi without considering cases where lazy schema is needed * Handle dynamic types validations with link + shared API * Begin to refactor to a new internal structure * Rename descriptors concept to definitions * Implement initialization * Implement coercion for non-array types * Adjust tests to coercion without considering nested * Implement coercion for array types * Allow to subclass structures and inherit attributes * Implement strict mode (missing validation) * Implement validation to new core (#102) * Implement validation * Implement serialization (#101) * Implement validation for nested types * Implement clone to the new core (#103) * Implement clone to the new core * Make linter happy * Increase coverage * Refactors Descriptors to be a function instead of a class * Improve function naming for better debugging * Ensure that when reusing an attribute, it uses the new schema * Reformat according to prettier * Upgrade browser build (#105) * Webpack setup and begin to setup tests * Add electron to dev dependencies * Improve Webpack output during tests * Add browser tests to Travis * Remove unecessary dependencies * Update readme about browser and support * Separate travis lifecycles * Attempt to avoid hanging electron test * Update coveralls * Move to lerna (#106) * Move current code to packages * Share prettier config * Add coveralls to root package * Fix Coveralls script * Add coverage to root package * Create jest structure (#107) * Begin to implement assertions * Migrate boolean validation assertions to use jest-structure * Assert no expected for valid/invalid matchers * Assert attribute path is passed * Add package to automatically add assertions to jest * Begin to write tests * Add tests for validating error messages * Reorganize and begin to write toHaveInvalidAttributes * Implement toHaveInvalidAttributes and cover with tests * Rename auto.js to extend-expect.js * Refactor checking of path presence and usage hint * Refactor and remove hint from validity check of toHaveInvalidAttributes * Remove hint from validity check of toHaveInvalidAttribute * Refactor checking of attribute validity * Refactor usage error and remove hint for non-usage-related errors * Replace usage of assertValid with expect().toBeValid() * Replace validitationMatchers with jest-structure in array specs * Migrate whole structure spec to use jest-structure * Rename validity assertions to contain 'structure' in the name * Fix coverage script * Add tests for when using arrayContaining with jest-structure * Add readme * Allow defaulting when null and not nullable (#108) * Fallback to default when value is null and not nullable * Update changelog * Update docs about nullable attributes * Refactor name of dynamic default instance variable * Update changelog (#109) * Allow to pass custom identifier for dynamic types (#111) * Allow to pass custom identifier for dynamic types * Improve documentation wording * Improve changelog wording * Apply suggestions from code review Co-Authored-By: Leonardo Negreiros de Oliveira <[email protected]> * Update docs/schema-concept/circular-references-and-dynamic-types.md Co-Authored-By: Leonardo Negreiros de Oliveira <[email protected]> * Allow to declare custom setter and getter (#112) * Allow to use custom setters and getters to attributes * Add docs about custom getters and setters * Allow to inherit custom accessors * reduce function complexity * Add docs about custom accessors and inheritance * update joi (#114) * Add alpha patch (#115) * Make versioning consistent (#116) * Update dependencies node and generate build (#117) * Update dependencies and Node * Generate build * Remove Node 8 from Travis build * Make linter happy * Add missing symlinks (#118) * Invert symlinks (#119) * Invert symlinks * Bump alpha patch * Gix Gitbook refs (#120) * Gix Gitbook refs * New organization * Remove introduction duplicate link * Prepare to release new alpha * Gitbook testing docs (#124) * Add testing to docs and prettify md files * Fix formatting * Publish only src folder for jest-structure (#125) * Update Joi links (#126) * Allow to disable coercion (#127) * Update paths and messages of errors in docs (#128) * Improve docs (#129) * Improve docs * Improve verbiage * Update build * Bump version to 2.0.0 * Point links to master docs * Update changelog and add migration guide * Point CodeClimate to use eslint 6 * Use normal quotes where needed Co-authored-by: Leonardo Negreiros de Oliveira <[email protected]>
- Loading branch information
1 parent
b48d1ba
commit 3f527c1
Showing
178 changed files
with
15,349 additions
and
7,322 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
engines: | ||
eslint: | ||
enabled: true | ||
channel: "eslint-3" | ||
channel: 'eslint-6' | ||
|
||
ratings: | ||
paths: | ||
- src/** | ||
- packages/structure/src/** | ||
|
||
exclude_paths: | ||
- benchmark/**/* | ||
- dist/**/* | ||
- test/**/* | ||
- benchmark/**/* | ||
- packages/structure/dist/**/* | ||
- packages/structure/test/**/* |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
structure: | ||
readme: README.md | ||
readme: packages/structure/README.md | ||
summary: docs/SUMMARY.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10.13.0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
/dist | ||
/README.md | ||
/CHANGELOG.md | ||
dist |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
language: node_js | ||
node_js: | ||
- "node" | ||
- "6.1" | ||
- "6.0" | ||
- "8.0" | ||
- '10' | ||
- '11' | ||
- '12' | ||
- 'node' | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- xvfb | ||
|
||
install: | ||
- yarn | ||
- export DISPLAY=':99.0' | ||
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
|
||
before_script: | ||
- yarn test:browser:build | ||
|
||
script: | ||
- npm run lint | ||
- npm test | ||
- npm run coveralls | ||
- yarn lint | ||
- yarn test | ||
- yarn test:browser:run | ||
- yarn coveralls |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,129 @@ | ||
## 2.0.0 - 2020-03-31 | ||
|
||
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` to `attribute definition` in the docs and in the code | ||
- Reorganize and add more specific pages to docs | ||
|
||
## 2.0.0-alpha.4 - 2020-03-21 | ||
|
||
- Publish only src folder for jest-structure | ||
|
||
## 2.0.0-alpha.3 - 2020-03-20 | ||
|
||
- Reorganize md files | ||
|
||
## 2.0.0-alpha.2 - 2020-03-19 | ||
|
||
- Invert symlinks | ||
|
||
## 2.0.0-alpha.1 - 2020-03-19 | ||
|
||
- Add symlinks to md files to packages/structure | ||
|
||
## 2.0.0-alpha.0 - 2020-03-19 | ||
|
||
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 | ||
|
||
## 1.8.0 - 2019-09-16 | ||
|
||
Enhancements: | ||
* Add `unique` validation to arrays | ||
|
||
- Add `unique` validation to arrays | ||
|
||
## 1.7.0 - 2019-09-14 | ||
|
||
Enhancements: | ||
* Add method to clone structures | ||
|
||
- Add method to clone structures | ||
|
||
## 1.6.0 - 2019-08-27 | ||
|
||
Enhancements: | ||
* Allow custom error class to static mode | ||
|
||
- Allow custom error class to static mode | ||
|
||
## 1.5.0 - 2019-07-08 | ||
|
||
Enhancements: | ||
* Add `buildStrict` static method | ||
|
||
- Add `buildStrict` static method | ||
|
||
## 1.4.0 - 2019-03-26 | ||
|
||
Enhancements: | ||
* Add `nullable` option | ||
|
||
- Add `nullable` option | ||
|
||
## 1.3.2 - 2019-03-22 | ||
|
||
Fix: | ||
* The actual instance is passed to the dynamic defaults | ||
|
||
- The actual instance is passed to the dynamic defaults | ||
|
||
## 1.3.0 - 2018-03-23 | ||
|
||
Enhancements: | ||
* When using default function to initialize attributes you can now refer to another attribute values to compose value | ||
|
||
- When using default function to initialize attributes you can now refer to another attribute values to compose value | ||
|
||
## 1.2.0 - 2017-02-01 | ||
|
||
Features: | ||
* Allow circular reference on type definitions ([@talyssonoc](https://github.com/talyssonoc/structure/pull/30)) | ||
|
||
- Allow circular reference on type definitions ([@talyssonoc](https://github.com/talyssonoc/structure/pull/30)) | ||
|
||
Enhancements: | ||
* Make validation faster ([@talyssonoc](https://github.com/talyssonoc/structure/pull/28)) | ||
|
||
- Make validation faster ([@talyssonoc](https://github.com/talyssonoc/structure/pull/28)) | ||
|
||
Dependencies update: | ||
* Update joi from 9.2.0 to 10.2.0 ([@talyssonoc](https://github.com/talyssonoc/structure/pull/26)) | ||
|
||
- Update joi from 9.2.0 to 10.2.0 ([@talyssonoc](https://github.com/talyssonoc/structure/pull/26)) | ||
|
||
## 1.1.0 - 2017-01-17 | ||
* Added static method `validate()` to structures ([@talyssonoc](https://github.com/talyssonoc/structure/pull/25)) | ||
|
||
- Added static method `validate()` to structures ([@talyssonoc](https://github.com/talyssonoc/structure/pull/25)) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.