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

Pass schema object to processCode function #1196

Merged
merged 2 commits into from Apr 27, 2020
Merged

Pass schema object to processCode function #1196

merged 2 commits into from Apr 27, 2020

Conversation

awlayton
Copy link
Contributor

What issue does this pull request resolve?

This resolves #1194

What changes did you make?

I passed the schema to processCode when it is callled,
as well as updating the type definitions and README for processCode.

Is there anything that requires more attention while reviewing?

Nope.

Copy link
Member

@epoberezkin epoberezkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you - please see the comment re docs, all good otherwise.

@@ -1169,7 +1169,7 @@ Defaults:
errorDataPath: 'object', // deprecated
messages: true,
sourceCode: false,
processCode: undefined, // function (str: string): string {}
processCode: undefined, // function (str: string, schema: object): string {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add comment in the lines 1281-2 below. require('js-beautify').js_beautify probably won't work anymore after this change, as it probably has some optional second parameter (it needs to be checked), so it has to be mentioned both in the docs and in the release notes what it has to be replaced with - not sure how many users would be affected... I am thinking to release over the next weekend to see if anything breaks. Alternatively it can be released on the beta branch in preparation for the next major version. I will think about it, but please add to the docs in any case.

@epoberezkin epoberezkin merged commit 58b7ad5 into ajv-validator:master Apr 27, 2020
@epoberezkin
Copy link
Member

thank you - I will release it on Saturday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Pass schema to processCode
2 participants