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

Improve parsing behavior and default property usage #357

Closed
wants to merge 41 commits into from
Closed

Improve parsing behavior and default property usage #357

wants to merge 41 commits into from

Conversation

A-312
Copy link
Contributor

@A-312 A-312 commented Jan 11, 2020

Fix: #337

TODO :

Breakchange :

  • P4 is a breakchange.
  • P2 is also a breakchange because it changes the behavior of format: [ typeof this !== 'object' ] during the parsing.

EDIT :

  • Add _cvtCoerce, _cvtFormat, and _cvtGetOrigin like reservated word for getter name.
  • Add also format and required like reservated word for getter name.

A-312 and others added 22 commits December 15, 2019 18:30
with current NPM registry state
with current NPM registry state
+ normalize simple and double quotes
@coveralls
Copy link

coveralls commented Jan 11, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling b0e3710 on A-312:improve-parsing-behavior into 30bcc2e on mozilla:feat-multi-packages-split.

@A-312
Copy link
Contributor Author

A-312 commented Jan 11, 2020

(This PR is based into #353, my first commit of this PR is dbe5f00)

 - Add argument `debug` to `getSchema()`: If true, returns data schema (like it is stored in convict instance).
 - .defaut() and .reset() errors
 - override parent errors
@A-312 A-312 changed the base branch from master to feat-multi-packages-split January 12, 2020 20:20
@A-312
Copy link
Contributor Author

A-312 commented Jan 16, 2020

(I will try to finish this one before the end of the month)

@A-312 A-312 mentioned this pull request Jan 21, 2020
14 tasks
@A-312
Copy link
Contributor Author

A-312 commented Jan 21, 2020

I had a doubt to know if I have to fix #355 (P1) or not because I didn't know on what case we have to do this and maybe is not the proper way to set default: undefined and required: true.

After thinking, I find one case: password property, I think nobody will add their password in their schema, default will be undefined. Then we want to catch an error if password stays undefined.

And P1 will be usefull with P2 if default will become less essential to parse convict property.

@A-312 A-312 marked this pull request as ready for review January 25, 2020 20:21
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.

4 participants