unstale

npm / p-map

p-map

What changed in p-map 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

2 breaking5 new APIs and options2 performance1 behavior and defaults18 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

p-map 728 changes

Breaking changes 2

  • Nullish input now produces the same TypeError as any other invalid input.

    7.1.0release notes

  • When a source settles next() calls out of call order, the index and result position now follow the order of those calls; with stopOnError: false, AggregateError errors are in input order.

    7.1.0release notes

New APIs and options 5

  • Adds preserveOrder; set it to false to receive each result as soon as it is ready instead of in input order.

    7.1.0release notes

  • Adds mapping of the values of an object or a Map.

    7.1.0release notes

  • Adds a mapper-based settled mapping API with a concurrency limit.

    7.1.0release notes

  • Adds settled mapping of the values of an object or a Map.

    7.1.0release notes

  • Adds a way to stop iterating from the mapper, like break in a loop.

    7.1.0release notes

Performance 2

  • Reduces promise overhead for each element.

    7.1.0release notes

  • Consumes results in linear time instead of O(n²) when backpressure lets many results wait.

    7.1.0release notes

Behavior and default changes 1

  • Reads ahead while mappers run when backpressure is above concurrency; with the default backpressure, behavior is unchanged.

    7.1.0release notes

Fixes and other changes 18

  • Subscribe only once to a thenable returned by an async source next() call.

    7.1.1release notes

  • Mapper errors now keep the caller in the stack trace.

    7.1.0release notes

  • pMapSkip results now count toward backpressure, preventing further reads beyond the allowed limit when a mapper skips most elements.

    7.1.0release notes

  • Results before a mapper error are yielded first instead of being dropped while they are still being read.

    7.1.0release notes

  • Stops pulling and mapping input after return() or throw() while a next() call is pending.

    7.1.0release notes

  • No longer hangs when the source blocks in next() after it is exhausted.

    7.0.8release notes

  • Does not settle early when the source iterator throws with stopOnError set to false.

    7.0.8release notes

  • Uses the async iterator when the input provides both sync and async iterators.

    7.0.8release notes

  • Closes the source iterator when the mapper rejects.

    7.0.8release notes

  • No longer calls next() on an exhausted source iterator.

    7.0.8release notes

  • Does not call the mapper for input arriving after iteration has stopped.

    7.0.8release notes

  • Does not call return() on an exhausted source iterator.

    7.0.8release notes

  • Closes the source iterator when iteration stops early.

    7.0.8release notes

  • Stops pulling input after the consumer stops iterating.

    7.0.8release notes

  • Fixes an unhandled rejection when an abandoned pMapIterable worker's next() rejects.

    7.0.7release notes

  • Fixes cleanup of abort listeners when signals are already aborted.

    7.0.6release notes

  • Fixes the mapper index for out-of-order promise inputs.

    7.0.5release notes

  • Concurrency control in pMapIterable is fixed.

    7.0.4release notes