Skip to content
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

[Snyk] Upgrade immer from 9.0.21 to 10.0.2 #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BlueEagle
Copy link
Owner

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade immer from 9.0.21 to 10.0.2.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


Warning: This is a major version upgrade, and may be a breaking change.

  • The recommended version is 9 versions ahead of your current version.
  • The recommended version was released 4 months ago, on 2023-05-09.
Release notes
Package name: immer
  • 10.0.2 - 2023-05-09

    10.0.2 (2023-05-09)

    Bug Fixes

    • export Objectish type (#1043) (75e004d)
    • Move index.js.flow from dist/ -> dist/cjs/ to match index.js (#1038) (a3b5603)
  • 10.0.1 - 2023-04-17

    10.0.1 (2023-04-17)

    Bug Fixes

    • production bundle was loaded incorrectly, fixes #1037 (707e72b)
  • 10.0.0 - 2023-04-17

    10.0.0 (2023-04-17)

    Release notes

    • [breaking change] Immer 10 only supports modern browsers, that have support for Proxy, Reflect, Symbol and Map and Set.
    • [breaking change] There is no longer a UMD build exposed (thanks Mark Erikson for modernizing the build setup in #1032!
    • [breaking change] getters and setters are ignored by default on plain object, as this is a very uncommon case and provides a significant performance boost (ca 33%, but depends a lot on the scenario). Fixes #867, #1012. Thanks hrsh7th for implementing it in #941!
    • [breaking change] Promise based reducers are no longer supported. Conceptually it is an anti pattern to hold on to drafts over time. If needed the old behavior can still be achieved by leveraging createDraft and finishDraft.
    • [breaking change] ES5 mode (for legacy browsers) has been dropped. If your project relies on enableES5(), you SHOULD NOT upgrade Immer. enableES5 has been removed.
    • [breaking change] produce is no longer exposed as the default export. This improves eco system compatibility, and makes sure that there is only one correct way of doing things
    • [breaking change] enableAllPlugins has been removed, use enablePatches(); enableMapSet() instead
    • [breaking change] shortening the length of a JSON array now results in delete patches, rather than a mutation of the length property, in accordance with JSON spec. Thanks kshramt for implementing this in #964!
    • Immer is now an ESM package that can be directly imported into the browser. CJS should still work, UMD support has been removed.

    Overall, there is a rough performance increase of 33% for Immer (and in some cases significantly higher), and the (non gzipped) bundle size has reduced from 16 to 11.5 KB, while the the minimal gzipped import of just produce has remained roughly the same at 3.3 KB.

    For more details, see #1015

    Migration steps

    1. If you have any enableES5() call, don't migrate
    2. When using getters/ setters icmw plain objects, call useStrictShallowCopy(true) at startup
    3. Replace all default imports: Replace import produce from "immer" with import {produce} from "immer"
    4. Replace all calls to enableAllPlugins() with enablePatches(); enableMapSet(); to be more specific and smoothen future migrations.
    5. If any producer returned a Promise, refactor it to leverage createDraft instead. Roughly:
    const newState = await produce(oldState, recipe)

    // becomes
    const draft = createDraft(oldState)
    await recipe(draft)
    const newState = finishDraft(draft)




  • 10.0.0-beta.7 - 2023-04-16


  • 10.0.0-beta.6 - 2023-04-06


  • 10.0.0-beta.4 - 2023-04-03


  • 10.0.0-beta.3 - 2023-04-03


  • 10.0.0-beta.2 - 2023-04-03


  • 10.0.0-beta.1 - 2023-04-03


  • 9.0.21 - 2023-03-23

    9.0.21 (2023-03-23)

    Bug Fixes

    • ensure type exports is first in package.json export declaration (#1018) (b6ccd0f)
from immer GitHub release notes
Commit messages
Package name: immer

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

@vercel
Copy link

vercel bot commented Aug 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
conways-game-of-life ❌ Failed (Inspect) Aug 31, 2023 4:03pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants