@warlock.js/logger 4.3.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +11 -17
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -4,8 +4,6 @@ All notable changes to `@warlock.js/logger` are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
6
6
 
7
- ## [Unreleased]
8
-
9
7
  ## 4.2.11
10
8
 
11
9
  ### Changed
@@ -16,42 +14,38 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
16
14
 
17
15
  ### Changed
18
16
 
19
- - `ConsoleLog`'s timestamp (and the `↳` context arrow) switch from bright-black `gray` to the 256-color neutral `slate`. Bright-black sits too close to the background on most terminal themes and reads muddy; `slate` is recessive but cleanly legible.
17
+ - `ConsoleLog`'s timestamp (and the `↳` context arrow) switch from bright-black `gray` to the 256-color `slate` recessive but cleanly legible where bright-black read muddy.
20
18
 
21
19
  ## 4.2.9
22
20
 
23
21
  ### Changed
24
22
 
25
- - `ConsoleLog` output is retuned for scannability:
26
- - **Time-only timestamp** (`HH:mm:ss.SSS`) instead of the full ISO string — within a dev session the date is just noise. Persistent channels (`FileLog` / `JSONFileLog`) still record the full ISO timestamp.
27
- - The timestamp moves from yellow to **gray** so the colored level + message lead the eye; `module` (cyan) and `action` (magenta) keep their colors for at-a-glance subsystem scanning.
28
- - **Aligned columns** — each level tag is padded to a fixed width so the timestamp / module / action columns line up vertically across a stream of logs.
29
- - **`fatal` is restored to a background badge** — white, bold text on a bright-red background (`☠ fatal`), the same column width as the other tags but deliberately louder than `error`'s plain red, so an unrecoverable failure can't be missed (4.2.8 had briefly flattened it to a plain label).
23
+ - `ConsoleLog` output retuned for scannability — a time-only `HH:mm:ss.SSS` timestamp dimmed to gray, fixed-width level tags so the columns align, and `fatal` restored to a white-on-bright-red background badge. (`FileLog` / `JSONFileLog` keep the full ISO timestamp.)
30
24
 
31
25
  ## 4.2.8
32
26
 
33
27
  ### Changed
34
28
 
35
- - `ConsoleLog` now prints the level name beside each level's icon `⚙ debug`, `ℹ info`, `⚠ warn`, `✗ error`, `✓ success`, `☠ fatal` so entries are readable at a glance without memorizing icons. `fatal` also switches from a bright-red **background** badge to a bold red-bright `☠ fatal` label, consistent with the other levels.
29
+ - `ConsoleLog` now prints each level's name beside its icon (`⚙ debug`, `ℹ info`, `⚠ warn`, `✗ error`, `✓ success`, `☠ fatal`) for at-a-glance reading.
36
30
 
37
31
  ## 4.2.0
38
32
 
39
33
  ### Added
40
34
 
41
- - `log.flush()` — awaitable async counterpart to `flushSync()`. Drains every channel that implements `flush()` via `Promise.allSettled` with per-channel isolation, so one channel's failure can't break shutdown. `FileLog` / `JSONFileLog` implement it; `ConsoleLog` writes synchronously and doesn't need it.
42
- - `SentryLog` channel — forwards entries to Sentry. `eventLevels` (`fatal` / `error` / `warn` by default) become events (`captureException` for `Error` messages, `captureMessage` otherwise); every other level becomes a breadcrumb. `module` / `action` are tags, `context` is a structured Sentry context. `@sentry/node` is an **optional peer**, lazily imported — pass an existing `client` or `options`.
43
- - `log.fatal()` + `fatal` log level — ranked strictly above `error` for unrecoverable failures (failed bootstrap, `uncaughtException`). Does not auto-flush or exit; caller decides.
44
- - `ConsoleLog` renders `fatal` with a `☠` icon on a bright-red background and bold red-bright message, distinct from `error`'s `✗`.
35
+ - `log.flush()` — awaitable async counterpart to `flushSync()`, draining every channel via `Promise.allSettled` with per-channel isolation. Implemented by `FileLog` / `JSONFileLog`.
36
+ - `SentryLog` channel — forwards entries to Sentry (`eventLevels` become events, others breadcrumbs; `module` / `action` as tags). `@sentry/node` is an optional, lazily-imported peer.
37
+ - `log.fatal()` + `fatal` level — ranked strictly above `error` for unrecoverable failures; does not auto-flush or exit.
38
+ - `ConsoleLog` renders `fatal` with a `☠` icon on a bright-red background, distinct from `error`'s `✗`.
45
39
 
46
40
  ### Changed
47
41
 
48
- - `captureAnyUnhandledRejection()` now escalates `uncaughtException` to `log.fatal` (was `log.error`). Node terminates the process by default, so it's semantically fatal — makes "page only on fatal" alerting clean. `unhandledRejection` stays at `error`.
49
- - `LoggingData.type` is now typed as `LogLevel` (was a duplicated inline union — code-standards cleanup).
50
- - `LogContract` and the `LogChannel` base now expose an optional `flush?()` alongside the existing `flushSync?()`.
42
+ - `captureAnyUnhandledRejection()` now escalates `uncaughtException` to `log.fatal` (was `error`); `unhandledRejection` stays at `error`.
43
+ - `LoggingData.type` is now typed as `LogLevel` (was a duplicated inline union).
44
+ - `LogContract` / `LogChannel` now expose an optional `flush?()` alongside `flushSync?()`.
51
45
 
52
46
  ### Fixed
53
47
 
54
- - `@sentry/node` is now referenced only via local minimal types + an indirect dynamic import, so source-served consumers (the package's `main` → `./src/index.ts`) no longer get a `TS2307: Cannot find module '@sentry/node'` when they (correctly) don't install the optional peer. Proven by pruning the SDK and running the full suite + `tsc --noEmit` clean.
48
+ - `@sentry/node` is referenced only via local types + an indirect dynamic import, so source-served consumers no longer get `TS2307: Cannot find module '@sentry/node'` when they don't install the optional peer.
55
49
 
56
50
  ## 4.1.15
57
51
 
package/package.json CHANGED
@@ -17,14 +17,14 @@
17
17
  "dependencies": {
18
18
  "@mongez/copper": "^2.1.2",
19
19
  "@mongez/reinforcements": "^3.3.0",
20
- "@warlock.js/fs": "4.3.0",
20
+ "@warlock.js/fs": "4.5.0",
21
21
  "dayjs": "^1.11.9",
22
22
  "safe-stable-stringify": "^2.5.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@sentry/node": "^8.0.0 || ^9.0.0 || ^10.0.0"
26
26
  },
27
- "version": "4.3.0",
27
+ "version": "4.5.0",
28
28
  "main": "./cjs/index.cjs",
29
29
  "module": "./esm/index.mjs",
30
30
  "types": "./esm/index.d.mts",