Skip to content

chore: upgrade pino to v10.1.0 and pino-http to v11.0.0#41

Open
erickhun wants to merge 3 commits intomainfrom
upgrade-pino
Open

chore: upgrade pino to v10.1.0 and pino-http to v11.0.0#41
erickhun wants to merge 3 commits intomainfrom
upgrade-pino

Conversation

@erickhun
Copy link
Collaborator

@erickhun erickhun commented Oct 28, 2025

Upgrades pino from v5.17.0 to v10.1.0 and pino-http from v5.0.0 to v11.0.0 to bring the library up to date with the latest versions.

Changes

Dependencies

  • Upgraded pino from ^5.16.0 to 10.1.0 (5 major versions)
  • Upgraded pino-http from ~5.0.0 to 11.0.0 (6 major versions)
  • Removed unused redact-object dependency (now using pino's built-in redaction exclusively)

Code Changes

  • Migrated from CommonJS require() to ES6 imports for consistency
  • Updated middleware signature to support pino-http v11.x (now accepts 3 parameters: _req, res, err)
  • Removed base: {} configuration (no longer needed)
  • Cleaned up unused sanitization code
  • Simplified logging functions to use pino's built-in redaction

Testing

  • Added comprehensive test suite with Jest (10 tests)
  • Added redaction validation tests to ensure sensitive data is properly masked

No Breaking Changes

None - The API remains 100% backward compatible. All existing consumers can upgrade
without code changes.

Backward Compatibility

  • ✅ All existing logging methods work identically (debug, info, notice, warning,
    error, critical)
  • ✅ Middleware usage remains unchanged
  • ✅ Redaction functionality preserved and validated
  • ✅ Custom log levels (including "notice") continue to work
  • ✅ Datadog trace injection compatibility maintained

Testing

  • Validated redaction of sensitive fields (headers, cookies, passwords)

Version

Bumped from 0.6.0 → 0.7.0

Summary by CodeRabbit

  • New Features

    • Reworked logging and middleware to a modern logger integration while preserving the public API surface.
  • Tests

    • Added comprehensive tests covering logging behavior and redaction across nested request/context shapes; verifies sensitive fields are masked and other fields preserved.
  • Chores

    • Updated runtime and test tooling, added Jest/TypeScript test setup, adjusted TypeScript config, and bumped package version to 0.7.0.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants