# What changed in seroval

> 33 changes in seroval 1 from its official release notes, upgrade guides and advisories: 8 breaking, 2 deprecations, 1 security, 8 new APIs and options. Each one cited. Sources checked 2026-10-28. HTML: https://unstale.sh/npm/seroval/

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

## seroval 1

### Breaking changes

- `serialize`, `toJSON`, `crossSerialize` and `toCrossJSON` now throw for values containing an async iterable or a `ReadableStream`; use an async or streaming function to send them. (1.7.1) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.1)
- `serialize`, `toJSON`, `crossSerialize` and `toCrossJSON` now send an ended `createStream` stream with all its events; open or live streams throw. (1.7.1) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.1)
- Now throws when the value contains a promise, like serialize already did; use an async or streaming function to send promises. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Disposing the stream no longer invokes onDone; disposal abandons output, so callers that close a response in onDone must also close it when disposing. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Raise the supported Node.js floor from >=10 to >=20. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Streams serialized from a live stream in streaming mode now use a receiver that retains history only until its first listener subscribes, then forwards values without retaining them and refuses a second listener. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Now throws when the value contains a promise, like serialize already did; use an async or streaming function to send promises. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Now throws when the value contains a promise, like serialize already did; use an async or streaming function to send promises. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)

### Security

- Honor depthLimit in every serializer entry point and in fromJSON. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)

### Deprecations

- Mark as deprecated; it has no effect. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Mark as deprecated; it has no effect. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)

### New APIs and options

- Add this option to crossSerialize and crossSerializeAsync to store only values read more than once in $R, shortening output when no later script refers back to them. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Add a session for cross-reference JSON records that tracks unsettled promises and open streams, reports pending counts, and can abort them with a caller-supplied reason. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Add a single-consumer stream that holds one event at a time and resolves producer writes only after the serialized record is accepted. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Export the option type for serializeAsync. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Export the option type for serialize. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Add an optional plugin field; when true, the plugin is not tested against plain objects, speeding parsing when most values are plain objects. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Export the option type for toJSONAsync. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Export the option type for toJSON. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)

### Behavior and default changes

- Async iterables and ReadableStream values read the next chunk only after the previous record is accepted. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Callbacks may return promises; records are emitted in order with one callback at a time, and completion waits for the last callback. Output failure prevents onDone, while cleanup runs every callback once. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Callbacks may return promises; records are emitted in order with one callback at a time, and completion waits for the last callback. Output failure prevents onDone, while cleanup runs every callback once. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)

### Fixes and other changes

- Rejected promises that the caller never reads, including promises rejected by abort, no longer cause unhandled rejections; awaiting the promise still receives the rejection. (1.7.1) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.1)
- serialize and serializeAsync no longer add an unused placeholder variable to every payload containing a Map; a plain Map serializes to new Map([...]). (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Preserve reserved own property names in cyclic objects and retain Error __proto__ data properties without changing their prototypes. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- A failed write stops only that write; sibling streams and subsequent writes remain active. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Report a node id assigned twice with SerovalConflictedNodeIdError. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Failures raised while emitting output are now wrapped in SerovalSerializationError. (1.7.0) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/seroval%401.7.0)
- Uses the element length for bigint typed array views. (1.5.5) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/v1.5.5)
- Preserves own __proto__ properties through serialization. (1.5.5) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/v1.5.5)
- Preserves circular own __proto__ properties through deferred assignment. (1.5.5) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/v1.5.5)
- Unescapes regexp source in the serialized output. (1.5.5) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/v1.5.5)
- Fixes cleanup during streaming serialization. (1.5.5) — [release notes](https://github.com/lxsmnsyc/seroval/releases/tag/v1.5.5)
