Skip to content

5.4.0 - #387

Merged
terehov merged 6 commits into
masterfrom
development
Oct 18, 2026
Merged

5.4.0#387
terehov merged 6 commits into
masterfrom
development

Conversation

@terehov

@terehov terehov commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Release 5.4.0.

Added

  • Custom pretty placeholders — pretty.placeholders registers custom {{token}}s for pretty.template, styled through pretty.styles like the built-in ones. Only referenced tokens run, a throwing callback renders empty, built-in names are reserved, sub-loggers inherit the parent's map; meta template only. (Support custom pretty placeholders #386, thanks @clayzx)
  • pretty.styles key validation — a misspelled style key warns in development with a did-you-mean, or throws TslogConfigError (UNKNOWN_PRETTY_STYLE) under strictConfig.

Changelog

Also records 5.3.0 as a dependency-only release (functionally identical to 5.2.0) and dates the 5.4.0 entry.

Fixes #381

terehov and others added 6 commits October 18, 2026 22:04
Callbacks may return numbers as well as strings. IPrettyLogStyles now
accepts any key so custom tokens can be styled, so a misspelled built-in
key is reported at runtime instead (UNKNOWN_PRETTY_STYLE, with a
did-you-mean; throws under strictConfig). KNOWN_PRETTY_PLACEHOLDERS moves
to internal/ so metaFormatting no longer imports core/settings. Docs land
in the README pretty section, RECIPES 16 and the llms.txt pretty bullet;
the browser bundle budget grows to 23_000 for the feature.
…holders

Support custom pretty placeholders
@terehov
terehov merged commit 3e51acd into master Oct 18, 2026
20 checks passed
@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4374e42) to head (c4472b3).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #387   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           53        54    +1     
  Lines         4632      4660   +28     
  Branches      1417      1433   +16     
=========================================
+ Hits          4632      4660   +28     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Feature request: custom pretty placeholders

2 participants