0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 10:51:01 +00:00
Commit Graph

684 Commits

Author SHA1 Message Date
Yusuke Wada
bc736da6a5
refactor: add Json type for JSON object (#453) 2022-08-05 06:41:28 +09:00
Yusuke Wada
db17530b36
fix(utils/crypto): stringify the parameter which is object in createHash (#452)
Fix #451
2022-08-04 08:51:09 +09:00
Yusuke Wada
a7ad89ccef refactor(utils/html): remove escape function (#450)
Close #445
2022-08-03 11:39:36 +09:00
Yusuke Wada
9f2a270c28
refactor(utils/html): rename Buffer to StringBuffer (#449) 2022-08-03 11:24:51 +09:00
Yusuke Wada
fefba4f067
refactor: make parsedBody type as Body (#448) 2022-08-03 11:03:11 +09:00
Taku Amano
65921824da
refactor(jsx): Support all the boolean attributes. (#446) 2022-08-02 23:04:13 +09:00
Taku Amano
85cbf3e984
perf(jsx): JSX performance improvement (#444)
* perf(jsx): Update benchmark for JSX.

* perf(utils/html): Improve `escape` performance.

Improved `escape` performance with reference to the react-dom implementation.

* refactor(utils/html): Subdivide HtmlEscapedString

* perf(jsx): Rewrite JSX with new `escapeToBuffer` and `JSXNode`.

* refactor(jsx): A function `jsx` returns `JSXNode` now.

* perf(html): Rewrite html middleware with new `escapeToBuffer`.

* Update tests for JSX.

* Update tests for utils/html.
2022-08-02 08:17:24 +09:00
Minghe
dab3c26878
feat(jwt): enable token in cookie (#441) 2022-08-01 17:54:01 +09:00
Yusuke Wada
7c60b4100c v2.0.6 2022-07-31 22:22:10 +09:00
Yusuke Wada
3c371d0d07 chore: denoify 2022-07-31 22:19:28 +09:00
Taku Amano
47b88f2f89
perf(jsx): Performance Tuning for JSX (#435)
* perf(jsx): Add benchmark scripts for JSX.

* perf(jsx): If included in emptyTag, return early.

* perf(jsx): Process props according to type.

* perf(jsx): Compare with React, Nano and Preact.
2022-07-31 21:58:59 +09:00
Yusuke Wada
4a2de0c1d1
fix(parseBody): return blank object when JSON body is nothing (#433)
Fix #428
2022-07-30 21:21:57 +09:00
Taku Amano
bdcd536812
feat(context): Introduce ContextVariableMap. (#429)
* feat(context): Introduce ContextVariableMap.

* Add a type definition using ContextVariableMap to ctx.set as well.
2022-07-30 17:18:53 +09:00
Maciej Ziehlke
04a8818e07
fix(jsx): Fix for JSX checked and selected props (#430)
* Fix for JSX checked and selected props

* Adds more Boolean Prop Keys
2022-07-30 13:49:00 +09:00
Yusuke Wada
3f85ccd879 chore(git): ignore bun.lockb 2022-07-29 08:21:23 +09:00
Yusuke Wada
2e8aa2d612 v2.0.5 2022-07-24 20:46:32 +09:00
Yusuke Wada
115395766e
fix(jsx/bun): do not escape children (#422)
For JSX middleware on Bun.
Fix bug that JSX `children` will force escaped.
2022-07-24 20:39:41 +09:00
Yusuke Wada
7091348c8b v2.0.4 2022-07-24 18:13:07 +09:00
Yusuke Wada
393983013f
fix(package.json): fix path for exporting jsx/jsx-runtime types (#421) 2022-07-24 18:12:25 +09:00
Yusuke Wada
b3e63fb087 v2.0.3 2022-07-24 17:42:44 +09:00
Yusuke Wada
5f60a18227
feat(jsx): support jsxImportSource (#420)
* feat(jsx): support `jsxImportSource`

Support `jsxImportSource`.
You can use this option on Bun and Deno (Wrangler does not support it).
if you write tsconfig as below, JSX middleware will be enabled without `import { jsx } from 'hono/jsx'`.

```json
{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxFragmentFactory": "Fragment",
    "jsxImportSource": "hono/jsx"
  }
}
```

* fix export path
2022-07-24 17:36:37 +09:00
Yusuke Wada
47f7577934 chore: remove @types/mustache
It's not needed
2022-07-24 13:18:24 +09:00
Yusuke Wada
f6f454ed42
fix(trie-router): fix the rule for capturing named parameter (#419)
Close #418
2022-07-24 11:03:04 +09:00
Yusuke Wada
34b218ddf6 chore(pacakge.json): don't export cookie middleware 2022-07-23 15:09:33 +09:00
Yusuke Wada
c450c56460
feat(middleware): implement Cache Middleware (#417)
* feat(middleware): implement Cache Middleware

* denoify

* do not export Cache middleware for Deno.
2022-07-23 15:02:42 +09:00
Yusuke Wada
7527c22a2d
docs: make a contribution guide (#415)
* docs: make a contribution guide

* update

* update readme
2022-07-23 09:46:20 +09:00
Yusuke Wada
034d53a6e6 chore(ci): fix branch name 2022-07-21 08:48:13 +09:00
Yusuke Wada
d94443d856 chore(package.json): remove mustache
It's not needed.
2022-07-21 08:32:10 +09:00
Yusuke Wada
1d73e3a8ed
fix(package.json): export compress middleware (#409) 2022-07-18 22:26:01 +09:00
Yusuke Wada
6f88fd9599 v2.0.2 2022-07-18 12:30:31 +09:00
Yusuke Wada
b4a660c605 chore(deno): denoify 2022-07-18 11:56:07 +09:00
Yusuke Wada
7738c99062
docs: rename master to main and remove README from middlewre directories (#405)
* chore: add conf file to categorize the PRs on release note

Inspired by
https://github.com/r7kamura/github-label-presets

* docs: rename `master` to `main` and remove README from middlewre directories

If you want read the document about the middleware,
please refer to the website <https://honojs.dev/>
2022-07-18 11:48:34 +09:00
Yusuke Wada
bcc9818395
chore: add conf file to categorize the PRs on release note (#404)
Inspired by
https://github.com/r7kamura/github-label-presets
2022-07-18 09:09:22 +09:00
Benjamin Kniffler
0a4c7bb6c5
refactor: Update context.ts (#402)
Allow typecast in context.get(), e.g.

```ts
const user = context.get<User>('user');
```
2022-07-18 08:27:28 +09:00
Yusuke Wada
da4d9a5491
fix(logger): specify console.log for default print fn (#401) 2022-07-18 08:17:42 +09:00
Christoph Müller
aee215d6b7
fix: Pass path along in the serve-static middleware when using cloudflare module worker (#400) 2022-07-17 20:55:39 +09:00
Yusuke Wada
1cd5cb7c32 v2.0.1 2022-07-17 18:42:42 +09:00
Yusuke Wada
dd1012e48d chore(deno): rewrite mod.ts in src 2022-07-17 18:40:34 +09:00
Yusuke Wada
007e145eec refactor(deno): fix a definition of FetchEvent 2022-07-17 18:36:42 +09:00
Yusuke Wada
1ee08cc5ce chore(deno): denoify 2022-07-17 18:11:09 +09:00
Taku Amano
2e3919aa4c
refactor(context): executionCtx always returns ExecutionContext. (#399) 2022-07-17 18:07:39 +09:00
Yusuke Wada
f573687abd
test(bun): use bun:test (#398) 2022-07-17 09:51:42 +09:00
Yusuke Wada
2a24b98e55
refactor: remove useless async for a better performance on Bun (#397)
* fix(compress): add type for enconding name

* refactor: remove useless `async` for a better performance on Bun
2022-07-17 09:13:44 +09:00
Yusuke Wada
be548c97ed
fix(compress): add type for enconding name (#396) 2022-07-17 08:59:40 +09:00
Miguel Oliveira
4e38e13228
refactor: the log middleware and its tests (#394)
* refactor: the log middleware and its tests

* fix: the time function in log middleware
2022-07-17 08:57:46 +09:00
Roman Hotsiy
c63d7ed77f
chore: fix typo in error class name (#393)
* chore: fix type in error class name

* chore: update usages in other places
2022-07-17 08:54:43 +09:00
Yusuke Wada
ecfc81ff1f chore(deno): denoify 2022-07-16 21:49:59 +09:00
TANIGUCHI Masaya
ef4602ed15
Add compress middleware (#392) 2022-07-16 21:48:31 +09:00
Yusuke Wada
94d94198bc v2.0.0 2022-07-16 17:59:25 +09:00
Yusuke Wada
87db4fc07e docs(deno): update README 2022-07-16 17:56:06 +09:00