-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Bump immer from 7.0.7 to 8.0.1 #4050
Conversation
I don't think this is a trivial dependency update. I've done this update in my project [1] using yarn
This will cause a crash with
[1]
|
I confirm, editor stopped working after upgrade to 8.0.1. For me it looks as there is misusage of immer at all. Immer is to "mutate" immutable states, editor instance is not immutable state, so we can't blame immer that it makes base object immutable as a side effect as only immutable objects should be passed as base object to produce. This bug can be reproduced in more ways. Any method which uses produce() and accepts editor instance as an argument makes editor immutable and than any operation which tries to mutate editor state cause crash. |
Making a note here that Having a high severity caused by including slate vulnerability could impact the adoption of slate. There is not an obvious solve except to move away from |
Is it possible to fork immer 7.x and backport the fix? |
/rebase |
9eb8dcc
to
15d0527
Compare
|
If There's some discussion about the reasoning and performance implications of auto freezing (or not auto freezing) in immerjs/immer#687. |
This should have been fixed in #3850 (https://github.com/ianstormtaylor/slate/pull/3850/files#diff-36e80a658eb32e4912dc75f66345c365d4c599d9de5b32b633f441b03f571575) with the upgrade to immer 7. I have also forcibly upgraded my copy of Slate to 8.0.1, and have had no issues with |
If anyone can confirm what @TheSpyder said ^ above for |
@ianstormtaylor - I'm testing this with |
If it is working can we get this merge? |
For our usage of slate, using resolutions to get 8.0.4 of immer with 0.62.0 of slate worked fine. Pity there is no back-port from immer but perhaps this moves forward soon? |
@peterlundberg have you tried 9th version of immer? Just wondering whether that was stable for you |
I’ll merge this soon. I’ve been busy, sorry. I may look at upgrading to a newer version of immer after it’s merged; feedback on whether they work would be great. |
Yes I did a quick test with 9.0.2 of immer in an explicit resolution with slate and slate-react 0.62.0. The way we use it it worked fine. |
@dependabot recreate |
Bumps [immer](https://github.com/immerjs/immer) from 7.0.7 to 8.0.1. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v7.0.7...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com>
15d0527
to
b7c93bb
Compare
@ianstormtaylor is it possible to publish slate-history to npm? the latest version available doesn't have this change. |
Yes please, the current version of slate-history has a vulnerability (because of Immer < 8.0.1 ) Can you publish this change? |
I'm not sure why slate-history even depends on immer. I'll remove it. |
@TheSpyder I see this fix got published Thanks! https://www.npmjs.com/package/slate-history/v/0.65.3-202171015123, but it has a weird timestamp on it? What's the process to get a normal version published? |
@lucas-stanford we publish every build of |
Bumps [immer](https://github.com/immerjs/immer) from 7.0.7 to 8.0.1. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v7.0.7...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [immer](https://github.com/immerjs/immer) from 7.0.7 to 8.0.1. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v7.0.7...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [immer](https://github.com/immerjs/immer) from 7.0.7 to 8.0.1. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v7.0.7...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [immer](https://github.com/immerjs/immer) from 7.0.7 to 8.0.1. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v7.0.7...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps immer from 7.0.7 to 8.0.1.
Release notes
Sourced from immer's releases.
... (truncated)
Commits
da2bd4f
fix: Fixed security issue #738: prototype pollution possible when applying pa...d75de70
chore: fix Buffer deprecation warning in test (#706)8fbf93c
docs: Add referential equality to pitfalls (#731)c21a2ef
docs: Update current.md (#728)211314c
docs: add cool-store into built-with.md (#724)e8fd805
chore(tests): use UTC date string in tests to be timezone independent (#705)fe8f589
chore(comments): update comments (#727)d8121d6
chore(docs): Fix typo in pitfalls.md (#729)5379cdd
chore(docs): Update example-reducer.md (#734)d3908e1
chore(deps): bump dot-prop from 4.2.0 to 4.2.1 in /website (#735)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.