Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/hono-type-reexport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@objectstack/hono': patch
---

feat(hono): re-export the `Hono` type from `@objectstack/hono`

Downstream apps that consume `createHonoApp()` only need the `Hono` type to
annotate the returned app. They can now `import type { Hono } from '@objectstack/hono'`
instead of adding their own `hono` dependency, which guarantees a single
`hono` across a `link:`/cross-package boundary (no duplicate-package
type-identity errors, no version-pin alignment). `hono` remains a normal
runtime dependency of this package, so standalone usage is unaffected.
12 changes: 12 additions & 0 deletions packages/adapters/hono/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ import {
} from '@objectstack/runtime';
import { readEnvWithDeprecation } from '@objectstack/types';

/**
* Re-export the `Hono` type from the copy of `hono` this adapter owns.
*
* Downstream apps (e.g. the cloud control plane) only need the `Hono` TYPE to
* annotate the app returned by {@link createHonoApp}. Importing it from here —
* rather than adding their own `hono` dependency — guarantees there is exactly
* ONE `hono` across the framework boundary, so the app's type matches without
* any version-pinning / pnpm.overrides alignment dance. `hono` stays a normal
* runtime dependency of THIS package, so standalone `os start` is unaffected.
*/
export type { Hono } from 'hono';

/**
* Minimal structural interface matching KernelManager from @objectstack/service-cloud.
* Declared locally to avoid a circular build dependency.
Expand Down