npm / remeda
remeda
What changed in remeda 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-14.
12 breaking3 new APIs and options3 performance1 behavior and defaults1 tooling82 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initremeda 2102 changes
Breaking changes 12
Reverts the arity parameter on purry.
Disjoint literal suffixes are rejected at compile time.
Narrows the callback data parameter type for lazy evaluators.
The runtime implementation and semantics were adjusted to handle edge cases more consistently.
compactwas removed because it can be replaced withfilter(isTruthy).toPairsis now namedentriesto align function names with ECMAScript standards.Call
identitywith no parameters to get its dataLast implementation.The indexed variants are merged into base functions, with indexed parameters as defaults.
Remeda is now compiled with a target of ES2022.
Call
keyswith no parameters to get its dataLast implementation.The strict variants are merged into base functions, with improved typing as the default.
The minimum supported TypeScript version is now 5.1.
New APIs and options 3
Adds pendingData to funnel's return value.
Adds hasProp to the API.
Adds a step parameter to the range function.
Performance 3
Utilities are faster because arguments are passed as parameters instead of arrays.
Pipe and utilities are faster after redundant work was removed.
Typechecking performance improved for large literal tuples passed to sample.
Behavior and default changes 1
Type-guards are the only functions that remain headless.
Tooling 1
The build now generates a monolithic type definition file.
Fixes and other changes 82
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
Handles __proto__ keys.
dropFirstBy now supports lazy evaluation.
dropLast now supports lazy evaluation.
dropWhile now supports lazy evaluation.
takeWhile now supports lazy evaluation.
Minor edge-case fixes.
pipe only evaluates lazily when a step can stop early.
In pipe, fractional and NaN counts now match data-first behavior.
In pipe, fractional and NaN counts now match data-first behavior.
In pipe, fractional and NaN counts now match data-first behavior.
The lazy evaluation engine used by pipe and purry was rewritten.
Missing values are handled differently than optional ones.
Fixes isNot to resolve trivial fixed-value conditions.
Rejects disjoint suffixes instead of disabling the return type.
Rejects disjoint prefixes instead of disabling the return type.
Disjoint literal prefixes are rejected at compile time.
Narrows the callback data parameter type for lazy evaluators.
Narrows the callback data parameter type for lazy evaluators.
Narrows the callback data parameter type for lazy evaluators.
Narrows the callback data parameter type for lazy evaluators.
Narrows the callback data parameter type for lazy evaluators.
Narrows the callback data parameter type for lazy evaluators.
Narrows the callback data parameter type for lazy evaluators.
Redesigned types for functions that accept type-narrowing predicates.
Redesigned types for functions that accept type-narrowing predicates.
Redesigned types for functions that accept type-narrowing predicates.
Redesigned types for functions that accept type-narrowing predicates.
Redesigned types for functions that accept type-narrowing predicates.
Redesigned types for functions that accept type-narrowing predicates.
Redesigned types for functions that accept type-narrowing predicates.
Redesigned types for functions that accept type-narrowing predicates.
Allows widening type predicates.
Supports type predicates that aren't subtypes of the item type.
Early returns can now short-circuit the pipe.
Objects are no longer shared between pipes.
Handles data-last usage with an empty parameter.
Handles data-last usage with an empty parameter.
Fixes handling of index signatures in prop.
ceil was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
evolve was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
floor was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
isDeepEqual was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
isShallowEqual was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
last was affected by manual fixes accompanying dependency updates; the notes do not specify the typing change.
mergeDeep was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
round was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
swapIndices was affected by manual fixes accompanying dependency updates; the notes do not specify the change.
Corrects types through NoInfer.
Corrects types through NoInfer.
Moves data-last inference to the curried data parameter, improving type inference for curried use.
Fixes a typing issue with union types.
isDeepEqual now allows null-prototype objects.
The Merge type was improved.
truncate now handles primitive inputs.
Avoids calling setTimeout with negative numbers.
Export symbols are now available when declarations are enabled with declarations: true.
Fixes mapKeys for a mapper with a single literal value.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Typing for optional tuple elements is refined when exactOptionalPropertyTypes is enabled.
Handles complex tuple inputs, unions, and unbounded keys.
Fixes union type narrowing for simple arrays.
Typing changes better reflect JavaScript's handling of
symbolandnumberkeys.