hazo_ui 3.1.0 → 3.1.2
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 +31 -0
- package/dist/index.cjs +4 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +5 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -5,6 +5,37 @@ 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.2 — 2026-05-30
|
|
9
|
+
|
|
10
|
+
**Fix (supersedes 3.1.1):** Drop the hazo_core import from the logger module
|
|
11
|
+
entirely.
|
|
12
|
+
|
|
13
|
+
3.1.1 switched to a namespace import + runtime `typeof` check, which works
|
|
14
|
+
under classic webpack and Node but fails under Turbopack — Turbopack tracks
|
|
15
|
+
namespace-member reads against statically-known module exports and flags any
|
|
16
|
+
missing property as a bundle error, even when the property is only read
|
|
17
|
+
defensively.
|
|
18
|
+
|
|
19
|
+
3.1.2 removes the hazo_core reference from `src/utils/logger.ts`. The default
|
|
20
|
+
logger is now `console_logger`. Server-side consumers that want structured
|
|
21
|
+
correlation-ID-aware logs through hazo_core/hazo_logs should call
|
|
22
|
+
`set_logger(createLogger("hazo_ui"))` from their own server boot. The
|
|
23
|
+
override mechanism is unchanged.
|
|
24
|
+
|
|
25
|
+
Rationale: hazo_ui ships with a top-of-bundle `"use client"` directive, so
|
|
26
|
+
the bundle is bundled for the React client in every consumer. Defaulting to
|
|
27
|
+
a server-only structured logger was always a mismatch; the previous default
|
|
28
|
+
only "worked" because consumers never exercised the bundle in a Turbopack
|
|
29
|
+
client context until the gotimer migration.
|
|
30
|
+
|
|
31
|
+
## v3.1.1 — 2026-05-30 (superseded by 3.1.2)
|
|
32
|
+
|
|
33
|
+
**Attempted fix:** Switched `src/utils/logger.ts` to a namespace import of
|
|
34
|
+
hazo_core + runtime `typeof` check on `.createLogger`. Did not resolve the
|
|
35
|
+
underlying defect because Turbopack's static analysis still flags the
|
|
36
|
+
missing property read. Retained on npm for traceability but consumers should
|
|
37
|
+
upgrade directly to 3.1.2.
|
|
38
|
+
|
|
8
39
|
## v3.1.0 — Wave 2 hazo_core wiring
|
|
9
40
|
|
|
10
41
|
**New:** `<HazoContextProvider>`, internal `get_logger` / `set_logger`,
|
package/dist/index.cjs
CHANGED
|
@@ -219,27 +219,19 @@ function HazoContextProvider({
|
|
|
219
219
|
}, [id, userId]);
|
|
220
220
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
221
221
|
}
|
|
222
|
+
|
|
223
|
+
// src/utils/logger.ts
|
|
222
224
|
var console_logger = {
|
|
223
225
|
info: (m, d) => d ? console.log(`[hazo_ui] ${m}`, d) : console.log(`[hazo_ui] ${m}`),
|
|
224
226
|
debug: (m, d) => d ? console.debug(`[hazo_ui] ${m}`, d) : console.debug(`[hazo_ui] ${m}`),
|
|
225
227
|
warn: (m, d) => d ? console.warn(`[hazo_ui] ${m}`, d) : console.warn(`[hazo_ui] ${m}`),
|
|
226
228
|
error: (m, d) => d ? console.error(`[hazo_ui] ${m}`, d) : console.error(`[hazo_ui] ${m}`)
|
|
227
229
|
};
|
|
228
|
-
|
|
229
|
-
try {
|
|
230
|
-
return hazo_core.createLogger("hazo_ui");
|
|
231
|
-
} catch {
|
|
232
|
-
return console_logger;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
var current_logger = null;
|
|
230
|
+
var current_logger = console_logger;
|
|
236
231
|
function set_logger(logger) {
|
|
237
|
-
current_logger = logger ??
|
|
232
|
+
current_logger = logger ?? console_logger;
|
|
238
233
|
}
|
|
239
234
|
function get_logger() {
|
|
240
|
-
if (!current_logger) {
|
|
241
|
-
current_logger = build_default_logger();
|
|
242
|
-
}
|
|
243
235
|
return current_logger;
|
|
244
236
|
}
|
|
245
237
|
function generateUUID() {
|