• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

immerjs / immer
46%

Build:
DEFAULT BRANCH: main
Repo Added 04 Mar 2026 11:54PM UTC
Token I56RqKSv6S94Pza0eLYc9fb3L2XuAnSwQ regen
Build 209 Last
Files 28
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH main
branch: main
CHANGE BRANCH
x
Reset
Sync Branches
  • main
  • add-deno-install
  • agent/add-zh-cn-array-methods-docs
  • defer-type-inference
  • dependabot/npm_and_yarn/babel/core-7.29.6
  • dependabot/npm_and_yarn/baseline-browser-mapping-2.11.22
  • dependabot/npm_and_yarn/handlebars-4.7.9
  • dependabot/npm_and_yarn/immutable-3.8.3
  • dependabot/npm_and_yarn/immutable-4.3.8
  • dependabot/npm_and_yarn/immutable-4.3.9
  • dependabot/npm_and_yarn/ip-address-10.4.0
  • dependabot/npm_and_yarn/ip-address-10.7.2
  • dependabot/npm_and_yarn/lodash-4.18.1
  • dependabot/npm_and_yarn/nanoid-3.3.18
  • dependabot/npm_and_yarn/picomatch-2.3.2
  • dependabot/npm_and_yarn/shell-quote-1.10.0
  • dependabot/npm_and_yarn/shell-quote-1.8.4
  • dependabot/npm_and_yarn/sigstore-4.1.1
  • dependabot/npm_and_yarn/sigstore/core-3.2.1
  • dependabot/npm_and_yarn/sigstore/verify-3.1.1
  • dependabot/npm_and_yarn/tar-7.5.16
  • dependabot/npm_and_yarn/tar-7.5.22
  • dependabot/npm_and_yarn/vite-6.4.2
  • dependabot/npm_and_yarn/vite-6.4.3
  • dependabot/npm_and_yarn/vitest-3.2.6
  • dependabot/npm_and_yarn/website/babel/plugin-transform-modules-systemjs-7.29.4
  • dependabot/npm_and_yarn/website/baseline-browser-mapping-2.11.21
  • dependabot/npm_and_yarn/website/brace-expansion-1.1.14
  • dependabot/npm_and_yarn/website/brace-expansion-1.1.18
  • dependabot/npm_and_yarn/website/browserslist-4.28.8
  • dependabot/npm_and_yarn/website/colord-2.10.0
  • dependabot/npm_and_yarn/website/fast-uri-3.1.2
  • dependabot/npm_and_yarn/website/fast-uri-3.1.4
  • dependabot/npm_and_yarn/website/fast-uri-3.1.5
  • dependabot/npm_and_yarn/website/fast-uri-3.1.7
  • dependabot/npm_and_yarn/website/fast-uri-3.1.8
  • dependabot/npm_and_yarn/website/follow-redirects-1.16.0
  • dependabot/npm_and_yarn/website/http-proxy-middleware-2.0.10
  • dependabot/npm_and_yarn/website/joi-17.13.4
  • dependabot/npm_and_yarn/website/joi-17.13.7
  • dependabot/npm_and_yarn/website/lodash-4.18.1
  • dependabot/npm_and_yarn/website/nanoid-3.3.18
  • dependabot/npm_and_yarn/website/node-forge-1.4.0
  • dependabot/npm_and_yarn/website/picomatch-2.3.2
  • dependabot/npm_and_yarn/website/postcss-8.5.13
  • dependabot/npm_and_yarn/website/postcss-8.5.25
  • dependabot/npm_and_yarn/website/shell-quote-1.8.4
  • dependabot/npm_and_yarn/website/svgo-2.8.2
  • dependabot/npm_and_yarn/website/svgo-2.8.3
  • dependabot/npm_and_yarn/website/svgo-2.8.4
  • dependabot/npm_and_yarn/website/websocket-driver-0.7.5
  • dependabot/npm_and_yarn/website/yaml-1.10.3
  • docs/custom-produce-function
  • feature/harden-publishing-2026-05
  • fix-inherited-value-assignment
  • fix-prototype-vulnerability
  • fix/858-reassign-to-same-non-primitive
  • fix/896-typings-current-draft
  • fix/apply-patches-null-path-traversal
  • fix/array-methods-assigned-index-key
  • fix/array-methods-noop-structural-sharing
  • fix/array-methods-splice-start-index
  • fix/array-methods-thisarg
  • fix/array-reorder-base-mutation
  • fix/assert-unrevoked-on-map-set-draft-reads
  • fix/circular-refs-stack-1106
  • fix/docs-useimmer-todo-done-1011
  • fix/preserve-map-keys
  • fix/prototype-undefined-not-stored-as-own-prop
  • fix/rfc6902-patch-path-docs
  • fix/spurious-remove-patch-on-base-value-writeback
  • fix/ts2403-global-iterator-decl
  • patch-1
  • prototype-inspection-tests
  • refs/pull/1239/merge
  • refs/pull/1279/merge
  • refs/pull/1281/merge
  • revert-prototype-fix
  • zh-cn-api-overview-sync
  • zh-cn-installation-sync

02 Oct 2026 06:22PM UTC coverage: 46.249% (+0.09%) from 46.157%
37046988754

push

github

web-flow
fix: throw on reads of a revoked Map or Set draft (#1298)

Once produce or finishDraft returns, the draft is revoked and any further
use is meant to fail loudly. Object and array drafts get that from
Proxy.revocable, but Map and Set drafts are subclasses guarded by a manual
revoked_ flag, and several read paths never checked it:

  const map = new Map([["a", 1]])
  let draft
  produce({map}, d => {
    draft = d.map
  })
  draft.has("a")      // true, should throw
  draft.size          // 1, should throw
  [...draft.keys()]   // ["a"], should throw
  draft.get("a")      // throws, as expected

DraftSet.has already calls assertUnrevoked, so the same read on a Set draft
throws while the Map one silently returns stale data. This is the exact
async-leak case error 3 is meant to catch, so it should not depend on which
accessor the caller happens to use.

Add assertUnrevoked to DraftMap.has, DraftMap.size, DraftMap.keys,
DraftMap.forEach and DraftSet.size. DraftMap.values and DraftMap.entries
build on keys, so they now fail when they are called rather than on the
first next(). Nothing outside the plugin reads these accessors after
revocation, and the full suite is unchanged.

673 of 723 branches covered (93.08%)

Branch coverage included in aggregate %.

13 of 13 new or added lines in 1 file covered. (100.0%)

1756 of 4529 relevant lines covered (38.77%)

1892.46 hits per line

Relevant lines Covered
Build:
Build:
4529 RELEVANT LINES 1756 COVERED LINES
1892.46 HITS PER LINE
Source Files on main
  • Tree
  • List 28
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
37046988754 main fix: throw on reads of a revoked Map or Set draft (#1298) Once produce or finishDraft returns, the draft is revoked and any further use is meant to fail loudly. Object and array drafts get that from Proxy.revocable, but Map and Set drafts are sub... push 02 Oct 2026 06:23PM UTC web-flow github
46.25
37046462188 main fix: do not record a deletion when a base value is written back (#1295) The set trap has a fast path for assigning a property its own base value back after Immer drafted it. That path recorded the property in `assigned_` as `false`, which patch g... push 02 Oct 2026 06:18PM UTC web-flow github
46.16
37045818214 main docs(zh-CN): update installation guide for current features (#1307) Co-authored-by: Hugohong258 <282228220+Hugohong258@users.noreply.github.com> push 02 Oct 2026 06:13PM UTC web-flow github
46.16
37045609390 main chore(deps): bump joi from 17.13.4 to 17.13.7 in /website (#1301) Bumps [joi](https://github.com/hapijs/joi) from 17.13.4 to 17.13.7. - [Commits](https://github.com/hapijs/joi/compare/v17.13.4...v17.13.7) --- updated-dependencies: - dependency-n... push 02 Oct 2026 06:11PM UTC web-flow github
46.17
37045578556 main chore(deps): bump browserslist from 4.16.3 to 4.28.8 in /website (#1294) Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.16.3 to 4.28.8. - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changel... push 02 Oct 2026 06:10PM UTC web-flow github
46.16
37045526234 main chore(deps): bump nanoid from 3.3.11 to 3.3.18 (#1296) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.11 to 3.3.18. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/3.3.18/CHANGELOG.m... push 02 Oct 2026 06:10PM UTC web-flow github
46.16
37045504647 main chore(deps): bump colord from 2.9.3 to 2.10.0 in /website (#1299) Bumps [colord](https://github.com/omgovich/colord) from 2.9.3 to 2.10.0. - [Release notes](https://github.com/omgovich/colord/releases) - [Changelog](https://github.com/omgovich/co... push 02 Oct 2026 06:10PM UTC web-flow github
46.16
37045474345 main chore(deps): bump baseline-browser-mapping from 2.10.41 to 2.11.22 (#1303) Bumps [baseline-browser-mapping](https://github.com/web-platform-dx/baseline-browser-mapping) from 2.10.41 to 2.11.22. - [Release notes](https://github.com/web-platform-dx... push 02 Oct 2026 06:09PM UTC web-flow github
46.17
37045436940 main chore(test): cover circular symbol references in produce (#1309) Co-authored-by: Bennett Payoyo <Yahiro025@users.noreply.github.com> push 02 Oct 2026 06:09PM UTC web-flow github
46.16
37045351852 main chore(deps): bump svgo from 2.8.3 to 2.8.4 in /website (#1304) Bumps [svgo](https://github.com/svg/svgo) from 2.8.3 to 2.8.4. - [Release notes](https://github.com/svg/svgo/releases) - [Commits](https://github.com/svg/svgo/compare/v2.8.3...v2.8.4)... push 02 Oct 2026 06:09PM UTC web-flow github
46.16
See All Builds (169)

Badge your Repo: immer

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc