-
-
Notifications
You must be signed in to change notification settings - Fork 852
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
Make applyPatches
to accept readonly Patch[]
#1094
Conversation
Yeah that looks great! I'm not 100% sure about the returned patches indeed, as people might be postprocessing those in a mutable manner. So probably safer to not change right away. (Feel free to set up a separate PR to park for the next major) |
Looks like some of the tests fail, but overall agree with the idea :) |
Patch[]
arrays readonly
on the outer boundsapplyPatches
to accept readonly Patch[]
@mweststrate I adjusted the PR as requested. There are still some test failures here but they are unrelated to the change - the same ones can be seen |
I didn't use GitHub for too long and can't find the rebase button anymore, but master should be fixed now. |
ce189b6
to
677becc
Compare
Just rebased this on top of |
Merging, thanks for the PR and sorry for the delay! |
🎉 This PR is included in version 10.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
My main goal is for
applyPatches
to acceptreadonly Patch[]
as there is no reason why it shouldn't accept it. If you think that other changes here are too risky (like returningreadonly Patch[]
fromproduceWithPatches
) then I can revert those bits of this change.