0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-24 11:07:29 +01:00
Commit Graph

2164 Commits

Author SHA1 Message Date
Trung Dang
00f32b7c17
fix(types): SimplifyDeepArray should now actually be "deep" (#2920)
* fix(types): `SimplifyDeepArray` should now actually be "deep"

Also now uses `Simplify` instead of inline declare the type

* tests(types): extra tests for `Should have correct types - interfaces`

* style: apply lint&style fixes

* docs: rewording SimplifyDeepArray jsdoc

* fix: type is possibly infinite

* fix: mismatching implementation of interface

* refactor: split JSONRespond return declaration to it's own type

DRY-er code and fixes a weird type is possibly infinite yelling
2024-06-06 22:09:33 +09:00
Yusuke Wada
731d7aebad
fix(types): add _ prefix to TypedResponse properties (#2917) 2024-06-06 21:48:24 +09:00
Yusuke Wada
cb55866ab8
fix(filepath): allow suffix includes - and _ (#2910) 2024-06-06 18:50:18 +09:00
Akira Tsuno
817626ff7d
feat(jsx): support htmlfor attribute alias (#2916)
* add an attribute alias for 'for' to 'htmlFor'

* Updated the utils.test to include attribute aliases.

* bun run format:fix and lint:fix
2024-06-06 17:32:01 +09:00
Yusuke Wada
448a0027ba
feat(context): c.redirect() supports TypedResponse (#2908) 2024-06-06 16:48:34 +09:00
Trung Dang
5beac4e217
fix(types): #2912: interfaces array's respond typed as never (#2915)
* feat: add `DeepSimplify` type

* fix(types): #2912: interfaces array's respond typed as `never`

* refactor: wording `DeepSimplify` => `SimplifyDeepArray`

* docs(jsdoc): add jsdoc for `Simplify`, `SimplifyDeepArray`
2024-06-06 16:44:19 +09:00
Trung Dang
fe0d787916
refactor(types): remove Prettify as duplicated with Simplify (#2914) 2024-06-06 16:37:16 +09:00
Yusuke Wada
706c2f028a
fix(hono-base): return 404 if lacking response in a single sync handler (#2909) 2024-06-06 16:19:36 +09:00
ryu
0d851b689c
fix(cloudflare-workers): export getConnInfo() (#2906)
* fix(cloudflare-workers): export getConnInfo()

* format
2024-06-05 10:05:34 +09:00
Ame_x
96196ab52e
chore: create .gitpod.yml (#2868)
* chore: create .gitpod.yml

* tmp: delete lines breaks

* yarn to bun
2024-06-04 17:17:07 +09:00
James Ross
d13588e36b
chore(hono-base): improve unfinalized response error (#2902) 2024-06-04 17:14:24 +09:00
Taku Amano
524296e43f
feat(hono-base): skip import HTTPException by using HTTPResponseError (#2898)
This change is intended to make error handling more flexible and reduce bundle size.
This idea is originated from https://github.com/honojs/hono/pull/2885

Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-06-04 06:35:44 +09:00
yasuaki640
d260d2166e
fix(typo): Fix typo in request.test.ts (#2899) 2024-06-04 06:31:09 +09:00
Yusuke Wada
6a5c649dce v4.4.3 2024-06-03 20:48:41 +09:00
Yusuke Wada
ef70eafdb6 chore: update lockfile 2024-06-03 20:44:42 +09:00
Yusuke Wada
a0011518ca
feat(hono-base): add replaceRequest option for app.mount (#2852)
* feat(hono-base): add `rewritePath` option for `app.mount`

* feat(hono-base): introduce `replaceRequest` option instead of `rewritePath` (#2873)

* add non-null assertion

* change the test name

* update JSDoc

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2024-06-03 20:42:38 +09:00
ryu
a036d70307
fix(types): fix typo for unofficial status code type (#2894)
* fix(types): fix typo for UnofficialStatusCode

* change pathname

* unify the descriptions
2024-06-03 16:32:46 +09:00
Yusuke Wada
5c348b2439
test(presets): add tests for hono/quick and hono/tiny (#2892) 2024-06-03 00:30:20 +09:00
TATSUNO “Taz” Yasuhiro
b6934cb210
chore: Exclude type-only files from coverage (#2890) 2024-06-03 00:19:33 +09:00
TATSUNO “Taz” Yasuhiro
ec3648d0c3
refactor(aws-lambda): merge custom-context into types (#2889)
* refactor(aws-lambda): merge custom-context into types so they are excluded from coverage

* refactor: custom-context.ts is not needed since it is hidden by reexport
2024-06-03 00:16:07 +09:00
Yusuke Wada
786f9e2a9d
test(workerd): add tests for WebSocket (#2891) 2024-06-03 00:14:11 +09:00
Yusuke Wada
f634c82451
test(workerd): rename the runtime test wrangler to workerd (#2888)
* test(workerd): rename the runtime test `wrangler` to `workerd`

* fixed ci.yml

* fixed a typo

* use node 20.x
2024-06-02 22:49:40 +09:00
Ron Keiser
eb3d85674f
fix(cloudflare-workers): Update websocket.ts to return 101 status code (#2886)
Closes #2883
2024-06-02 22:28:31 +09:00
JetLu
320b945eff
fix(websocket): the onopen event cannot be triggered during delayed operations in deno (#2864)
* fix: The onopen event cannot be triggered during delayed operations

* fix: The onopen event cannot be triggered during delayed operations

* chore: delete test

* chore: tidy
2024-06-02 17:56:31 +09:00
TATSUNO “Taz” Yasuhiro
80cbb44f50
chore: add coverage badge to README (#2881)
* chore: add coverage badge to README

* chore: move to "activity" category before "social" category
2024-06-02 17:33:55 +09:00
Yusuke Wada
9735283462
docs: update readme and migrate guide for migrating deno.land/x to JSR (#2879) 2024-06-01 06:15:49 +09:00
TATSUNO “Taz” Yasuhiro
8cc8a05c89
ci: Report coverage with CodeCov (#2862)
* Output coverage per each test

* Collect coverage

* Exclude test-only files

* update comment

* exclude types

* Add config

* Update bun comment

* Generate coverage in Deno
2024-06-01 04:17:47 +09:00
Ame_x
0dfb794df7
docs(jsdoc): add jsdoc of some modules (#2836)
* add jsdoc of .route

* chore: format

* add jsdoc of .mount

* add

* chore: format

* chore fix

* change to format same as ".mount"

* chore fix

* chore fix

* docs: change jsdoc of .basePath

* docs: change jsdoc of onError

* same as doc

* delete

* docs: change jsdoc of .notFound

* docs: change jsdoc of .notFound

* docs: change jsdoc of .fetch

* chore: format

* docs: change jsdoc of .fire

* docs: change jsdoc of .fire

* docs: change jsdoc of hono-options

* docs: change jsdoc of http-exception

* docs: change jsdoc of hono-request

* docs: change jsdoc of context

* delete missing jsdoc
2024-06-01 04:00:13 +09:00
Ame_x
19f859d398
ci: change name of workflow jobs (#2875)
* ci: change name of workflow jobs

* change
2024-06-01 03:25:36 +09:00
Ame_x
4bf923746e
refactor: removed unnecessary line (#2869) 2024-05-31 17:51:46 +09:00
Sigui Kessé Emmanuel
df11eb182e
ci: Update workflow name of release.yml (#2874) 2024-05-31 17:38:42 +09:00
Yusuke Wada
0c89700f55 v4.4.2 2024-05-31 08:14:26 +09:00
Ame_x
a852327059
fix: add return types of void function (#2870)
* fix

* chore: format
2024-05-31 08:11:31 +09:00
Yusuke Wada
c8beddb7c7 v4.4.1 2024-05-31 08:02:07 +09:00
chimame
3d6820b46e
refactor(compose): Remove type definition of ComposeContext that was defined twice (#2858) 2024-05-30 13:27:35 +09:00
Ame_x
966554925b
docs: change to shell highlight (#2848)
* docs: refactor highlight

* shell to bash
2024-05-30 13:07:09 +09:00
Ame_x
1da43aee3b
refactor(helper/testing): remove some any of helper/testing (#2833)
* refactor: remove some any of helper/testing

* fix

* remove unused types
2024-05-29 23:35:56 +09:00
Balint Orosz
bc39c3b897
fix(validator): support json api header (#2855) 2024-05-29 23:17:14 +09:00
TATSUNO “Taz” Yasuhiro
0735e0cc56
refactor(aws-lambda): remove unused setHeadersToResult (#2828) 2024-05-29 23:14:38 +09:00
Taku Amano
645b4f21eb
fix(jsx/dom): Fixed to not give "px" for certain properties, even if numeric value is given (#2845) 2024-05-29 23:02:26 +09:00
Mohammed Taha
a44d888bf0
refactor(helper/adapter): improve runtime detection (#2846)
* refactor: improve runtime detection

detect runtime using navigator.userAgent when possible

* fix typescript types

* export knownUserAgents

* add return type for checkUserAgentEquals
2024-05-29 18:18:55 +09:00
Ame_x
7cbca602e6
ci: removed v4 branch of target in actions. (#2849) 2024-05-29 18:09:22 +09:00
fzn0x
16f73935ef
fix(types): allow blank env (#2834)
* fix(types): allow blank env

* types: blank env

* fix(types): add mock binding

* cleanup

* Update yarn.lock

* fix: bun lock conflict

* revert

* fix(types): update quick and tiny preset
2024-05-29 17:41:53 +09:00
fzn0x
18324b8b6c
docs(src/*): Add TSDoc comments to improve code documentation (#2841)
* docs(compose): add TSDoc/JSDoc for readibility

* docs(context): add TSDoc/JSDoc for readibility

* docs(hono-base): add TSDoc/JSDoc for mount and http methods

* docs(hono): add TSDoc/JSDoc for readibility

* docs(http-exception): add TSDoc/JSDoc for readibility

* docs(hono): add TSDoc/JSDoc for readibility

* docs(request): add TSDoc/JSDoc for readibility

* docs(router): add TSDoc/JSDoc for readibility

* docs(request): add @see for valid

* resolve
2024-05-29 17:38:11 +09:00
Antony David
9176c2bbfd
ci: include node22 tests (#2851) 2024-05-29 17:34:49 +09:00
Ame_x
a6c893c5e0
ci: added paths-ignore for ignore files of dont need tests (#2850) 2024-05-29 17:10:03 +09:00
Shotaro Nakamura
3d0fbfb7a8
feat(bun): WebSocket helper supports that env be { server: server } (#2812)
* feat: WebSocket helper supports `{ server }`

* test: add test

* chore: format code

* fix: test

* chore: format code

* fix: format code with new rule

* chore: format code

Fixes #2645
Fixes #2696
2024-05-29 03:01:14 +09:00
fzn0x
a3d9cc7d95
refactor(websocket): remove unused condition (#2839) 2024-05-29 02:47:54 +09:00
fzn0x
0c7fb9a221
fix(middleware/body-limit): set default duplex option for readable stream (#2837)
* fix(middleware/body-limit): set default duplex option for readable stream

* test: should return 200 response without user-defined duplex option

* fix: revert and avoid ts-expect-error
2024-05-29 02:35:35 +09:00
fzn0x
116867a921
chore: Author should include JSDoc (#2840) 2024-05-29 02:15:45 +09:00