diff --git a/.changeset/few-parrots-agree.md b/.changeset/few-parrots-agree.md new file mode 100644 index 00000000..de1ee146 --- /dev/null +++ b/.changeset/few-parrots-agree.md @@ -0,0 +1,5 @@ +--- +'@hono/hello': patch +--- + +new message diff --git a/packages/hello/package.json b/packages/hello/package.json index d5391266..ffc45598 100644 --- a/packages/hello/package.json +++ b/packages/hello/package.json @@ -24,7 +24,10 @@ "url": "https://github.com/honojs/middleware.git" }, "homepage": "https://github.com/honojs/middleware", - "dependencies": { + "peerDependencies": { + "hono": "^2.6.2" + }, + "devDependencies": { "hono": "^2.6.2" } } \ No newline at end of file diff --git a/packages/hello/src/index.test.ts b/packages/hello/src/index.test.ts index fdf360a4..f831779e 100644 --- a/packages/hello/src/index.test.ts +++ b/packages/hello/src/index.test.ts @@ -14,7 +14,7 @@ describe('Hello middleware', () => { const res = await app.request('http://localhost/hello/foo') expect(res).not.toBeNull() expect(res.status).toBe(200) - expect(res.headers.get('X-Message')).toBe('Hello') + expect(res.headers.get('X-Message')).toBe('Hello!') }) it('Should be X', async () => { diff --git a/packages/hello/src/index.ts b/packages/hello/src/index.ts index b4f43c99..397711fb 100644 --- a/packages/hello/src/index.ts +++ b/packages/hello/src/index.ts @@ -1,6 +1,6 @@ import type { Handler } from 'hono' -export const hello = (message: string = 'Hello'): Handler => { +export const hello = (message: string = 'Hello!'): Handler => { return async (c, next) => { await next() c.res.headers.append('X-Message', message)