Skip to content

Bump mutative from 1.3.0 to 2.0.2 in the dev-tooling group across 1 directory - #48

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/dev-tooling-a86c7f240b
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/dev-tooling-a86c7f240b

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Bumps the dev-tooling group with 1 update in the / directory: mutative.

Updates mutative from 1.3.0 to 2.0.2

Release notes

Sourced from mutative's releases.

2.0.2

What's Changed

Full Changelog: unadlib/mutative@v2.0.1...v2.0.2

2.0.1

What's Changed

Full Changelog: unadlib/mutative@v2.0.0...v2.0.1

2.0.0

Mutative v2 keeps the v1 API and makes updates faster and more correct. Across 97 benchmarked workloads, it is 4.3x faster than Mutative 1.3.0 on geometric mean, and 3.6x faster than Immer 11.1.18 with matched settings, or 6.6x with each library's defaults. It also fixes many cases in which v1 produced wrong states or patches, and production bundles leave out the development checks. Some of these changes can affect existing code: read the breaking changes below and the migration guide before you upgrade.

Highlights

  • Faster updates. Against Mutative 1.3.0, v2 was faster in 535 of 614 measured cases, within 5% in 70 and slower in 9. Against Immer 11.1.18, it was faster in 595 of 614 cases. The performance summary has every workload, the method and its limits.
  • Native array methods. shift, unshift, splice and reverse move the elements of a plain array directly on the draft's copy, and indexOf, lastIndexOf and includes search it natively. Removing the first of 10,000 rows takes 7.04 µs, against 7,408 µs in Immer, and the patches of such moves replay in both directions.
  • Searches without drafts. current() of a changed array copies the current array instead of reading each element through the draft, so current(draft.list).findIndex(…) searches a large array without creating a draft for each element.
  • Correct patches and states. The patches of moved drafts, of Sets whose items changed, of arrays that shrink and grow again, of -0 and of Map keys that are arrays now reproduce the next state, and Map and Set drafts freeze and iterate like built-in Maps and Sets. See fixes that change results.
  • Safer apply(). Patches cannot change the prototypes of objects: apply() also rejects a path that ends in __proto__, and reads Set items only at their indices.
  • Production builds for bundlers. The ESM entry compares process.env.NODE_ENV at each development check, so production bundles leave out the development checks and warnings, and production errors are short codes that link to the errors page.
  • Better types. Async recipes with an explicit state type return a Promise, apply() types frozen and in-place results, and a curried recipe that annotates its draft gives a typed producer.
  • A new website. mutative.js.org has new guides, a comparison with Immer, migration guides from Immer and from v1, an errors page, and llms.txt.

Breaking changes

The migration guide describes each change and what to do about it.

Build output and package entries

  • Every build targets ES2018 instead of ES2015. Engines that support Proxy but not ES2018 syntax, such as Chrome 49–59, Firefox 18–54, Safari 10–11.0 and Edge 12–18, need Mutative transpiled by your build.
  • The ESM entry compares process.env.NODE_ENV at each development check instead of always running development code. Bundles that target Node.js without defining NODE_ENV, such as esbuild with platform: 'node', now include both CommonJS builds; define NODE_ENV or keep Mutative external.
  • In Node.js, import resolves a module that re-exports the CommonJS build, so import and require share one instance and both follow NODE_ENV. Previously, import always ran the development ESM build as a separate instance.
  • dist/mutative.esm.mjs and dist/mutative.esm.js read process.env.NODE_ENV when they load, so loading them without a bundler, from a <script type="module"> with a raw CDN URL or in another runtime without process, throws process is not defined. Load dist/mutative.esm.production.min.mjs instead, or the UMD build that the unpkg and jsdelivr fields point to.
  • Production builds throw Minified Mutative error #<code> with a link to the errors page instead of the full message. Code that matches error messages in production must match the codes instead.

Patches

  • The patches of a nested draft come before those of its parents, the order Immer uses. Applying them gives the same state as before.
  • A patch value that was a draft is the object that the next state holds instead of a deep copy, and it is frozen with the state under enableAutoFreeze. apply() still copies patch values; copy a patch value before you change it.
  • A changed draft that leaves its key, because sort() or an assignment moved it or another value replaced it there, emits no patches under its old path; the patches of its parent carry its value.
  • A changed item of a Set that also added or removed items is carried by the Set's remove and add patches instead of patches under its position.
  • Assigning the original object of a draft to the key that holds the draft is recorded like any other assignment.

Arrays

... (truncated)

Commits
  • 15caa67 fix(website): upgrade minimatch and preserve preview compatibility
  • 77b6298 fix(tooling): upgrade vulnerable glob and minimatch dependencies
  • e70784a chore(version): update version
  • a523a43 docs(finalize): correct the comment on patch values of assigned drafts
  • 1000bce docs(patches): note the copied patch value of a draft held by a later-read co...
  • 3f6ebc0 fix: preserve draft finalization state and producer ownership (#218)
  • 0cc59b3 ci: audit both dependency graphs before publishing and on a schedule
  • 6bb2a91 fix(dependabot): allow website security fixes and track action updates
  • 1887aea fix(tooling): update vulnerable dependencies and review esbuild size baseline
  • 78836f8 fix(website): update vulnerable runtime and preview dependencies
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for mutative since your current version.


@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 22, 2026
@dependabot dependabot Bot changed the title Bump mutative from 1.3.0 to 2.0.0 in the dev-tooling group Bump mutative from 1.3.0 to 2.0.0 in the dev-tooling group across 1 directory Oct 22, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/dev-tooling-a86c7f240b branch from c1dd3b3 to de7b271 Compare October 22, 2026 12:37
@sjungling

Copy link
Copy Markdown
Member

Dependabot watcher: HIGH risk, not approved or merged. Major bump of mutative 1 -> 2. A person should review the breaking changes.

@dependabot dependabot Bot changed the title Bump mutative from 1.3.0 to 2.0.0 in the dev-tooling group across 1 directory Bump mutative from 1.3.0 to 2.0.2 in the dev-tooling group across 1 directory Nov 5, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/dev-tooling-a86c7f240b branch from de7b271 to fa4a00b Compare November 5, 2026 12:34
Bumps the dev-tooling group with 1 update in the / directory: [mutative](https://github.com/unadlib/mutative).


Updates `mutative` from 1.3.0 to 2.0.2
- [Release notes](https://github.com/unadlib/mutative/releases)
- [Commits](unadlib/mutative@v1.3.0...v2.0.2)

---
updated-dependencies:
- dependency-name: mutative
  dependency-version: 2.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dev-tooling
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/dev-tooling-a86c7f240b branch from fa4a00b to 347bff1 Compare November 5, 2026 12:41
@dependabot @github

dependabot Bot commented on behalf of github Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Looks like mutative is updatable in another way, so this is no longer needed.

@dependabot dependabot Bot closed this Nov 12, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/dev-tooling-a86c7f240b branch November 12, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant