0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-21 18:18:57 +01:00
Commit Graph

2133 Commits

Author SHA1 Message Date
Yusuke Wada
f0b012ddf7
fix(service-worker): refer to self.fetch correctly (#3200) 2024-07-29 22:34:10 +09:00
Taku Amano
43fe52ce33
fix(jsx/dom): fix performance issue with adding many new node listings (#3205)
* fix(jsx/dom): fix performance issue with adding many new node listings

* First time rendering does not need to look for elements from child nodes
** Avoid unnecessary checks with `node.pP`.
* Sibling elements are always searched, so there is no need for a for loop.
** Need only `findInsertBefore(node.vC[0])`

* test(jsx/dom): add test for performance
2024-07-29 21:58:00 +09:00
Taku Amano
3a56ec58b6
fix(jsx): fix handling of SVG elements in JSX. (#3204)
* fix(jsx): preserve "title" element position in SVG

* fix(jsx): convert SVG attribute name from camelCase to kebab-case
2024-07-29 21:51:11 +09:00
Yusuke Wada
cdd48f4fd4
fix(validator): support application/json with a charset (#3199) 2024-07-28 16:39:40 +09:00
Gaspard Wierzbinski
0417830fe9
fix(validator): Add double quotation marks to multipart checker regex (#3195) 2024-07-28 16:22:52 +09:00
Yusuke Wada
a63bcfd6fb v4.5.2 2024-07-27 18:05:28 +09:00
Ame_x
8da482ac4f
feat(secure-headers): remove "X-Powered-By" should be an option (#3177)
* fix: Secure-Headers delete "X-Powered-By" should be an option

* fix: Secure-Headers delete "X-Powered-By" should be an option

* Update index.test.ts

* chore: format

* Update secure-headers.ts

* update tests

* update middleware

* chore

* change prop name

* chore

* chore: format

* revert the change of arg name

* some fix

* chore
2024-07-27 17:41:11 +09:00
yasuaki640
e8118e3a98
fix:(csrf) fix typo of csrf middleware (#3178) 2024-07-23 19:58:49 +09:00
m-shaka
8dc9e4899c
fix(type): degradation of generic type handling (#3138) 2024-07-22 15:44:46 +09:00
Yusuke Wada
4d33e1c0d4
Revert "fix(helper/adapter): don't check navigator is undefined (#3171)" (#3173)
This reverts commit a285c4b3b4.
2024-07-22 11:35:04 +09:00
m-shaka
bb14b1e5ba
fix(types): handle readonly array correctly (#3172) 2024-07-22 11:22:11 +09:00
Yusuke Wada
a285c4b3b4
fix(helper/adapter): don't check navigator is undefined (#3171) 2024-07-21 21:49:28 +09:00
Yusuke Wada
0535579de5 v4.5.1 2024-07-20 23:10:42 +09:00
Yusuke Wada
4171896681
fix(validator): allow content-type mismatches (#3165) 2024-07-20 23:05:11 +09:00
Yusuke Wada
7389b4cad7
fix(client): support array values for query in ws (#3169)
Co-authored-by: Alber Tenez <albert@zenettech.com>
2024-07-20 23:01:34 +09:00
Yusuke Wada
3b8e72a8ff
chore(factory): remove @experimental from createApp (#3164) 2024-07-20 18:59:55 +09:00
Clément
66fc63d134
feat(bearer-auth): Allow empty bearer-auth middleware prefixes (#3161) 2024-07-20 18:53:02 +09:00
JulesVerner
09f1d20aff
fix(middleware/jwt): Changed the jwt-secret type to SignatureKey (#3167)
* Changed the jwt-secret type to SignatureKey

* Changed import to type-import
2024-07-20 18:39:05 +09:00
Ame_x
84424ad3a5
chore: moving the setup file of vitest (#3157) 2024-07-20 00:02:35 +09:00
Shotaro Nakamura
f23a416f75
chore: remove rimraf and use bun shell (#3146) 2024-07-18 18:34:33 +09:00
Yusuke Wada
801e1b9027 v4.5.0 2024-07-16 23:02:21 +09:00
Yusuke Wada
2f4bb3e382
Merge pull request #3144 from honojs/next 2024-07-16 22:57:37 +09:00
Yusuke Wada
c63251172c
fix(types): remove slow types (#3147) 2024-07-16 22:53:33 +09:00
yasuaki640
20d877167c
feat(jsx): add global attributes to interface definition (#3142) 2024-07-16 22:38:05 +09:00
Yusuke Wada
024ec0ff8d
fix(types): use ContextVariableMap in Context<any> (#3134)
* fix(types): use `ContextVariableMap` in `Context<any>`

* use `any`
2024-07-16 21:57:33 +09:00
Yusuke Wada
1afecac402
chore: update comments in codes (#3145) 2024-07-16 21:50:27 +09:00
ottomated
1cee728193
feat(types): allow passing interfaces as Bindings / Variables (#3136)
* feat(types): allow passing `interface`s as Bindings / Variables

* test(context): add test for c.var

* fix lint warning

* test(types): add test for Bindings types
2024-07-16 21:41:38 +09:00
Yusuke Wada
9987b5908f Merge branch 'main' into next 2024-07-16 21:15:11 +09:00
Taku Amano
9a6e52d734
feat(middleware/combine): Introduce combine middleware (#2941)
* feat(middleware/predicate): Introduce predicate middleware

* fix: apply `bun run format:fix`

* refactor: rename middleware predicate -> combine
2024-07-13 18:49:10 +09:00
ryu
e6d253d96f
feat(middleware): introduce Request ID middleware (#3082)
* feat(middleware): introduce Request ID middleware

* fix not to accept empty string in header

* rename requestID to requestId

* pass the context to the generator option

* add typesVersions

* fix typo

Co-Authored-By: Taku Amano <taku@taaas.jp>

* change to generate id if validation fails

Co-Authored-By: Taku Amano <taku@taaas.jp>

* fix limit length test

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2024-07-13 14:02:36 +09:00
Yusuke Wada
2d0135956c v4.4.13 2024-07-11 18:24:23 +09:00
Yusuke Wada
642dd29666
fix(types): app.use(path, mw) return correct schema type (#3128)
Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
2024-07-11 18:20:53 +09:00
Shotaro Nakamura
c2698fa2e0
feat: Introduce Service Worker Adapter (#3062)
* feat: Intoroduce service worker adapter

* test: add test

* chore: format code

* refactor: handler.ts

* chore: remove unused import

* fix: add webworker to jsr.json

* fix: triple slash directives to tsconfig.json

* feat: add types.ts to define worker types
2024-07-11 17:16:52 +09:00
yasuaki640
4a4e851d50
feat(lambda-edge): add getConnInfo helper for Lambda@Edge (#3099)
* add conninfo helper for lambda@edge

* export getConnInfo
2024-07-11 17:08:36 +09:00
Ame_x
f1c7d312a8
fix(validator-types): type Alignment with Web Standards (#3120)
* fix(validator-types): type Alignment with Web Standards

* fix
2024-07-11 16:34:36 +09:00
Yusuke Wada
ec58511247
fix(types): allow string[] | File[] for RPC form value (#3117) 2024-07-10 10:23:07 +09:00
yasuaki640
4c401fd661
fix(jsx): redefine scope attribute as enum type (#3118) 2024-07-10 10:11:04 +09:00
ryu
74310f469b
fix(vercel): remove deprecated address type (#3115) 2024-07-09 06:57:42 +09:00
promer94
ce1c8172d9
feat(vercel): add getConnInfo for vercel adapter (#3085) 2024-07-08 23:46:56 +09:00
Yusuke Wada
fbae337190
fix(ip-restriction): return the named function (#3113) 2024-07-08 23:32:04 +09:00
Shotaro Nakamura
71cdcf40d8
feat: Introduce IP Restriction Middleware (#2813)
* feat: Introduce IP Limit Middleware

* chore(jsr): add return types

* chore: format code

* fix: eslint

* feat: if allow is empty, set allow at * by default (#3)

* feat: if allow is empty, set allow at * by default

* fix

* feat: remove wildcard

* chore: fix spelling

* chore: format

* chore: sort imports

* fix: test

* chore: sort imports

* feat: renamed `ipLimit` to `ipRestriction`

* feat: accept `(c: Context) => string)`

* chore: format code

* feat: allow/deny -> allowList/denyList

* feat: suport function rule

* chore: format code

* fix: test code

* feat: suport custom errors

* fix: test code

* fix: name in test code

* feat: allow function to named function

* perf(ip-restriction): optimize ip-restriction middleware by prepare matcher function in advance

* feat: don't use random ip in test

* chore: ipVn to ipvn

* fix: test code

* fix: fix type error in ip-restriction middleware test

* chore: rename `IPRestrictRule` to `IPRestrictionRule`

* docs(ip-restriction): add a comment to explain the normalization of IPv6 address

* docs(ip-restriction): fix typo in comment

* refactor(ip-restriction): rename convertIPv6ToString to convertIPv6BinaryToString

* feat: support to receive `Context` in `onError`

* fix: https://github.com/honojs/hono/pull/2813#discussion_r1667327721

* fix: format code

* feat: use `Forbidden`

* tracking the `next`

* remove importing `HonoRequest`

---------

Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-07-08 23:26:01 +09:00
Yusuke Wada
fa5b742b7d
fix(helper/conninfo): add undefined for AddressType (#3112) 2024-07-08 23:02:25 +09:00
Yusuke Wada
58f421fa27 Merge branch 'main' into next 2024-07-08 22:10:10 +09:00
Ame_x
5126449226
refactor(http-status): remove unnecessary line of types and use common types (#3110)
* refactor(http-status): remove unnecessary line of types

* refactor
2024-07-08 21:53:39 +09:00
Shotaro Nakamura
97ec6521a7
chore: replace tsx with Bun (#3103) 2024-07-07 15:55:19 +09:00
Yusuke Wada
bee3ade123
chore: update benchmark (#3102) 2024-07-06 19:25:28 +09:00
Yusuke Wada
cff2768de0 v4.4.12 2024-07-06 16:13:29 +09:00
Yusuke Wada
a90ff2d4fd
chore(utils/jwt): add @module docs (#3101) 2024-07-06 16:10:49 +09:00
Yusuke Wada
e513fe7c46
fix(helper/streaming): remove slow types (#3100) 2024-07-06 15:59:06 +09:00
m-shaka
2a4f257f36
feat(types): improve JSONParsed (#3074)
* feat: improve JSONParsed

* refactor: make things simple
2024-07-06 15:42:33 +09:00