You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Pino type imports and destination in evals logger
Summary
• Fixes TypeScript typechecking errors in evals/logger.ts where pino.destination and pino.LogFn caused 3 tsc compilation failures:
Property 'destination' does not exist on type 'typeof pino'
Namespace 'pino.pino' has no exported member 'LogFn' (x2)
• In Pino v9, pino.destination resides on the default export (import pino from 'pino'), while LogFn is exported directly as a top-level type (import { type LogFn } from 'pino').
• Updates logger.ts to import pino, { type LogFn } from 'pino' and reference Record<LogLevel, LogFn>.
• Unlocks clean bun run --cwd evals typecheck (0 errors) across the evaluation benchmark harness.
Test plan
[✓] Ran bun run --cwd evals typecheck — 0 errors (previously 3 errors in logger.ts)
[✓] Verified runtime logging functions normally with pino.destination
Nice, minimal fix. Importing pino as a default export and pulling LogFn as a named type export matches Pino v9's actual module shape, and this correctly resolves the pino.LogFn / pino.destination typecheck errors described. The change is scoped exactly to the broken lines, doesn't touch unrelated code, and the reasoning in the PR body (namespace vs default export split in v9) is accurate and testable.
A couple of things worth double-checking before porting: it would help to confirm this doesn't break any other file that still does import { pino } from 'pino' expecting the old destructured shape - a quick repo-wide grep for from 'pino' would give confidence there's no ripple effect. Also, evals/logger.ts isn't covered by any existing tests, so the verification here rests on tsc passing plus manual runtime check - that's reasonable for a type-only fix but worth noting to whoever ports it.
Overall this is a legitimate, well-explained bugfix that's easy to review and low risk to port by hand.
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
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.
Fix Pino type imports and destination in evals logger
Summary
• Fixes TypeScript typechecking errors in
evals/logger.tswherepino.destinationandpino.LogFncaused 3tsccompilation failures:Property 'destination' does not exist on type 'typeof pino'Namespace 'pino.pino' has no exported member 'LogFn'(x2)• In Pino v9,
pino.destinationresides on the default export (import pino from 'pino'), whileLogFnis exported directly as a top-level type (import { type LogFn } from 'pino').• Updates
logger.tsto importpino, { type LogFn } from 'pino'and referenceRecord<LogLevel, LogFn>.• Unlocks clean
bun run --cwd evals typecheck(0 errors) across the evaluation benchmark harness.Test plan
[✓] Ran
bun run --cwd evals typecheck— 0 errors (previously 3 errors inlogger.ts)[✓] Verified runtime logging functions normally with
pino.destination