-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 mutate with replace klass #6089
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi @Piechota! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
This looks like it solves the same problem as #6076 so it should close that as well if this PR is chosen. My review comments would be basically the same: #6076 (review) |
I think this approach is probably better, but without really any docs or test coverage it's hard to say if there are any additional caveats to this simpler solution |
In that other PR you have a good point about chain of node replacements. |
So I have added loop to support multilevel replacement. Basically if node A replaces node B, and node C replaces node B. Creating node A doesn't create node C. |
Good idea, it seems that there is a lack of test coverage all around for this corner of the API! |
If no-one picks this up - I'll look at it later to add some tests. I touched klasses already in the devtools |
That would be very welcome! I'll close #6076 since this one seems more in line with expectations. |
size-limit report 📦
|
Closed in favor of #6189 (tests added) |
When registering mutation check for Node that replaced original one.
mutation are a map so only one entry.
Should fix #4498