chathub
chathub copied to clipboard
Bump immer from 9.0.19 to 10.0.3
Bumps immer from 9.0.19 to 10.0.3.
Release notes
Sourced from immer's releases.
v10.0.3
10.0.3 (2023-10-02)
Bug Fixes
- don't use
.mjsfile for react-native, which isn't supported by default. Fixes #1058 #1065 (#1075) (f6736a4)v10.0.2
10.0.2 (2023-05-09)
Bug Fixes
- export
Objectishtype (#1043) (75e004d)- Move index.js.flow from dist/ -> dist/cjs/ to match index.js (#1038) (a3b5603)
v10.0.1
10.0.1 (2023-04-17)
Bug Fixes
v10.0.0
10.0.0 (2023-04-17)
Release notes
- [breaking change] Immer 10 only supports modern browsers, that have support for
Proxy,Reflect,SymbolandMapandSet.- [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
createDraftandfinishDraft.- [breaking change] ES5 mode (for legacy browsers) has been dropped. If your project relies on
enableES5(), you SHOULD NOT upgrade Immer.enableES5has been removed.- [breaking change]
produceis no longer exposed as thedefaultexport. This improves eco system compatibility, and makes sure that there is only one correct way of doing things- [breaking change]
enableAllPluginshas been removed, useenablePatches(); enableMapSet()instead- [breaking change] shortening the length of a JSON array now results in delete patches, rather than a mutation of the
lengthproperty, 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
producehas remained roughly the same at 3.3 KB.For more details, see #1015
Migration steps
- If you have any
enableES5()call, don't migrate- When using getters/ setters icmw plain objects, call
useStrictShallowCopy(true)at startup- Replace all default imports: Replace
import produce from "immer"withimport {produce} from "immer"- Replace all calls to
enableAllPlugins()withenablePatches(); enableMapSet();to be more specific and smoothen future migrations.
... (truncated)
Commits
f6736a4fix: don't use.mjsfile for react-native, which isn't supported by default...75e004dfix: exportObjectishtype (#1043)a3b5603fix: Move index.js.flow from dist/ -> dist/cjs/ to match index.js (#1038)327082cchore(deps): bump ajv from 6.11.0 to 6.12.6 (#1036)7f261afchore(deps): bump ansi-regex from 4.1.0 to 4.1.1 in /website (#1035)371b7b4chore: update badge (#1040)707e72bfix: production bundle was loaded incorrectly, fixes #10372ef9a42Merge pull request #1028 from immerjs/immer-1041ebbbcRestore mangleProps6f2a12bMerge branch 'markerikson-feature/build-tsup' into immer-10- Additional commits viewable in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.