Skip to content

fix: handle sev logger esm callsites#131

Merged
kvz merged 1 commit into
mainfrom
sev-callsite
May 28, 2026
Merged

fix: handle sev logger esm callsites#131
kvz merged 1 commit into
mainfrom
sev-callsite

Conversation

@kvz
Copy link
Copy Markdown
Member

@kvz kvz commented May 28, 2026

Why

A clean install of @transloadit/sev-logger@1.0.0 could import the package, but actually logging with the default callsite formatter threw Could not get dirname when Node emitted file:// ESM stack frames. This patch fixes the runtime path detection and releases 1.0.1.

What changed

  • Use the module's import.meta.filename as the logger's own file path instead of parsing it from a stack trace.
  • Keep normalizing file:// callsite paths before formatting them.
  • Add a regression test that calls notice() with callsite detection enabled.
  • Version @transloadit/sev-logger to 1.0.1 with a changelog entry.

Verification

  • corepack yarn install --immutable
  • corepack yarn dedupe --check
  • corepack yarn check
  • corepack yarn npm audit --recursive --all
  • git diff --check
  • Local built dist smoke test that imports @transloadit/sev-logger and calls notice()

@kvz kvz merged commit 800f0b8 into main May 28, 2026
2 checks passed
@kvz kvz deleted the sev-callsite branch May 28, 2026 15:10
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.

1 participant