0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-22 11:17:33 +01:00
Commit Graph

1495 Commits

Author SHA1 Message Date
Yusuke Wada
ead3677601
chore: use Bun as a package manager (#2105)
* chore: use Bun as a package manager

* lock `np`
2024-01-29 23:27:54 +09:00
Yusuke Wada
a96f5ec3c6 v4.0.0-rc.3 2024-01-28 05:31:57 +09:00
Yusuke Wada
74865a2c6d Merge branch 'main' into v4 2024-01-27 23:02:59 +09:00
Yusuke Wada
8ad3b61bb4 v3.12.8 2024-01-27 22:47:13 +09:00
Sor4chi
98dcd0d995
fix(package.json): add typesVersions of accepts helper (#2096) 2024-01-27 21:55:48 +09:00
Ame_x
0e8f26ad2f
refactor(hono-base): "if" on one line and deletion of unneeded variables (#2093)
* refactor: "if" on one line

* chore: denoify & format
2024-01-27 21:53:23 +09:00
Ame_x
763c0dab37
refactor: faster for loop in jsx/dom (#2092)
* refactor: faster for loop

* chore: denoify & format
2024-01-27 21:50:57 +09:00
Aris Kemper
b0cac62cf1
refactor: request param (#2088) 2024-01-27 21:33:05 +09:00
Taku Amano
8c62c64631
fix: enable to return Response like object (#2085)
* fix: enable to return Response like object

This improves behavior, especially in cases where Response is being overwritten on a node-server.

* chore: denoify
2024-01-27 21:28:54 +09:00
Ame_x
ab915f9296
feat!: goodbye lagon (#2087)
* goodbye: lagon

* chore: format

* chore: last return
2024-01-27 21:23:28 +09:00
watany
9df32310aa
chore: vitest test.pool to forks (#2098) 2024-01-27 14:32:49 +09:00
Ame_x
b98e850924
feat(types): explicitly specify statusCode (#2073)
* fix: explicit all statusCode

* chore: format

* docs: add jsdoc
2024-01-25 21:42:38 +09:00
Yusuke Wada
b23cf8d65d
fix(factory): correct types inside of createMiddleware() (#2081)
* fix(factory): correct types inside of `createMiddleware()`

* denoify
2024-01-25 21:38:21 +09:00
Yusuke Wada
4ec3a9bf41 v3.12.7 2024-01-25 10:44:45 +09:00
Taku Amano
4a239ad208
fix(hono-base): fix not found handler calling timing when one middleware (#2080) 2024-01-25 10:37:21 +09:00
watany
197d05bb2b
fix:(ssg): make files mandatory in ToSSGResult (#2071) 2024-01-25 05:59:32 +09:00
watany
5809f753dc
fix: await generate hook (#2074)
* fix

* denoify
2024-01-24 14:08:56 +09:00
watany
67f9735175
feat(ssg): support Improve Hook Handling (#2054)
* hook

* merge sample

* test

* fix
2024-01-24 07:10:31 +09:00
Taku Amano
3aa0f3e7b9
feat: Introduce useViewTransition() hook and viewTransition() helper (#2053)
* feat(css): remove async variable support in css helper

This feature probably wont be used much.

* refactor(jsx/dom): we can use `finally()` simply

* refactor(jsx/dom): `HtmlEscapedCallbackPhase.BeforeDom` will not be used anymore.

* refactor(css): re-implement css helper both for renderToString and renderToDom

* feat(jsx/dom): introduce useViewTransition hook

* chore(css): enable to import css module from 'jsx/dom/css'

* refactor(css): insert cssRules at the end of the sheet

* test(css): export `minify()` for test

* test(css): add tests

* refactor(jsx/dom): add support for boolean attributes

* test(jsx/dom): add attribute test

* fix(css): fix type of viewTransition

* refactor(jsx/dom): tweaks startViewTransition function

* fix(jsx/dom): reset style before applying new style

* perf(css): improve css() performance

* test(jsx/dom): add test for `useViewTransition()`

* test: fix eslint error

* chore: denoify
2024-01-23 20:37:11 +09:00
watany
adc90c3712
fix(ssg): Uniformly Convert Paths Ending with Slash to 'index.ext' Format (#2056)
* fix(ssg): trailingslash

* denoify
2024-01-23 18:39:15 +09:00
Ame_x
841f4887de
feat!(JSX Renderer): use DOCTYPE by default (#2064)
* fix: use DOCTYPE by default

* chore: format
2024-01-23 17:35:14 +09:00
Ame_x
fdfa55a770
refactor: rename accept to accepts (#2063)
* refactor: rename accept to accpets

* chore: denoify

* fix: deno entry file
2024-01-23 17:30:57 +09:00
Agata Naomichi
64a24d7b77
fix!(types): Fix context type when chaining routes with middlewares (#2046)
* fix(types): Fix handler return types not to leak Context types

* fix specs

* denoify

* fix specs

* yarm format:fix && yarn denoify

* Add tests
2024-01-23 17:26:22 +09:00
Aris Kemper
27521e68c2
refactor(utils/url): splitRoutingPath (#2058)
* refactor: url util splitRoutingPath

* refactor: splitRoutingPath
2024-01-23 17:20:39 +09:00
Aris Kemper
0802633e7b
refactor(utils/stream): stream pull (#2057) 2024-01-23 17:12:02 +09:00
ryu
45d612d641
refactor(test): change to not use env command (#2062)
* refactor(test): change to not use `env` command

* fix bun test
2024-01-23 17:07:31 +09:00
ryu
39aa58211c
feat(dev): support NO_COLOR (#2007)
* feat(dev): support `NO_COLOR`

* fmt

* remove unused Bun

* follow informal standard

https://no-color.org/

* fmt

* evade denoify bug

When removing optional-chaining, denoify creates node:node:process, so I disable the eslint error by a comment.

* add test

* fix typo

* fix test
2024-01-23 11:15:52 +09:00
Yusuke Wada
66e768e391 v4.0.0-rc.2 2024-01-22 05:51:19 +09:00
Kengo Watanabe
68011665fd
docs: Add JSDoc (#1916)
* docs: Add JSDoc for App

* docs: Add JSDoc for Routing

* docs: Add JSDoc for Context

* docs: Add JSDoc for HonoRequest

* docs: Add JSDoc for Exception

* add .header JSDoc & getPath JSDoc (`nabeken5:feat/add-jsdoc#1`)

* add .header JSDoc & getPath JSDoc

* fix: Apply the format to JSDoc

---------

Thanks @EdamAme-x 
Co-authored-by: Kengo Watanabe <121782456+nabeken5@users.noreply.github.com>

* refactor: format

* feat: run denoify

---------

Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
2024-01-21 23:32:30 +09:00
Aris Kemper
c02b83bccd
refactor: body parser (#2045) 2024-01-21 06:17:48 +09:00
Yusuke Wada
64b98b842d
feat(deno): export accpet helper for deno (#2041)
* feat(deno): export accpet helper for deno

* denoify

* import `context` from `src/context.ts`
2024-01-20 09:15:38 +09:00
Yusuke Wada
37df3dd7d3
refactor(types): name them BlankSchema or BlankInput (#2040)
* feat(types): name them `BlankSchema` or `BlankInput`

* remove `Path` and denoify

* apply to `hono/quick`
2024-01-20 08:59:45 +09:00
Sor4chi
ceefd0212a
feat: improve ssgParams flexibility (#2024)
* feat: accept env from ssgParam context typesafely

* feat: use simple array for ssgParams

* chore: denoify

* refactor: use interface for middleware type definition

* refactor: use 'foo' for example naming

* chore: denoify

* feat: add simple array argument overload to ssgParams

* test: add array param's case

* chore: denoify
2024-01-20 08:15:49 +09:00
Aris Kemper
039cac90ea
refactor: secure headers middleware (#2039) 2024-01-20 07:34:31 +09:00
Aris Kemper
0800accacd
refactor(lambda): aws lambda createResult method (#2038) 2024-01-20 07:27:54 +09:00
Sor4chi
350d904ad0
feat: introduce Accepts Helper (#2001)
* feat: implement accept helper

* yarn denoify

* test: add some usage cases for accept helper

* chore: remove `any` lint warning

* refactor: rename `matchAccept` to `accepts`

* chore: denoify
2024-01-20 07:26:49 +09:00
Taku Amano
6de098533e
refactor(jsx/dom): invoke update() in microtask (#2036)
* refactor(jsx/dom): invoke `update()` in microtask

* fix(jsx/dom): should not render removed node
2024-01-19 23:12:03 +09:00
watany
1f46aa1561
fix(ssg): Remove ArrayBuffer from FileSystemModule's writeFile (#2032) 2024-01-19 20:13:23 +09:00
Yusuke Wada
24723ffb91 Merge branch 'main' into v4 2024-01-19 18:48:21 +09:00
Taku Amano
1fbd27fa9c
feat(jsx/dom): Introduce startViewTransition() (#2020)
* feat(css): support style tag in jsx/dom partially

* feat(jsx/dom): Introduce `startViewTransition()`

* chore: denoify
2024-01-19 16:24:11 +09:00
watany
f76137df3b
fix(SSG): Correct extension of the file output (#2029) 2024-01-19 16:09:15 +09:00
watany
9154714789
feat!(deno): move middleware to helper (#2027)
* move v4

* revert

* denoify
2024-01-19 16:04:15 +09:00
watany
23d96a9b08
refactor(ssg): Removal of Libraries Dependent on Node.js (#2012)
* remove Buffer

* fix

* fix

* type Bun

* test import

* fix & rename

* move a ssg test for deno

* import jsx

* console.log

* update CI

* revert toAbcSSG name

* rename

---------

Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-01-19 11:38:09 +09:00
Yusuke Wada
cce2b3cd21 v3.12.6 2024-01-19 08:09:30 +09:00
Yusuke Wada
b78ca3d388
fix(context): fixed middleware + c.json({}, requestInit) problem (#2025)
* fix(context): fixed middleware + `c.json({}, requestInit)` problem

* denoify
2024-01-19 08:03:51 +09:00
Yusuke Wada
e3051039c6
feat!: validator throws error rathar than return c.json() (#2021)
* feat!: validator throws error rathar than `return c.json()`

* denoify
2024-01-18 23:52:16 +09:00
Agata Naomichi
a5d9ca88c0
fix(types): use middlewares with different env types (#2018) 2024-01-18 21:28:36 +09:00
Taku Amano
4b4e56607a
fix(jsx/dom): find "insertBefore" node from next node list if not found (#2017)
* fix(jsx/dom): find "insertBefore" node from next node list if not found

* fix(jsx/dom): remove redundant applyProps() call

* chore: denoify

* test(jsx/dom): fix type error in test
2024-01-18 21:02:45 +09:00
Yusuke Wada
cadfc0cada v4.0.0-rc.1 2024-01-18 13:54:54 +09:00
Yusuke Wada
9090620276
chore(runtime-test): add deno.lock (#2015) 2024-01-18 13:51:52 +09:00