-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: Applied minimum amount of changes to adapt ajv-merge-patch to ajv v7 and v8 #39
Conversation
@epoberezkin I'm not sure if this was what you had in mind for #38 (and how the Would you mind to look into the changes in this PR and confirm if the changes to the new values got for the error Thanks in advance for your help! |
Looks ok, it should be released as a major version change. Does Ajv v7 need to be supported, or could it be skipped to support only v8? If so, versions need to be updated (and Thank you! |
👍 yeah seems more than reasonable (I haven't bumped the package version in this PR, I personally prefer to put the package version bumps in their own separate commits and I see that you are doing the same in this repo)
Personally I'm totally fine with only supporting Ajv v8 in the new version, and given that doing that does also reduce the size of this PR even further I did also already update this PR accordingly.
@epoberezkin Thank you for your work on ajv! Let me know if there is any other change needed on this PR and I'll be more than happy to come back to this asap to update it accordingly. |
@rpl @epoberezkin thanks for looking into upgrading this package! 😄 |
Looking forward to this update |
@epoberezkin is there any other change needed on this PR to make it ready for being merged and released? (last round of changes I pushed should cover your last round of comments from #39 (comment)) |
@epoberezkin hey, do you think we could merge this PR and get a new release? |
@epoberezkin sorry to keep bugging you about this... Would it be possible to take another look at this PR and get this merged? |
thank you - it works! |
it's released as 5.0.0. Any further changes - please send issue or PR. |
This PR contains the minimum amount of changes I had to apply locally to make all the existing ajv-merge-patch tests to pass on both ajv v7 and ajv v8 (and it is related to #38):
I had to also change the following assertions which I'm not 100% sure if they are expected differences:
error.dataPath
(namedinstancePath
in v8) actual value changed from".q"
to"/q"
(the original asserted value in test_validate was".q"
, but on Ajv v7 and v8 the value we get is now"/q"
)error.schemaPath
actual value changed from"#/properties/q/type"
to#/${keyword}/properties/q/type
and"#/required
into'#/${keyword}/required'
(basically in Ajv >= v7 the keyword seems to be part of the resulting error schemaPath, in <v6 it wasn't)