# What changed in p-map

> 28 changes in p-map 7 from its official release notes, upgrade guides and advisories: 2 breaking, 5 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/p-map/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## p-map 7

### Breaking changes

- Nullish input now produces the same `TypeError` as any other invalid input. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- 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.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)

### New APIs and options

- Adds `preserveOrder`; set it to `false` to receive each result as soon as it is ready instead of in input order. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- Adds mapping of the values of an object or a `Map`. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- Adds a mapper-based settled mapping API with a concurrency limit. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- Adds settled mapping of the values of an object or a `Map`. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- Adds a way to stop iterating from the mapper, like `break` in a loop. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)

### Performance

- Reduces promise overhead for each element. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- Consumes results in linear time instead of O(n²) when backpressure lets many results wait. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)

### Behavior and default changes

- Reads ahead while mappers run when `backpressure` is above `concurrency`; with the default `backpressure`, behavior is unchanged. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)

### Fixes and other changes

- Subscribe only once to a thenable returned by an async source next() call. (7.1.1) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.1)
- Mapper errors now keep the caller in the stack trace. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- `pMapSkip` results now count toward backpressure, preventing further reads beyond the allowed limit when a mapper skips most elements. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- Results before a mapper error are yielded first instead of being dropped while they are still being read. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- Stops pulling and mapping input after `return()` or `throw()` while a `next()` call is pending. (7.1.0) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.1.0)
- No longer hangs when the source blocks in next() after it is exhausted. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Does not settle early when the source iterator throws with stopOnError set to false. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Uses the async iterator when the input provides both sync and async iterators. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Closes the source iterator when the mapper rejects. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- No longer calls next() on an exhausted source iterator. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Does not call the mapper for input arriving after iteration has stopped. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Does not call return() on an exhausted source iterator. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Closes the source iterator when iteration stops early. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Stops pulling input after the consumer stops iterating. (7.0.8) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.8)
- Fixes an unhandled rejection when an abandoned pMapIterable worker's next() rejects. (7.0.7) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.7)
- Fixes cleanup of abort listeners when signals are already aborted. (7.0.6) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.6)
- Fixes the mapper index for out-of-order promise inputs. (7.0.5) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.5)
- Concurrency control in pMapIterable is fixed. (7.0.4) — [release notes](https://github.com/sindresorhus/p-map/releases/tag/v7.0.4)
