Skip to content

Commit e15c845

Browse files
xuyushun441-sysos-zhuangclaude
authored
feat(hono): re-export the Hono type from @objectstack/hono (#1575)
* feat(hono): re-export the `Hono` type from @objectstack/hono Downstream apps that consume `createHonoApp()` need the `Hono` type only to annotate the returned app. Re-exporting it here lets them import the type from `@objectstack/hono` instead of adding their own `hono` dependency — guaranteeing a single `hono` across the framework boundary (no duplicate-package type-identity errors, no version-pin/overrides alignment). `hono` stays a normal runtime dependency of this package, so standalone `os start` is unaffected; this only adds a type surface. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: add changeset for @objectstack/hono Hono type re-export --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6f8eeea commit e15c845

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.changeset/hono-type-reexport.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/hono': patch
3+
---
4+
5+
feat(hono): re-export the `Hono` type from `@objectstack/hono`
6+
7+
Downstream apps that consume `createHonoApp()` only need the `Hono` type to
8+
annotate the returned app. They can now `import type { Hono } from '@objectstack/hono'`
9+
instead of adding their own `hono` dependency, which guarantees a single
10+
`hono` across a `link:`/cross-package boundary (no duplicate-package
11+
type-identity errors, no version-pin alignment). `hono` remains a normal
12+
runtime dependency of this package, so standalone usage is unaffected.

packages/adapters/hono/src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ import {
99
} from '@objectstack/runtime';
1010
import { readEnvWithDeprecation } from '@objectstack/types';
1111

12+
/**
13+
* Re-export the `Hono` type from the copy of `hono` this adapter owns.
14+
*
15+
* Downstream apps (e.g. the cloud control plane) only need the `Hono` TYPE to
16+
* annotate the app returned by {@link createHonoApp}. Importing it from here —
17+
* rather than adding their own `hono` dependency — guarantees there is exactly
18+
* ONE `hono` across the framework boundary, so the app's type matches without
19+
* any version-pinning / pnpm.overrides alignment dance. `hono` stays a normal
20+
* runtime dependency of THIS package, so standalone `os start` is unaffected.
21+
*/
22+
export type { Hono } from 'hono';
23+
1224
/**
1325
* Minimal structural interface matching KernelManager from @objectstack/service-cloud.
1426
* Declared locally to avoid a circular build dependency.

0 commit comments

Comments
 (0)