-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
This is a proposal to prepare and publish a new major release (v3.0.0) of on-finished.
Proposed Changes
- refactor: use stream.finished() instead of custom implementationΒ #56
-
use writableEnd instead finishedΒ #54merged into v2 - use writableEnded instead of deprecated finishedΒ #81
- Dropping Support for Node.js <18
- Dropping Support for Non-Stream Objects
- Refactor
isFinishedto use only modern public properties of HttpIncomingMessage and HttpOutgoingMessage - Support HTTP2
- feat: add typesΒ #69
- refactor: use Symbol for internal onFinished listener keyΒ #70
- feat: validate that passed
listeneris a functionΒ #72
π« Dropping Support for End-of-Life Node.js Versions
I propose updating the engines field to >=18, aligning with Express's current requirement. This would allow us to modernize the codebase by removing workarounds and compatibility layers for older Node.js versions.
As part of this, we would remove legacy runtime compatibility code, including:
- Conditional use of
async_hooksfor environments without stable support - Fallbacks such as
setImmediatetargeting pre-Node.js 10 environments - Special Handling for older Stream implementations
This cleanup simplifies the module, improves maintainability, and ensures consistent behavior across modern Node.js versions.
UlisesGasconUlisesGascon
Metadata
Metadata
Assignees
Labels
No labels