mimic-response is a Node.js utility that mimics an HTTP response stream by copying key response properties and behavior from one stream to another. It is useful when you need to create a stream that behaves like a `http.IncomingMessage` for testing, mocking, or stream handling.
Project status
- Maintenance status: The repo appears quiet/dormant as of 2026-08-13, with the last upstream push on 2023-11-05 and the most recent tagged updates in v4.0.0 (2021-08-11).
- Update/release cadence: After the major v4.0.0 update in 2021, there have been no further versioned updates shown in the provided history, indicating a very low cadence over the last several years.
AI summary generated
Recent updates
v4.0.0
v4.0.0 is a major release that modernizes the package for newer Node.js environments. The release notes call out the Node.js minimum version and that the package is now pure ESM.
Breakingv3.1.0
v3.1.0 introduces proxying of stream lifecycle events from the source response stream to the destination stream. The release notes only mention this event proxying at a high level.
Featuresv3.0.0
v3.0.0 drops support for Node.js < 10 and changes how properties from the original IncomingMessage are exposed on the mimicked response stream, moving to getter and setter based proxying. The implementation also adds event bridging and changes which IncomingMessage members are copied to the target stream.
Breakingv2.1.0
Release v2.1.0 primarily adds a TypeScript definition for mimic-response and updates the test setup to validate the typings. The runtime implementation also changes slightly, including returning the destination stream from the function.
Featuresv2.0.0
v2.0.0 introduces a breaking runtime requirement, raising the minimum supported Node.js version to 8. It also updates the set of known properties used by the library.
Breaking