Yusuke Wada
9de6328f87
feat: app.onError
for handling error ( #111 )
2022-02-20 22:43:14 +09:00
Yusuke Wada
49fedca6a4
feat: app.notFound
for default 404 not found ( #110 )
2022-02-20 19:59:51 +09:00
Taku Amano
92513d0527
feat: RegExpRouter ( #109 )
...
* Make the Router abstract class.
* Introduce RegExpRouter.
* Add RegExpRouter to benchmark target.
* Optimize for special short routes.
```
* "*"
* "/path/to/*"
* "/path/to/*/content"
```
* Add assertion to `add` method.
2022-02-20 19:14:46 +09:00
Yusuke Wada
ea329b8369
docs: update benchmark results
2022-02-18 10:25:55 +09:00
Taku Amano
e53873f0a1
perf: Optimize router ( #108 )
...
* Cache compiled RegExp object for patterns.
* Cache a Pattern object to reduce memory usage.
* Apply prettier.
2022-02-18 10:20:11 +09:00
Yusuke Wada
b0b6f7f8a3
refactor: router must have only one hander ( #107 )
...
* refactor: router must have only one hander
* docs: update benchmark
2022-02-17 21:46:34 +09:00
Yusuke Wada
9c397fbff3
chore: set up prettier ( #106 )
2022-02-17 21:24:08 +09:00
Yusuke Wada
fca3ddeb87
bump up to v0.4.0
2022-02-16 11:08:47 +09:00
Yusuke Wada
c5cc9f25a6
feat: nested route ( #105 )
...
# BREAKING CHANGES!!!
`app.route` is changed:
**Chained route** is obsolete:
```
app.route('/')
.get((c) => c.text('get /'))
// ^^^ Not working now!!
```
Now, `app.route` enables **nested route**:
```
const book = app.route('/book')
book.get('/', (c) => c.text('List books')) // => GET /book
book.get('/:id', (c) => {
return c.text('Get Book: ' + c.req.param('id'))) // => GET /book/:id
})
```
2022-02-16 11:06:22 +09:00
Yusuke Wada
7efda2e32f
refactor: do some refactoring ( #104 )
2022-02-16 08:11:22 +09:00
Yusuke Wada
d7fe0b0d67
tweak
2022-02-15 21:26:59 +09:00
Yusuke Wada
b9286d0f4f
docs: update readme
2022-02-15 17:19:53 +09:00
Yusuke Wada
c123d5f78d
feat: add option for no
strict routing ( #103 )
...
default is `strict`
2022-02-15 16:52:06 +09:00
Yusuke Wada
354dd795b0
bump up to v0.3.8
2022-02-14 15:35:41 +09:00
Taku Amano
1b681959b2
feat: add type to c.req.param key. ( #102 )
...
* Added type to c.req.param key.
* Also, added type to "all".
2022-02-14 15:31:31 +09:00
Yusuke Wada
9db4f6f94d
chore: update examples ( #101 )
...
* chore: fixed serve-static example
* chore: update mustache example
* chore: remove unnecessary fields
* chore: update durable objects example
2022-02-12 14:45:29 +09:00
Yusuke Wada
298a3e8724
chore(example): update miniflare version
2022-02-10 20:54:54 +09:00
Yusuke Wada
cbcefa2a3c
fix: exports package.json
2022-02-10 10:00:45 +09:00
Yusuke Wada
39ed68b4cc
chore: fix hono-example-blog ( #100 )
2022-02-10 09:59:02 +09:00
Yusuke Wada
f51d0f08c1
fix: typo
2022-02-10 07:26:49 +09:00
Yusuke Wada
f3fbe68613
docs: update readme ( #99 )
2022-02-09 23:14:44 +09:00
Yusuke Wada
60df36b294
refactor: remove not used files ( #98 )
2022-02-09 22:51:59 +09:00
Yusuke Wada
24f4a7c5cb
chore: update nano-jsx example ( #97 )
2022-02-08 22:59:58 +09:00
Yusuke Wada
1b65c44de0
tweak
2022-02-08 22:08:18 +09:00
Yusuke Wada
b872cd2e56
Bump v0.3.7
2022-02-08 05:54:53 +09:00
Yusuke Wada
8e8b01703a
feat: exports buffer util ( #96 )
2022-02-08 05:53:56 +09:00
Yusuke Wada
4cfe5bb2d2
Merge pull request #95 from metrue/fix-typo
...
Flamework to Framework
2022-02-07 16:50:24 +09:00
Minghe
d1d790a9a8
fix(typo): flamework is framework
2022-02-07 14:44:33 +08:00
Minghe
fb3b9b80e5
Merge remote-tracking branch 'upstream/master'
2022-02-07 11:51:58 +08:00
Yusuke Wada
2aa44417ee
Bump to v0.3.6
2022-02-05 23:31:57 +09:00
Yusuke Wada
d77d890a73
feat: check response type ( #94 )
...
* feat: check response type
* refactor
* refactor: add types
2022-02-05 23:30:43 +09:00
Yusuke Wada
a72660bd66
feat: auto set statusText
( #93 )
...
* refactor: context
* tweak
* feat: auto set status text
2022-02-05 22:20:34 +09:00
Yusuke Wada
c883563d05
refactor: do not import middleware
2022-02-05 21:16:26 +09:00
Yusuke Wada
05747404e8
refactor: remove default middleware ( #91 )
...
Fixed some bugs about handling req/res object on middleware.
2022-02-05 00:28:24 +09:00
Yusuke Wada
489a241a61
test: add default middleware test ( #90 )
2022-02-04 23:37:18 +09:00
Yusuke Wada
c38f1c896c
Bump v0.3.5
2022-02-04 08:02:10 +09:00
Yusuke Wada
e1e8130c11
feat: add root option on mustache middleware ( #89 )
2022-02-04 08:01:12 +09:00
Yusuke Wada
c8184b7fb8
fix: default content-type ( #88 )
...
* fix: default content-type
* fixed for tests
2022-02-04 06:36:27 +09:00
Yusuke Wada
b049cfa213
Bump to v0.3.4
2022-02-03 22:11:52 +09:00
Yusuke Wada
30b0c447aa
fix: use require ( #87 )
2022-02-03 22:11:19 +09:00
Yusuke Wada
48b1b8194c
Bump v0.3.3
2022-02-03 08:44:31 +09:00
Yusuke Wada
d5280a1e0a
feat: Basic-auth with polyfill ( #86 )
...
* feat: Basic-auth with polyfill
Basic auth support Fastly Compute@Edge with polyfills
* Try-cache
* Add negative tests
2022-02-03 08:40:20 +09:00
Yusuke Wada
0297e178d5
Bumped v0.3.2
2022-02-02 17:56:07 +09:00
Yusuke Wada
04bb4bbb33
fix: Unicode problem about atob/btoa ( #85 )
...
https://github.com/yusukebe/hono/pull/84#pullrequestreview-870144435
Thank you @danielweck
2022-02-02 17:53:30 +09:00
Yusuke Wada
ebec91cbd9
Bumped v0.3.1
2022-02-02 10:30:42 +09:00
Yusuke Wada
4c213e4379
fix: use atob
for basic auth ( #84 )
...
* fix: use `atob` for basic auth
* Update readme
* fallback
2022-02-02 10:26:48 +09:00
Yusuke Wada
0fe95bc81f
fix: basic auth ( #83 )
...
Installing `buffer` and `crypto` packages enables basic auth,
if `buffer` of `crypto` is not in pollyfills such as webpack 5 environment.
Close #82
2022-02-02 08:45:08 +09:00
Yusuke Wada
55878788c5
fix: require mustache package
2022-02-02 05:38:04 +09:00
Yusuke Wada
22f6e724d8
Bumped v0.3.0
2022-02-01 22:17:01 +09:00
Yusuke Wada
7dd486ad7b
feat: builtin middleware as sub module ( #81 )
...
# BREAKING CHANGES!!
Now, builtin middleware are not in main package. You can't use `Middleware.logger()` method. Call sub modules if needed:
```js
import { Hono } from 'hono'
import { poweredBy } from 'hono/powered-by'
import { logger } from 'hono/logger'
const app = new Hono()
app.use('*', poweredBy())
app.use('*', logger())
```
Closes: #80
---
* feat: builtin middleware as sub module
* fixed middleware
* Update readme
* Add types
* New gif
2022-02-01 22:15:00 +09:00