@warlock.js/logger 4.2.10 → 4.3.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 +58 -52
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,52 +1,58 @@
1
- # Changelog — @warlock.js/logger
2
-
3
- All notable changes to `@warlock.js/logger` are documented in this file.
4
-
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
-
7
- ## [Unreleased]
8
-
9
- ## 4.2.10
10
-
11
- ### Changed
12
-
13
- - `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.
14
-
15
- ## 4.2.9
16
-
17
- ### Changed
18
-
19
- - `ConsoleLog` output is retuned for scannability:
20
- - **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.
21
- - 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.
22
- - **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.
23
- - **`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).
24
-
25
- ## 4.2.8
26
-
27
- ### Changed
28
-
29
- - `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.
30
-
31
- ## 4.2.0
32
-
33
- ### Added
34
-
35
- - `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.
36
- - `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`.
37
- - `log.fatal()` + `fatal` log level — ranked strictly above `error` for unrecoverable failures (failed bootstrap, `uncaughtException`). Does not auto-flush or exit; caller decides.
38
- - `ConsoleLog` renders `fatal` with a `☠` icon on a bright-red background and bold red-bright message, distinct from `error`'s `✗`.
39
-
40
- ### Changed
41
-
42
- - `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`.
43
- - `LoggingData.type` is now typed as `LogLevel` (was a duplicated inline union — code-standards cleanup).
44
- - `LogContract` and the `LogChannel` base now expose an optional `flush?()` alongside the existing `flushSync?()`.
45
-
46
- ### Fixed
47
-
48
- - `@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.
49
-
50
- ## 4.1.15
51
-
52
- - Baseline — per-package changelog tracking starts at this version.
1
+ # Changelog — @warlock.js/logger
2
+
3
+ All notable changes to `@warlock.js/logger` are documented in this file.
4
+
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
+
7
+ ## [Unreleased]
8
+
9
+ ## 4.2.11
10
+
11
+ ### Changed
12
+
13
+ - Bumped `@mongez/reinforcements` to 3.3.0
14
+
15
+ ## 4.2.10
16
+
17
+ ### Changed
18
+
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.
20
+
21
+ ## 4.2.9
22
+
23
+ ### Changed
24
+
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).
30
+
31
+ ## 4.2.8
32
+
33
+ ### Changed
34
+
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.
36
+
37
+ ## 4.2.0
38
+
39
+ ### Added
40
+
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 `✗`.
45
+
46
+ ### Changed
47
+
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?()`.
51
+
52
+ ### Fixed
53
+
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.
55
+
56
+ ## 4.1.15
57
+
58
+ - Baseline — per-package changelog tracking starts at this version.
package/package.json CHANGED
@@ -16,15 +16,15 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@mongez/copper": "^2.1.2",
19
- "@mongez/reinforcements": "^3.2.0",
20
- "@warlock.js/fs": "4.2.10",
19
+ "@mongez/reinforcements": "^3.3.0",
20
+ "@warlock.js/fs": "4.3.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.2.10",
27
+ "version": "4.3.0",
28
28
  "main": "./cjs/index.cjs",
29
29
  "module": "./esm/index.mjs",
30
30
  "types": "./esm/index.d.mts",