hazo_ui 3.0.1 → 3.1.1

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.
package/CHANGE_LOG.md CHANGED
@@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## v3.1.1 — 2026-05-30
9
+
10
+ **Fix:** Bundling failure when hazo_ui is consumed by a Next.js client component.
11
+
12
+ `src/utils/logger.ts` did `import { createLogger } from "hazo_core"` at module
13
+ top-level. hazo_core's package exports route browser bundles to its
14
+ `index.client.js`, which intentionally omits `createLogger` (the factory loads
15
+ hazo_logs dynamically, which is Node-only). Static named-import failed bundle
16
+ resolution for every downstream consumer that pulled hazo_ui into a client
17
+ component, including transitively via `hazo_auth/client`.
18
+
19
+ Switched to a namespace import + runtime feature check. When `createLogger` is
20
+ present (server bundle), the structured logger is used; otherwise the existing
21
+ `console_logger` fallback applies. No public API change.
22
+
23
+ Discovered during the gotimer Wave 3 consumer migration. Filing this as a
24
+ patch instead of a republish of 3.1.0 to preserve the published artifact's
25
+ hash for downstream auditability.
26
+
27
+ ## v3.1.0 — Wave 2 hazo_core wiring
28
+
29
+ **New:** `<HazoContextProvider>`, internal `get_logger` / `set_logger`,
30
+ `generateUUID`, renamed `dev-app/` → `test-app/`.
31
+
32
+ - **`<HazoContextProvider>`** — wrap the React tree once at the app root to
33
+ install a stable per-tab correlation ID into hazo_core's browser context.
34
+ Every downstream `getCorrelationId()`, `fetchWithRequestId()`, and
35
+ `HazoError` constructor sees the same ID (PRD §7).
36
+ - **`get_logger()` / `set_logger()`** — internal logger factory delegating
37
+ to `createLogger('hazo_ui')` from `hazo_core` (and through to
38
+ `hazo_logs`). Consumers needing to redirect package-internal logs can
39
+ override via `set_logger(custom_logger)`.
40
+ - **`generateUUID()`** — UUID helper backed by hazo_core's
41
+ `generateRequestId().slice(4)`. Use instead of `crypto.randomUUID()` so
42
+ IDs stay consistent with the rest of the workspace.
43
+ - **`hazo_core ^1.0.0`** is now a required peer dependency.
44
+ - **Test-harness fix:** `formatAsClaudePrompt` now uses `optional_import`
45
+ from `hazo_core` to look up `hazo_logs.getRingBuffer`. Behaviour is
46
+ identical; the call is now audit:duplicates-clean.
47
+ - **Rename `dev-app/` → `test-app/`** (workspace standard S6). All existing
48
+ component demo pages are preserved; a new "Harness Self-test" sidebar
49
+ section runs the five deferred Wave 1 scenarios for the test-harness
50
+ surface itself.
51
+
52
+ No breaking changes for consumers who only import from the public barrel.
53
+
8
54
  ## v3.0.0 — test-harness sub-export
9
55
 
10
56
  **New sub-export:** `hazo_ui/test-harness`