diff --git a/.changeset/six-shirts-dress.md b/.changeset/six-shirts-dress.md new file mode 100644 index 00000000..fb3c9893 --- /dev/null +++ b/.changeset/six-shirts-dress.md @@ -0,0 +1,5 @@ +--- +'@hono/zod-openapi': patch +--- + +fix: import types correctly diff --git a/packages/zod-openapi/package.json b/packages/zod-openapi/package.json index 9e4616d4..9816ec9c 100644 --- a/packages/zod-openapi/package.json +++ b/packages/zod-openapi/package.json @@ -37,7 +37,7 @@ "zod": "3.*" }, "devDependencies": { - "hono": "^3.7.2", + "hono": "^3.9.1", "zod": "^3.22.1" }, "dependencies": { @@ -47,4 +47,4 @@ "engines": { "node": ">=16.0.0" } -} \ No newline at end of file +} diff --git a/packages/zod-openapi/src/index.ts b/packages/zod-openapi/src/index.ts index 67be1364..7178dffa 100644 --- a/packages/zod-openapi/src/index.ts +++ b/packages/zod-openapi/src/index.ts @@ -25,7 +25,7 @@ import type { ToSchema, TypedResponse, } from 'hono' -import type { MergePath, MergeSchemaPath } from 'hono/dist/types/types' +import type { MergePath, MergeSchemaPath } from 'hono/types' import type { RemoveBlankRecord } from 'hono/utils/types' import type { AnyZodObject, ZodSchema, ZodError } from 'zod' import { z, ZodType } from 'zod' @@ -353,7 +353,7 @@ export class OpenAPIHono< } basePath(path: SubPath): OpenAPIHono> { - return new OpenAPIHono(super.basePath(path)) + return new OpenAPIHono(super.basePath(path) as any) } } diff --git a/yarn.lock b/yarn.lock index 52f23dbe..0d506c26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5954,10 +5954,10 @@ hono@^3.7.3: resolved "https://registry.yarnpkg.com/hono/-/hono-3.7.3.tgz#01fd88360e9a431235110197fbb5a998131e104e" integrity sha512-BQHdLPXb30hQ9k+04byeSi4QMHk20U1GUq0nT5kGUCGZtxeYhAS7mUJ1wgjn4SCvgiw1rcc6oBOAlwJQ7jQymA== -hono@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/hono/-/hono-3.7.2.tgz#c3839d7ffbb5120850b2b926363d065020f4d18c" - integrity sha512-5SWYrAQJlfjHggcDTnmKZd5zlUEXmoUiBjnmL6C1W8MX39/bUw6ZIvfEJZgpo7d7Z/vCJ5FRfkjIQPRH5yV/dQ== +hono@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/hono/-/hono-3.9.1.tgz#7a630aad35b8709e10e6117468116d38404ab87e" + integrity sha512-z3nM9CjNZ8PRAH6NNntk4ESKW2POEbGanhK1QpYdQ1MOYRzZPSEE8B5mqw8bYEPa7qIQxX0vtlv7XOxtwFbosg== hosted-git-info@^2.1.4: version "2.8.9"