Skip to content

make it runtime-neutral - #36

Merged
maxholman[bot] merged 11 commits into
masterfrom
feat/14.0.0
Oct 13, 2026
Merged

maxholman[bot] merged 11 commits into
masterfrom
feat/14.0.0

Conversation

@maxholman

@maxholman maxholman Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The main entry is runtime-neutral and runs in Workers. createLogger() for stdout is in ./node.

Breaking

  • Sentry removed.
  • createLogger() moved from . to ./node.
  • AsyncLocalStorage context, express and lambda entries removed.
  • Ships TypeScript source.

Fixed

  • CloudWatch transformer mangled strings and numbers.
  • Each logger added 5 stdout listeners.
  • Options overrode the computed level and context.
  • CLI transformer printed the current time, not the log's.
  • Caller processor added nothing.

Release setup

  • npm trusted publisher: organisation block65, repository logger, workflow deploy.yml.
  • Approve releases with pnpm stage approve.

maxholman and others added 8 commits October 13, 2026 10:38
Co-Authored-By: LLM <noreply@block65.dev>
Lint, format and dead-code checks come from @block65/shared-config, with
type-aware linting through the Block65 oxlint builds. Tasks run from a
justfile, and the package ships its TypeScript source with no build.

Dependencies move to maintained equivalents that run outside Node:
@pinojs/redact for fast-redact, safe-stable-stringify for
fast-safe-stringify, and loupe with tinyrainbow for util.inspect and the
unpublished @block65/color.

Co-Authored-By: LLM <noreply@block65.dev>
The main entry point imports nothing from Node, so it bundles for Workers.
createLogger and the platform formats live in @block65/logger/node, which
re-exports the main entry point.

- the CLI transformer formats with loupe and tinyrainbow, takes
  { color, timestamps }, pads level labels outside the colour codes and
  prints the log's own time
- Level is a frozen object typed as a union of its values
- processors return a whole log; one that throws is skipped, and a
  transformer that throws drops that log, both reported as errors
- child loggers flush, end and destroy in parallel
- createLogger writes to stdout with write callbacks, keeps pid and
  hostname when context is given, and detects a TTY on stdout
- the redact processor redacts a copy, without eval
- the CloudWatch transformer keeps primitive data values intact
- the caller processor and the benchmark are removed: processors run
  after the call returns, so no call site was ever found

BREAKING CHANGE: Sentry support, the express and lambda entry points and
logger.als are removed. createLogger moves to @block65/logger/node.
Destinations are web WritableStreams. Level is no longer an enum. Event
listeners receive { name, data }. Node 24 or later is required.

Co-Authored-By: LLM <noreply@block65.dev>
The tests assert what each log, transformer and lifecycle call does instead
of pinning output. The Workers test bundles the main entry point the way
wrangler does, asserts no Node built-in, require or code generation, and
runs the bundle in a context that has web globals only.

Co-Authored-By: LLM <noreply@block65.dev>
Co-Authored-By: LLM <noreply@block65.dev>
Co-Authored-By: LLM <noreply@block65.dev>
Co-Authored-By: LLM <noreply@block65.dev>
Co-Authored-By: LLM <noreply@block65.dev>
@maxholman maxholman changed the title feat!: 14.0.0, a runtime-neutral logger make it runtime-neutral Oct 13, 2026
maxholman and others added 3 commits October 13, 2026 10:50
Closes #35

Co-Authored-By: LLM <noreply@block65.dev>
Closes #26

Co-Authored-By: LLM <noreply@block65.dev>
Co-Authored-By: LLM <noreply@block65.dev>
@maxholman
maxholman Bot merged commit 18aff49 into master Oct 13, 2026
2 checks passed
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