Skip to content

chore(deps): update dependency immutable to v5 - #1918

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/immutable-5.x
Closed

chore(deps): update dependency immutable to v5#1918
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/immutable-5.x

Conversation

@renovate

@renovate renovate Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
immutable (source) >=4.3.9 <5<6 age confidence

Release Notes

immutable-js/immutable-js (immutable)

v5.1.9

Compare Source

  • fix(List): a List grown past 32 elements while all its values are undefined no longer reads those values back as null (affected get, iteration, toArray, equals and hashCode)

v5.1.8

Compare Source

v5.1.7

Compare Source

v5.1.6

Compare Source

  • fix(reverseFactory): read reversedSequence.size in __iterator instead of this #​2196

v5.1.5

Compare Source

  • Fix Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in immutable

v5.1.4

Compare Source

Documentation
Internal

v5.1.3

Compare Source

TypeScript
Documentation

There has been a huge amount of changes in the documentation, mainly migrate from an autogenerated documentation from .d.ts file, to a proper documentation in markdown.
The playground has been included on nearly all method examples.
We added a page about browser extensions too: https://immutable-js.com/browser-extension/

Internal

v5.1.2

Compare Source

v5.1.1

Compare Source

  • Fix type copying

v5.1.0

Compare Source

Internal

v5.0.3

Compare Source

v5.0.2

Compare Source

  • Fix wrong path for esm module after fix in 5.0.1

v5.0.1

Compare Source

v5.0.0

Compare Source

Breaking changes

To sum up, the big change in 5.0 is a Typescript change related to Map that is typed closer to the JS object. This is a huge change for TS users, but do not impact the runtime behavior. (see Improve TypeScript definition for Map for more details)

Other breaking changes are:

[BREAKING] Remove deprecated methods:

Released in 5.0.0-rc.1

  • Map.of('k', 'v'): use Map([ [ 'k', 'v' ] ]) or Map({ k: 'v' })
  • Collection.isIterable: use isIterable directly
  • Collection.isKeyed: use isKeyed directly
  • Collection.isIndexed: use isIndexed directly
  • Collection.isAssociative: use isAssociative directly
  • Collection.isOrdered: use isOrdered directly
[BREAKING] OrdererMap and OrderedSet hashCode implementation has been fixed

Released in 5.0.0-rc.1

Fix issue implementation of hashCode for OrdererMap and OrderedSet where equal objects might not return the same hashCode.

Changed in #​2005

[BREAKING] Range function needs at least two defined parameters

Released in 5.0.0-beta.5

Range with undefined would end in an infinite loop. Now, you need to define at least the start and end values.

If you need an infinite range, you can use Range(0, Infinity).

Changed in #​1967 by @​jdeniau

[Minor BC break] Remove default export

Released in 5.0.0-beta.1

Immutable does not export a default object containing all it's API anymore.
As a drawback, you can not immport Immutable directly:

- import Immutable from 'immutable';
+ import { List, Map } from 'immutable';

- const l = Immutable.List([Immutable.Map({ a: 'A' })]);
+ const l = List([Map({ a: 'A' })]);

If you want the non-recommanded, but shorter migration path, you can do this:

- import Immutable from 'immutable';
+ import * as Immutable from 'immutable';

  const l = Immutable.List([Immutable.Map({ a: 'A' })]);
[TypeScript Break] Improve TypeScript definition for Map

Released in 5.0.0-beta.1

If you do use TypeScript, then this change does not impact you : no runtime change here.
But if you use Map with TypeScript, this is a HUGE change !
Imagine the following code

const m = Map({ length: 3, 1: 'one' });

This was previously typed as Map<string, string | number>

and return type of m.get('length') or m.get('inexistant') was typed as string | number | undefined.

This made Map really unusable with TypeScript.

Now the Map is typed like this:

MapOf<{
  length: number;
  1: string;
}>;

and the return type of m.get('length') is typed as number.

The return of m.get('inexistant') throw the TypeScript error:

Argument of type '"inexistant"' is not assignable to parameter of type '1 | "length"

If you want to keep the old definition

This is a minor BC for TS users, so if you want to keep the old definition, you can declare you Map like this:

const m = Map<string, string | number>({ length: 3, 1: 'one' });
If you need to type the Map with a larger definition

You might want to declare a wider definition, you can type your Map like this:

type MyMapType = {
  length: number;
  1: string | null;
  optionalProperty?: string;
};
const m = Map<MyMapType>({ length: 3, 1: 'one' });

Keep in mind that the MapOf will try to be consistant with the simple TypeScript object, so you can not do this:

Map({ a: 'a' }).set('b', 'b');
Map({ a: 'a' }).delete('a');

Like a simple object, it will only work if the type is forced:

Map<{ a: string; b?: string }>({ a: 'a' }).set('b', 'b'); // b is forced in type and optional
Map<{ a?: string }>({ a: 'a' }).delete('a'); // you can only delete an optional key
Are all Map methods implemented ?

For now, only get, getIn, set, update, delete, remove, toJS, toJSON methods are implemented. All other methods will fallback to the basic Map definition. Other method definition will be added later, but as some might be really complex, we prefer the progressive enhancement on the most used functions.

Fixes
Internal

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday (* 0-4,22-23 * * 1-5)
    • Only on Sunday and Saturday (* * * * 0,6)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


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

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner August 12, 2026 23:23
@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5c3feb8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nimbus-documentation Ready Ready Preview Aug 17, 2026 7:45am
nimbus-storybook Ready Ready Preview Aug 17, 2026 7:45am

Request Review

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Last updated: 2026-08-17 07:44:24 UTC

Package Format Current Baseline Delta Status
@commercetools/nimbus dist 18950.9 KB 18950.9 KB +0.0% ✅ ok
@commercetools/nimbus-icons dist 4787.6 KB 4787.6 KB +0.0% ✅ ok
@commercetools/nimbus-tokens dist 408.9 KB 408.9 KB +0.0% ✅ ok

Baseline source: comment-chain

@chromatic-com

chromatic-com Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tip

All tests passed and all changes approved!

🟢 UI Tests: 1207 tests unchanged
🟢 UI Review: 1207 stories published -- no changes
Storybook icon Storybook Publish: 1207 stories published

@misama-ct

Copy link
Copy Markdown
Collaborator

Closing — two problems.

1. It drops the security floor. ">=4.3.9 <5""<6". The >=4.3.9 is the entire reason this override exists (GHSA-xvcm-6775-5m9r / GHSA-v56q-mh7h-f735 — hash-collision algorithmic-complexity DoS in Immutable.Map/Set). The replacement only caps the ceiling; it no longer encodes a patched floor.

2. The <5 cap is deliberate, and green CI is not evidence here. immutable's only consumers in this tree are @commercetools-uikit/localized-rich-text-input@20.6.7 and @commercetools-uikit/rich-text-input@20.6.7 — neither is exercised by our unit or Storybook suites. This is the same blind spot that let the minimatch v10 break ship in #1904 and get reverted in #1913.

Alternative if we do want immutable 5: make it a deliberate change that keeps the floor

immutable: ">=5.0.0 <6"

— after verifying UI Kit rich-text-input against v5. Renovate can't make that call for us, which is why #1928 suppresses majors on override bands rather than letting this land automatically.

@renovate

renovate Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 5.x releases. But if you manually upgrade to 5.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate
renovate Bot deleted the renovate/immutable-5.x branch August 18, 2026 07:33
ByronDWall pushed a commit that referenced this pull request Aug 18, 2026
…downgrade (#1928)

Renovate opened seven dependency PRs that must never merge. Six of them
(#1917 #1918 #1919 #1920 #1923 #1924) bump pnpm override entries across a
major boundary. Those keys are selectors, not package names: "yaml@1"
means "consumers resolving to yaml v1 get this patched v1", so raising the
value to 2.9.0 forces a v2 API onto v1 consumers. Two are already red in
CI ("TypeError: expand is not a function" for brace-expansion@2 -> ^5.0.0,
and gray-matter's yaml.safeLoad.bind() for js-yaml ^3.15.0 -> ^5.0.0); the
rest are green only because CI never exercises the affected transitive
consumers -- the same blind spot that let #1904 ship the minimatch v10
break that #1913 had to revert, and which #1920 now proposes again.

Renovate also rewrites floor+cap ranges into bare caps
(immutable ">=4.3.9 <5" -> "<6", undici ">=7.28.0 <8" -> "<9"), discarding
the security floor that justified the override.

Suppress majors on override depTypes. Minor/patch still flow so floors can
be raised, and CVE remediation is unaffected because vulnerabilityAlerts
already bypasses packageRules.

Separately, #1915 proposed a tj-actions/changed-files digest "update" that
is really a 7-month downgrade: upstream never moved the floating v47 tag
past v47.0.0, so Renovate resolved our newer v47.0.6 pin backwards.
Retagging the pin comment to the exact patch restores semver comparison.
Audited all nine pinned actions; this was the only one affected.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant