Skip to content

Commit c8ee4e7

Browse files
committed
docs(cli): say the three code subpaths are ESM
Claude-Session: https://claude.ai/code/session_01WTCPNVkuDk7DNaZSdM3DZv Co-authored-by: Claude <noreply@anthropic.com>
1 parent 61ba04f commit c8ee4e7

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
docs(cli): the README says the three code subpaths are ESM
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`@objectstack/cli`'s README now states that `.`, `./console` and `./hook-body` are ES modules: load them with `import`, and from CommonJS with `import()`, or with `require()` only on a Node that loads ES modules synchronously (22.12 and later). No export map or code changes.

‎packages/cli/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ resolve is exactly this map — a subpath is added here on purpose, with a
377377
| `@objectstack/cli/hook-body` | The hook-body extractor `os build` and `os lint` apply, for an app harness that must run the **same** body-only lowering the build ships (below). |
378378
| `@objectstack/cli/package.json` | The manifest itself, for the ordinary tooling idiom of reading a dependency's own version. |
379379

380+
The three code subpaths (`.`, `./console`, `./hook-body`) are **ESM**: the package is `"type": "module"` and each maps to an ES module. Load them with `import`. A CommonJS caller reaches them through `import()`, or through `require()` only on a Node that loads ES modules synchronously (22.12 and later).
381+
380382
### `@objectstack/cli/hook-body`
381383

382384
```typescript

0 commit comments

Comments
 (0)