Repository navigation
feat: default request-body masks, EOPT-safe types and doc fixes (v1.3.0) - #4
Merged
Merged
Conversation
Request logger: - Mask common credential fields in request bodies by default (DEFAULT_MASKED_BODY_KEYS), with the same semantics as the header and query masks: omitted means the defaults, an array replaces them, and false or [] turns masking off. - Export the frozen body, header and query default lists so an application can extend them. - Warn once at creation when includeRequestBody, includeRequestHeaders, includeResponseHeaders or enrich capture data that nothing writes (no includeHttpContext and no custom messageBuilder). Types: - Every optional data property of the public interfaces accepts an explicit undefined, so Express, Router and node:http mounts, and possibly-undefined option values, compile under exactOptionalPropertyTypes without a cast. A type-level spec compiles consumer fixtures with the flag on. Fixes: - An explicit undefined rotation maxSize / maxFiles, or a null rotation, now means the documented default instead of disabling the size cap and retention; audit-file names stay stable. - Under --unhandled-rejections=strict a rejection is recorded once. It is still recorded at once as the uncaughtException Node raises, and the paired rejection event is skipped. ES-module entry errors are recorded exactly as before. Docs: - Correct the stale level "http" JSDoc, the nonexistent includeRequestBody allow list, and the README middleware examples. Document the mount-order trade-off, the crash-exit interplay with your own handlers and with --unhandled-rejections, and the Quick Start defaults.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Request logger:
(DEFAULT_MASKED_BODY_KEYS), with the same semantics as the header and
query masks: omitted means the defaults, an array replaces them, and
false or [] turns masking off.
application can extend them.
includeResponseHeaders or enrich capture data that nothing writes
(no includeHttpContext and no custom messageBuilder).
Types:
explicit undefined, so Express, Router and node:http mounts, and
possibly-undefined option values, compile under
exactOptionalPropertyTypes without a cast. A type-level spec compiles
consumer fixtures with the flag on.
Fixes:
now means the documented default instead of disabling the size cap
and retention; audit-file names stay stable.
still recorded at once as the uncaughtException Node raises, and the
paired rejection event is skipped. ES-module entry errors are recorded
exactly as before.
Docs:
allow list, and the README middleware examples. Document the mount-order
trade-off, the crash-exit interplay with your own handlers and with
--unhandled-rejections, and the Quick Start defaults.
Version bump to 1.3.0 and CHANGELOG promotion (
[1.3.0] - 2026-09-28) are included.Local gates:
npm run verify(Node 24) all five PASS; full jest suite with coverage on Node 18.20.8 and 22.23.2: 1149 passed, 1 skipped (the win32-only case), 100% coverage.