-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Upgrade immer to 7.0.0 #3850
Upgrade immer to 7.0.0 #3850
Conversation
It looks ok to me. The 1 thing I worry about is the test coverage in core not covering all areas and some issue with freezing some portion of the editor state creeping up, or some other Immer issue. But in general, I think we should upgrade this dependency. It is a major dependency tho. |
Glad to merge this in @aiwenar if you can clean up the conflicts and get it passing CI? Thanks! |
Sure. Would you prefer me to merge master into this branch, or rebase this branch on master? |
Either works for me. Thanks! |
Squashed and rebased on top of master, otherwise unchanged. Since this PR was opened immer released versions 7.0.15 and 8.0.0, but I've left it at 7.0.7 as this is the version I've used when I opened this PR. |
Fixes #4034. |
@BrentFarese Any ETA on when we can expect a next beta containing this to be released? I'd love to be able to make use of the new TypeScript improvements, but cannot since the last one out (0.61) is broken due to #4034. Many thanks for your help! 🙇 |
No exact ETA but hope to release something shortly so this issue gets resolved on the |
I can confirm that @next is updated, and with that update, which includes this PR, #4034 is fixed for me. Thanks! And I just successfully migrated my codebase over to use the new Typescript support. |
Is this adding or improving a feature or fixing a bug?
Upgrading a dependency.
What's the new behavior?
Hopefully none.
I'm proposing this upgrade because I've run across immerjs/immer#559, a fix for which is included in immer >= 6.0.4. This issue does not occur in Slate itself (hence why I didn't mark this PR as fixing a bug), but rather when a Slate type such as
Range
is stored in an immer-controlled container, andtransform
ed. For example this:will result in
state.focus.path
being a revoked proxy.Since this changes a major version of a public dependency it is also a breaking change in Slate. However, I have verified that Slate works with Immer 5, 6, and 7, so in theory we could accept immer >= 5.00 < 8.0.0 and let the consumer choose which version of Immer they want, thus avoiding a breaking change. I'm not proposing that in this PR as I don't know how to do that in npm.
Have you checked that...?
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)Does this fix any issues or need any specific reviewers?
Fixes:
Reviewers: