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

562 Commits

Author SHA1 Message Date
Yusuke Wada
1c3c9f1200
fix(type): fix type errors for Bindings and Variables (#488) 2022-08-27 23:57:33 +09:00
Yusuke Wada
404baa31a4 v2.1.0 2022-08-27 15:40:52 +09:00
Yusuke Wada
406c2ee438 docs: update migration guide 2022-08-27 13:24:14 +09:00
Yusuke Wada
128a59aec2
fix: make that c.req.parseBody parses only FormData (#487) 2022-08-27 11:38:48 +09:00
Yusuke Wada
20e8bacec8 chore: denoify 2022-08-27 11:01:09 +09:00
Yusuke Wada
077db0868f
docs(readme): add discord and twitter links (#485) 2022-08-26 21:44:23 +09:00
Yusuke Wada
c7ee2e7603
fix: enable passing Generics to c.req.parseBody, default is any (#481) 2022-08-25 09:25:11 +09:00
Yusuke Wada
ddfe07ecec
feat(types): enable adding Types for variables used in c.set/c.get (#478)
* feat(types): enable adding Types for variables used in `c.set`/`c.get`

* fix typo
2022-08-23 20:53:25 +09:00
Yusuke Wada
54a04c6a6f
fix(context): export ContextVariableMap correctly (#476) 2022-08-23 11:51:18 +09:00
Yusuke Wada
83a95ba895
perf(trie-router): fine tuning, 9~10% faster (#473)
* perf(trie-router): fine tuning, 9~10% faster!

* update readme
2022-08-21 10:11:53 +09:00
Yusuke Wada
869ab52b42 chore: bump up jest-environment-miniflare 2022-08-20 11:43:28 +09:00
Yusuke Wada
b95156e7e6 v2.0.9 2022-08-19 07:32:35 +09:00
Yusuke Wada
d259b7a04d docs(readme): update readme for Deno 2022-08-19 07:30:48 +09:00
Taku Amano
db8619695e
fix(compose): Support a handler that non-async and returning a promise. (#469)
* fix(compose): Support a handler that non-async and returning a promise.

* Update deno_dist via `yarn denoify`.
2022-08-15 12:24:23 +09:00
Yusuke Wada
e23f7fb713
chore: add FUNDING.yml (#468) 2022-08-15 08:58:39 +09:00
Yusuke Wada
74a7cf49f4
docs(readme): update benchmark results (#467) 2022-08-15 08:46:23 +09:00
Yusuke Wada
578833ea85
perf(compose): optimize await (#466)
Do not `await` if the handler is not promise.
2022-08-15 08:35:57 +09:00
Yusuke Wada
9edf43c63b
fix(context): fixed ContextVariableMap is not enabled in built code (#465) 2022-08-12 11:22:30 +09:00
Yusuke Wada
bc5e9b3785 v2.0.8 2022-08-10 21:51:30 +09:00
Yusuke Wada
e07147a8ec
fix(context): fix header values shifting (#463) 2022-08-10 21:34:33 +09:00
Yusuke Wada
8879f241e8
refactor(mime): made .ico file's extension to image/x-icon (#462)
* refactor(mime): made `.ico` file's extension to `image/x-icon`

* fixed deno and bun tests
2022-08-09 10:51:08 +09:00
Yusuke Wada
7345b8105d
fix(ETag): fixed an error when the file size is too large. (#461)
Made `utils/crypto` supports `ReadbleStream`.

Fix #458
2022-08-09 10:35:30 +09:00
Yusuke Wada
0370cac372
refactor(compose): cache length (#460) 2022-08-09 10:28:04 +09:00
Yusuke Wada
6d306b8218 v2.0.7 2022-08-07 06:48:41 +09:00
Yusuke Wada
dbf892bed0 chore: remove .github.com/release.yml
[skip ci]
2022-08-07 06:46:25 +09:00
Yusuke Wada
8a9ebc1470
fix(utils/crypto): make Binary and JSON object crypto correct (#454) 2022-08-06 00:31:11 +09:00
Yusuke Wada
5838f9dccc Revert "refactor: add Json type for JSON object (#453)"
It's difficult to handle `Json`. So, it's ok to go with `object`.

This reverts commit bc736da6a5.
2022-08-05 08:10:41 +09:00
Yusuke Wada
bbe079134e Revert "fix(utils/crypto): stringify the parameter which is object in createHash (#452)"
It was necessary to support not only json but also other.

This reverts commit db17530b36.
2022-08-05 08:09:17 +09:00
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