Skip to content

Commit 46c6b0c

Browse files
benvinegarclaude
andcommitted
docs(extensions): say apiVersion is enforced at load time
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3a613b7 commit 46c6b0c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎website/src/content/docs/docs/extend/extension-api.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The extension factory receives one API object. Registration calls are only valid
77

88
## `hunk.apiVersion`
99

10-
The API generation this Hunk speaks (currently `31`). Branch on it if you want one file to support several Hunk versions, or declare `"hunk": {"apiVersion": N}` in a folder extension's `package.json` so an older Hunk refuses to install it.
10+
The API generation this Hunk speaks (currently `31`). Branch on it if you want one file to support several Hunk versions, or declare `"hunk": {"apiVersion": N}` in a folder extension's `package.json` so an older Hunk refuses to load it with a clear message.
1111

1212
| Version | Adds |
1313
| ------- | --------------------------------------------------------------------------------------------------------- |

‎website/src/content/docs/docs/extend/extensions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Community extensions are listed at [hunk.dev/extensions](/extensions/), and the
9898

9999
A publishable extension repository is the folder-extension layout at the repository root — `package.json` with a `hunk` field (or an `index.*` entry), code, README. To share one:
100100

101-
1. Fill in `package.json`'s `name`, `version`, and `description`, and declare `"hunk": {"apiVersion": N}` if you rely on recent API surface — an older Hunk then refuses the install cleanly instead of failing mid-load.
101+
1. Fill in `package.json`'s `name`, `version`, and `description`, and declare `"hunk": {"apiVersion": N}` if you rely on recent API surface — an older Hunk then refuses to load it with a clear message instead of failing partway through.
102102
2. Keep `dependencies` real: they are installed into the extension's own `node_modules` at install time. `react`, `@opentui/*`, and `hunkdiff/extension` come from the host at runtime and belong in `devDependencies`.
103103
3. Tag releases so users can pin with `@v1.2.0`.
104104
4. Push to any git host and add the **`hunk-extension`** GitHub topic, then open a pull request to list it on [hunk.dev/extensions](/extensions/).

0 commit comments

Comments
 (0)