Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Update dependency immer to v9 #12

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

Conversation

mend-for-github-com[bot]
Copy link

@mend-for-github-com mend-for-github-com bot commented Jul 9, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
immer ^3 -> ^9.0.0 age adoption passing confidence

By merging this PR, the below vulnerabilities will be automatically resolved:

Severity CVSS Score CVE
Critical Critical 9.8 CVE-2021-23436
Critical Critical 9.8 CVE-2021-3757
High High 7.5 CVE-2020-28477

Release Notes

immerjs/immer (immer)

v9.0.6

Compare Source

Bug Fixes
  • security: Follow up on CVE-2020-28477 where path: [["__proto__"], "x"] could still pollute the prototype (fa671e5)

v9.0.5

Compare Source

Bug Fixes
  • release missing dist/ folder (bfb8dec)

v9.0.4

Compare Source

Bug Fixes

v9.0.3

Compare Source

Bug Fixes
  • isPlainObject: add quick comparison between input and Object to short-circuit taxing Function.toString invocations (#​805) (07575f3)

v9.0.2

Compare Source

Bug Fixes

v9.0.1

Compare Source

Bug Fixes

v9.0.0

Compare Source

feature
BREAKING CHANGES
  • It is no longer allowed to return nothing from a recipe if the target state doesn't accept undefined.
  • 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.

v8.0.4

Compare Source

Bug Fixes

v8.0.3

Compare Source

Bug Fixes
  • new Immer().produce now has the same type as produce. Fixes #​749 (f8b77d1)

v8.0.2

Compare Source

Bug Fixes

v8.0.1

Compare Source

Bug Fixes

v8.0.0

Compare Source

feature
BREAKING CHANGES

v7.0.15

Compare Source

Bug Fixes

v7.0.14

Compare Source

Bug Fixes

v7.0.13

Compare Source

Bug Fixes
  • reconcile if the original value is assigned after creating a draft. Fixes #​659 (c0e6749)

v7.0.12

Compare Source

Bug Fixes
  • undraftable values should not be cloned for patches, fixes #​676 (1b70ad5)

v7.0.11

Compare Source

Bug Fixes

v7.0.10

Compare Source

Bug Fixes

v7.0.9

Compare Source

Bug Fixes

v7.0.8

Compare Source

Bug Fixes
  • Use a named type for Draft object for smaller type declaration files (a1a0da0)
  • use Array.prototype.slice() for copying arrays. Fixes #​650 (bf90358)
  • use Array.prototype.slice() for copying arrays. Fixes #​650 (bb40c36)

v7.0.7

Compare Source

Bug Fixes
  • made NOTHING and IMMERABLE shared symbols. Fixes #​632 (b1c6a8e)
  • make sure changing an undefined value to undefined is not picked up as change. Fixes #​646 (5521527)
  • out of range assignments were broken in ES5 mode. Fixes #​638 (0fe9132)
  • Set finalization can get stuck in a loop, fixes #​628 (b12e5c9)
  • Trigger setters with the correct context, fixes #​604 (2697430)

v7.0.6

Compare Source

Bug Fixes
  • flow: added types for produceWithPatches (b355838)

v7.0.5

Compare Source

Bug Fixes

v7.0.4

Compare Source

Bug Fixes
  • Flow: Add tests for Map and Set and fix base type (9022672)
  • new map keys were not added if value is undefined (4a1bd65)

v7.0.3

Compare Source

Bug Fixes
  • getOwnPropertyDescriptors is not available in Internet Explorer and Hermes. Fixes #​626 (c7a47e2)

v7.0.2

Compare Source

Bug Fixes
  • Fixed #​620: Symbolic properties were not drafted or finalized correctly (91915cf)

v7.0.1

Compare Source

Bug Fixes
  • Add missing type current for pre-TS 3.7 types (7d6b57b)

v7.0.0

Compare Source

  • Introduced current, which takes a snapshot of the current state of a draft and finalizes it (but without freezing). Current is a great utility to print the current state during debugging (no Proxies in the way), and the output of current can also be safely leaked outside the producer. Implements #​441, #​591

  • [BREAKING CHANGE] 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 CHANGE] produce no longer accepts non-draftable objects as first argument

  • [BREAKING CHANGE] original can only be called on drafts and will throw otherwise (fixes #​605)

  • [BREAKING CHANGE] non-enumerable and symbolic fields will never be frozen

  • [BREAKING CHANGE] the patches for arrays are now computed differently to fix some scenarios in which they were incorrect. In some cases they will be more optimal now, in other cases less. Especially splicing / unshifting items into an existing array might result in a lot of patches. Fixes #​468

  • Improved documentation in several areas, there is now a page for typical update patterns and a separate page on how to work with classes. And additional performance tips have been included. Fixes #​457, #​115, #​462

  • Fixed #​462: All branches of the produced state should be frozen

  • Fixed #​588: Inconsistent behavior with nested produce

  • Fixed #​577: Immer might not work with polyfilled symbols

  • Fixed #​514, #​609: Explicitly calling useProxies(false) shouldn’t check for the presence of Proxy.

v6.0.9

Compare Source

Bug Fixes
  • typo in feature.md (sovled > solved) (3445168)

v6.0.8

Compare Source

Bug Fixes
  • Make sure Immer works correctly when Symbol is polyfilled, fixes #​577 (2b40aec)

v6.0.7

Compare Source

Bug Fixes
  • fixed issue where new items in Set where not recorded after iterating. Fixes #​586 (169db77)

v6.0.6

Compare Source

Bug Fixes
  • Object.isFrozen dies on non objects in Internet Explorer. Fixes #​600 (974bd70)

v6.0.5

Compare Source

Bug Fixes
  • Don't recurse into non-enumerable members when freezing tree. Fixes #​590 (497d1a0)
  • Don't recurse into non-enumerable members when freezing tree. Fixes #​590 (d64c2bd)

v6.0.4

Compare Source

Bug Fixes

v6.0.3

Compare Source

Bug Fixes
  • copy flow types to where flow can find them (6247c03)
  • Flow failed to find the Immer typings (c2ae050)

v6.0.2

Compare Source

Bug Fixes

v6.0.1

Compare Source

Bug Fixes
  • rename compat index.d.ts to immer.d.ts (ed6ba6d)

v6.0.0

Compare Source

  • Merge pull request #​536 from immerjs/multi-bundle (0d87fc8), closes #​536
  • Adding large data sets to a draft has been optimized (in case autofreeze is disabled)
  • Added compatibility typing support for TypeScript versions pre 3.7
BREAKING CHANGES

v5.3.6

Compare Source

Bug Fixes
  • mark immer as sideEffect free module (although effects will be limited for now) (21c1597)

v5.3.5

Compare Source

Bug Fixes

v5.3.4

Compare Source

Bug Fixes
  • attempt to fix locally not reproducible build issue (f91bcbb)

v5.3.3

Compare Source

Bug Fixes
  • Set inside patches were not correctly cloned. Fixes #​521 (9d8d995)
  • Fixed issue where drafts from nested producers were frozen. Fixes #​522, #​524 (acc5e54)
  • incorrect patches generated for array if property was deleted inside (1e451a3)
  • patches when delete object property in array (fb5c316)

v5.3.2

Compare Source

v5.3.0

Compare Source

Bug Fixes
Features
  • general typing improvements for TS 3.7 and up (f930ce1)

v5.2.1

Compare Source

Bug Fixes

v5.2.0

Compare Source

Features

v5.1.0

Compare Source

Features
  • convert Immer to TypeScript (52c9914)

v5.0.2

Compare Source

Bug Fixes

v5.0.1

Compare Source

Bug Fixes
  • Fixed #​477, Immer crashes without an Object.assign polyfill (4895824)

v5.0.0

Compare Source

❤ immer? 👉 https://opencollective.com/immer

This release introduces first class support for Maps and Sets!

BREAKING CHANGE: Maps and Sets are treated differently now; they will no longer directly mutated when updated inside a draft

Some things to keep in mind:

  • Example: https://immerjs.github.io/immer/docs/complex-objects
  • Inside recipes, you can directly modify Maps and Sets with methods like add, set, delete and clear
  • Those methods do mutate draft Maps and Sets, but won't actually change their originals!
  • Immer does not polyfill Map and Set automatically in environments where those aren't available out of the box
  • Maps and Sets are supported both in ES5 and Proxy mode
  • If autoFreeze is enabled, the maps and sets returned from a producer will be artificially frozen by making their mutative APIs unusable
  • Non primitive keys for Maps, and non primitive values for Sets are supported. However, we strongly recommend to not combine non-primitive keys to Maps with patches, for reasons expressed below.

Open questions

  • TypeScript support for storing immutable types inside Maps and Sets, and converting them to Draft's, is limited, see #​448 for details
  • Since JSON-patch standard doesn't offer support for Sets or Maps, it is not entirely clear how mutations to those are best described by patches, so this might be refined in the future. See also #​450

Credits to @​runnez, @​aigoncharov and @​aleclarson for making this happen!

v4.0.2

Compare Source

Bug Fixes
  • add immerable Flow typedef (c8c9fcd)

v4.0.1

Compare Source

Bug Fixes
  • Don't use proxies if Proxy.revocable is not defined. Fixes #​435 (c84aa53)

v4.0.0

Compare Source

Features
  • In development mode, any new value stored in a tree will be deeply frozen. (cb1c6dd)
BREAKING CHANGES

  • If you want to rebase/retry this PR, check this box

@mend-for-github-com mend-for-github-com bot added the security fix Security fix generated by Mend label Jul 9, 2023
@mend-for-github-com
Copy link
Author

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
No /opt/buildpack/tools/yarn-slim/1.22.19/bin/yarn defined - aborting

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
security fix Security fix generated by Mend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants