Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] 0.3.0 #10

Open
wants to merge 16 commits into
base: 0.3.0
Choose a base branch
from
Open

[WIP] 0.3.0 #10

wants to merge 16 commits into from

Conversation

davebaol
Copy link
Owner

@davebaol davebaol commented Jun 10, 2019

CHANGELOG

  • Now validators need a scope in input to run validation. This root scope requires the object to validate (referenced as $ ) and lets you pass variables too.
  • Reference $path has gone since the object to validate can be referenced by name $ through $var, just like regular variables. In fact $ is a property of the context shared by nested scopes.
  • Now all validators taking a path as first argument are suffixed with $ and are a shortcut variant of the validator with the same name and no trailing $, which expects a value instead (this allows you to compare variables, for instance).

TODO

  • All validators currently taking a path should have an alternative version where that argument is of type any
  • Specific error for variants with and without $
  • Fix dsl-validator.yaml
  • Review iterators some, every, while
  • Review validator call
  • Update documentation

Now validators need a scope in input to run validation.
Reference $path has gone since the object to validate can be referenced by name $ through $var, just like regular variables. In fact $ is a property of the context shared by any scope.
@codecov-io
Copy link

codecov-io commented Jun 10, 2019

Codecov Report

Merging #10 into 0.3.0 will decrease coverage by 0.18%.
The diff coverage is 99.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##            0.3.0      #10      +/-   ##
==========================================
- Coverage   99.05%   98.87%   -0.19%     
==========================================
  Files          13       12       -1     
  Lines         848      888      +40     
==========================================
+ Hits          840      878      +38     
- Misses          8       10       +2
Impacted Files Coverage Δ
src/util/misc.js 100% <100%> (ø) ⬆️
src/util/info.js 100% <100%> (ø) ⬆️
src/util/expression.js 93.15% <100%> (-0.6%) ⬇️
src/util/context.js 100% <100%> (ø) ⬆️
src/util/types.js 99.35% <100%> (+0.02%) ⬆️
src/util/argument.js 100% <100%> (+4.54%) ⬆️
src/index.js 100% <100%> (ø) ⬆️
src/leaf-validators/index.js 100% <100%> (ø) ⬆️
src/branch-validators.js 100% <100%> (ø) ⬆️
src/util/scope.js 96.36% <87.5%> (-3.64%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48c05c5...b332b3d. Read the comment docs.

@davebaol davebaol changed the title Bye bye $path [WIP] 0.3.0 Jun 10, 2019
@davebaol davebaol changed the base branch from master to 0.3.0 June 23, 2019 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants