Key Points
- normalize backslashes in serve-static
- export Context class publicly
- add compress contentTypeFilter option
Summary
v4.12.23 (2026-05-25) is a minor maintenance release that includes bug fixes, a small public API export, a new compression option, and documentation updates. It addresses Windows path normalization for static serving, an IPv6 formatting edge case, and adds configurability to the compression middleware.
Key Points
- fix(serve-static): normalize all backslashes in file paths (Windows) — ensures consistent handling of paths that contain multiple backslashes; no API change but may affect custom path-normalization logic.
- feat(context): export the Context class publicly — Context can now be imported directly for typing, subclassing, or advanced use cases.
- feat(compress): add contentTypeFilter option and re-export COMPRESSIBLE_CONTENT_TYPE_REGEX — allows supplying a custom filter or regex to control which responses are compressed.
- fix(utils/ipaddr): do not compress a single 0 group to :: — fixes an IPv6 formatting edge case that produced incorrect compressed addresses.
- docs(contribution): add AI Usage Policy and minor changelog updates.
Contributors: yusukebe, na-trium-144, BlankParticle.
Upgrade notes:
- No breaking changes reported. Review any code that relied on previous backslash normalization or the old IPv6 string output. If you need custom compression behavior, configure the new contentTypeFilter option.