@loomcycle/client 0.10.0 → 0.10.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
@@ -27,6 +27,24 @@ npm install @loomcycle/client
27
27
 
28
28
  Requires Node ≥ 18. Bun and Deno likely work but are untested. Browser support is not a target — for browser-side operator control, use loomcycle's built-in Web UI at `/ui`.
29
29
 
30
+ ### Module systems
31
+
32
+ From v0.10.1 the package ships as a **dual ESM + CommonJS** distribution:
33
+
34
+ ```ts
35
+ // ESM (recommended)
36
+ import { LoomcycleClient } from "@loomcycle/client";
37
+
38
+ // CommonJS (legacy consumers — n8n's community-node loader, older Node
39
+ // scripts, anything not yet on ESM)
40
+ const { LoomcycleClient } = require("@loomcycle/client");
41
+ ```
42
+
43
+ The `exports` field routes each consumer to the right build:
44
+ - `import` → `dist/index.js` (ESM)
45
+ - `require` → `dist/cjs/index.js` (CJS)
46
+ - `types` → `dist/index.d.ts` (single .d.ts set; works for both)
47
+
30
48
  ## Quick start
31
49
 
32
50
  ```ts