Skip to content

Commit be4c434

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feature/typescript-eslint-type-checked
2 parents eb62c87 + 9f3027a commit be4c434

File tree

8 files changed

+46
-8
lines changed

8 files changed

+46
-8
lines changed

packages/oauth-providers/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @hono/oauth-providers
22

3+
## 0.7.1
4+
5+
### Patch Changes
6+
7+
- [#1099](https://github.com/honojs/middleware/pull/1099) [`091b182a6ac1b7bb1129123d3cd0acca5e41b80d`](https://github.com/honojs/middleware/commit/091b182a6ac1b7bb1129123d3cd0acca5e41b80d) Thanks [@liquidleif](https://github.com/liquidleif)! - fix: Update twitter authorization url
8+
39
## 0.7.0
410

511
### Minor Changes

packages/oauth-providers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hono/oauth-providers",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "Social login for Hono JS, integrate authentication with facebook, github, google and linkedin to your projects.",
55
"type": "module",
66
"main": "dist/index.js",

packages/oauth-providers/src/providers/x/authFlow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class AuthFlow {
7474
code_challenge: this.code_challenge,
7575
code_challenge_method: 'S256',
7676
})
77-
return `https://twitter.com/i/oauth2/authorize?${parsedOptions}`
77+
return `https://x.com/i/oauth2/authorize?${parsedOptions}`
7878
}
7979

8080
private async getTokenFromCode() {

packages/zod-openapi/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @hono/zod-openapi
22

3+
## 0.19.3
4+
5+
### Patch Changes
6+
7+
- [#1106](https://github.com/honojs/middleware/pull/1106) [`448a8fc687cca2bcab2353ea4237f1293706d5e2`](https://github.com/honojs/middleware/commit/448a8fc687cca2bcab2353ea4237f1293706d5e2) Thanks [@yusukebe](https://github.com/yusukebe)! - fix: infer Env correctly if the middleware is `[]`
8+
39
## 0.19.2
410

511
### Patch Changes

packages/zod-openapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hono/zod-openapi",
3-
"version": "0.19.2",
3+
"version": "0.19.3",
44
"description": "A wrapper class of Hono which supports OpenAPI.",
55
"type": "module",
66
"module": "dist/index.js",

packages/zod-openapi/src/index.test-d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,25 @@ describe('Middleware', () => {
337337
}
338338
)
339339
})
340+
341+
it('Should infer Env correctly when the middleware is empty', async () => {
342+
const app = new OpenAPIHono<{ Variables: { foo: string } }>()
343+
app.openapi(
344+
createRoute({
345+
method: 'get',
346+
path: '/books',
347+
middleware: [] as const, // empty
348+
responses: {
349+
200: {
350+
description: 'response',
351+
},
352+
},
353+
}),
354+
(c) => {
355+
const foo = c.get('foo')
356+
type verify = Expect<Equal<typeof foo, string>>
357+
return c.json({})
358+
}
359+
)
360+
})
340361
})

packages/zod-openapi/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ export type MiddlewareToHandlerType<M extends MiddlewareHandler<any, any, any>[]
305305
: never
306306
: M extends [infer Last]
307307
? Last // Return the last remaining handler in the array
308-
: never
308+
: MiddlewareHandler<Env>
309309

310310
type RouteMiddlewareParams<R extends RouteConfig> = OfHandlerType<
311311
MiddlewareToHandlerType<AsArray<R['middleware']>>

packages/zod-openapi/tsconfig.spec.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "../../dist/out-tsc/packages/zod-openapi",
5-
"types": ["vitest/globals"]
5+
"types": [
6+
"vitest/globals"
7+
]
68
},
7-
8-
"include": ["**/*.test.ts", "**/*.test-d.ts", "vitest.config.ts"],
9+
"include": [
10+
"**/*.test.ts",
11+
"**/*.test-d.ts",
12+
"vitest.config.ts"
13+
],
914
"references": [
1015
{
1116
"path": "./tsconfig.build.json"
1217
}
1318
]
14-
}
19+
}

0 commit comments

Comments
 (0)