Packages

immer

11.2.9 · 22 Oct 2026MIT89.4M / weekRepositoryHomepagenpmAtom feed

Your version

193 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 9.x
  2. 9.0.16

    22 Oct 2022
    • Protect isDraftable against undefined constructor

  3. 9.0.15

    13 Jun 2022
    • Add "types" to exports for TypeScript 4.7

  4. 9.0.14

    12 May 2022
    • Use .esm.js module for backwards compatibility with old build tools

  5. 9.0.13

    11 May 2022
    • Consistent recipe return type in produceWithPatches

    • Incorrect return type for async produceWithPatches

  6. 9.0.12

    11 Jan 2022
    • produceWithPatches should not wrap result in Immutable, fixes #850, #881

  7. 9.0.11

    11 Jan 2022
    • Incorrect patches for delete on arrays. Fixes #879

  8. 9.0.10

    11 Jan 2022
    • No patches being generated for root primitive replacements. Fixes #888

  9. 9.0.9

    11 Jan 2022
    • Make sure produceWithPatches accepts promises

  10. 9.0.8

    11 Jan 2022
    • immerjs#876 Ensure empty patch set for atomic set+delete on Map

  11. 9.0.7

    24 Nov 2021
    • Append to array when key is "-"

  12. 9.0.6

    31 Aug 2021
    • security

      security: Follow up on CVE-2020-28477 where path: [["__proto__"], "x"] could still pollute the prototype

  13. 9.0.5

    5 Jul 2021
    • Release missing dist/ folder

  14. 9.0.4

    5 Jul 2021
    • Return 'nothing' should produce undefined patch

    • New undefined properties should end up in result object

    • Better applyPatches type (#810) (09ac097), closes #809

  15. 9.0.3

    9 Jun 2021
    • isPlainObject: Add quick comparison between input and Object to short-circuit taxing Function.toString invocations

  16. 9.0.2

    25 Apr 2021
    • Fix type inference for produce incorrectly inferring promise

  17. 9.0.1

    20 Mar 2021
    • immerable field being lost during patch value cloning

  18. 9.0.0

    19 Mar 2021
    • breaking

      It is no longer allowed to return nothing from a recipe if the target state doesn't accept undefined.

    • breaking

      It is no longer allowed to return arbitrary things from a recipe. Recipes should either return nothing, or something that is assignable to the original state type. This will catch mistakes with accidental returns earlier.

    • Improved typescript types (2c2f30e), closes #720

  19. 8.x
  20. 8.0.4

    19 Mar 2021
    • Make sure isPlainObject checks support objects send accross frames. Fixes #766 / #405

  21. 8.0.3

    18 Mar 2021
    • New Immer().produce now has the same type as produce. Fixes #749

  22. 8.0.2

    17 Mar 2021
    • Add a type-checking fast path for primitive types

    • Ignore equal reference assignments. Fixes #648

  23. 8.0.1

    20 Jan 2021
    • security

      Fixed security issue #738: prototype pollution possible when applying patches CVE-2020-28477

  24. 8.0.0

    17 Nov 2020
    • breaking

      Always freeze by default, even in production mode. Use setAutoFreeze(process.env.NODE_ENV !== 'production') for the old behavior. See #687 for the rationale. Fixes #649, #681, #687

    • Always freeze by default

  25. 7.x
  26. 7.0.15

    17 Nov 2020
    • Make plugin loading idempotent, fixes #692

  27. 7.0.14

    20 Oct 2020
    • Build issue. Fixes #685 (?)

  28. 7.0.13

    20 Oct 2020
    • Reconcile if the original value is assigned after creating a draft. Fixes #659

  29. 7.0.12

    20 Oct 2020
    • Undraftable values should not be cloned for patches, fixes #676

  30. 7.0.11

    20 Oct 2020
    • Skip ReadonlyMap and ReadonlySet types when not available (#653). Fixes #624

  31. 7.0.10

    20 Oct 2020
    • Clearing empty Set&Map should be noop (#682). Fixes #680

  32. 7.0.9

    9 Sep 2020
    • Clear map creates invalid patches, fixes #663

  33. 7.0.8

    25 Aug 2020
    • Use a named type for Draft object for smaller type declaration files

    • Use Array.prototype.slice() for copying arrays. Fixes #650

    • Use Array.prototype.slice() for copying arrays. Fixes #650

  34. 7.0.7

    24 Jul 2020
    • Made NOTHING and IMMERABLE shared symbols. Fixes #632

    • Make sure changing an undefined value to undefined is not picked up as change. Fixes #646

    • Out of range assignments were broken in ES5 mode. Fixes #638

  35. 7.0.6

    24 Jul 2020
    • flow: added types for produceWithPatches

  36. 7.0.5

    24 Jun 2020
    • Fixed regression in Object.frozen for IE11. Fixes #600

  37. 7.0.4

    22 Jun 2020
    • Flow: Add tests for Map and Set and fix base type

    • New map keys were not added if value is undefined

  38. 7.0.3

    19 Jun 2020
    • getOwnPropertyDescriptors is not available in Internet Explorer and Hermes. Fixes #626

  39. 7.0.2

    19 Jun 2020
    • Fixed #620: Symbolic properties were not drafted or finalized correctly

  40. 7.0.1

    12 Jun 2020
    • Add missing type current for pre-TS 3.7 types

  41. 7.0.0

    10 Jun 2020
    • breaking

      Getters and setters are now handled consistently: own getters and setters will always by copied into fields (like Object.assign does), inherited getters and setters will be left as-is. This should allow using Immer directly on objects that trap their fields, like done in Vue or MobX. Fixes #584, #439, #593, #558

    • breaking

      Produce no longer accepts non-draftable objects as first argument

    • breaking

      Original can only be called on drafts and will throw otherwise (fixes #605)

  42. 6.x
  43. 6.0.9

    27 May 2020

    Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.

  44. 6.0.8

    23 May 2020
    • Make sure Immer works correctly when Symbol is polyfilled, fixes #577

  45. 6.0.7

    23 May 2020
    • Fixed issue where new items in Set where not recorded after iterating. Fixes #586

  46. 6.0.6

    21 May 2020
    • Object.isFrozen dies on non objects in Internet Explorer. Fixes #600

  47. 6.0.5

    5 May 2020
    • Don't recurse into non-enumerable members when freezing tree. Fixes #590

    • Don't recurse into non-enumerable members when freezing tree. Fixes #590

  48. 6.0.4

    5 May 2020
    • Added flow typings for new API's introduced in v6. Fixes #570

    • Ensure values in patches are never a draft, fixes #559

    • Improve flow types

  49. 6.0.3

    31 Mar 2020
    • Copy flow types to where flow can find them

    • Flow failed to find the Immer typings

  50. 6.0.2

    16 Mar 2020
    • Change Full error url

    • Fixed broken minimized error url (issue#550)

  51. 6.0.1

    4 Mar 2020
    • Rename compat index.d.ts to immer.d.ts

  52. 6.0.0

    3 Mar 2020
  53. 5.x
  54. 5.3.6

    12 Feb 2020
    • Mark immer as sideEffect free module (although effects will be limited for now)

  55. 5.3.5

    10 Feb 2020
    • Consistent naming for castDraft, fixup 2d27f33