flexily 0.5.1 → 0.5.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/README.md CHANGED
@@ -137,7 +137,7 @@ Text measurement backends:
137
137
  npm install flexily
138
138
  ```
139
139
 
140
- **Runtimes:** Bun >= 1.0, Node.js >= 18. Pure JavaScript — no native or WASM dependencies.
140
+ **Runtimes:** Bun >= 1.0, Node.js >= 23.6. Pure JavaScript — no native or WASM dependencies.
141
141
 
142
142
  ## Performance
143
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexily",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Pure JavaScript flexbox layout engine — composable plugins, text measurement, Yoga-compatible API, no WASM",
5
5
  "keywords": [
6
6
  "canvas-ui",
@@ -72,6 +72,7 @@
72
72
  "yoga-wasm-web": "^0.3.3"
73
73
  },
74
74
  "engines": {
75
+ "bun": ">=1.0",
75
76
  "node": ">=23.6.0"
76
77
  }
77
78
  }
package/src/logger.ts CHANGED
@@ -14,11 +14,12 @@ interface ConditionalLogger {
14
14
 
15
15
  let _logger: ConditionalLogger | null = null
16
16
 
17
- function createFallbackLogger(namespace: string): ConditionalLogger {
18
- // Dynamic require to avoid bundling debug if not needed
17
+ async function createFallbackLogger(namespace: string): Promise<ConditionalLogger> {
18
+ // Dynamic import to avoid bundling debug if not needed
19
19
  try {
20
- // eslint-disable-next-line @typescript-eslint/no-require-imports
21
- const createDebug = require("debug") as (ns: string) => DebugFn & { enabled: boolean }
20
+ const { default: createDebug } = (await import("debug")) as {
21
+ default: (ns: string) => DebugFn & { enabled: boolean }
22
+ }
22
23
  const debug = createDebug(namespace)
23
24
  return { debug: debug.enabled ? debug : undefined }
24
25
  } catch {