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

1562 Commits

Author SHA1 Message Date
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
Yusuke Wada
c62200739c
chore(package.json): specify the config in test:deno (#2014) 2024-01-18 13:43:19 +09:00
Yusuke Wada
fd9d54ac87 Merge branch 'main' into v4 2024-01-18 13:23:55 +09:00
Aris Kemper
5fa31858be
refactor: jwt (#2011)
* refactor jwt

* refactor change to camel case naming
2024-01-18 08:51:46 +09:00
Aris Kemper
8a1d8fb24b
refactor: cors (#2009) 2024-01-18 08:48:50 +09:00
Aris Kemper
fb0b9d42a3
feat: add script for watch, remove tsc from test (#2008)
* feat: add script for watch, remove tsc from test

* feat: reverted back to use of tsc with no emit in test
2024-01-18 08:46:56 +09:00
Taku Amano
b88087b3f9
refactor(jsx/dom): make useTransition() handling more simple (#2003)
Execution by `setTimeout()` does not overtake the first `update()` and thus there is no need to use `promise`.
2024-01-18 08:45:23 +09:00
Taku Amano
a57d1b2a2b
feat(jsx/dom): support createContext and useContext in jsx/dom (#1999)
* feat(jsx/dom): support createContext and useContext in jsx/dom

* refactor(jsx): remove dependencies to jsx/dom from jsx/index.ts
2024-01-18 08:43:29 +09:00
Yusuke Wada
19259d3a5c
fix(ssg): fixed isDynamicRoute and ssgParams matter (#2006)
* fix(ssg): fixed `isDynamicRoute` and `ssgParams` matter

* denoify
2024-01-18 08:38:54 +09:00
Aris Kemper
ed0efa7929
refactor: Refactor middleware, tests (#2005)
* refactor: test, basic auth, cache

* refactor: deno dist files

* refactor: formating

* refactor: format deno basic-auth

* refactor: revert package.json test changes
2024-01-17 23:16:02 +09:00
Shotaro Nakamura
f23248397e
feat: Added ssgParams middleware (#1960)
* feat(ssg): add ssgParams middleware

* chore: add test code

* chore: `yarn denoify`

* fix(codestyle): import order

* chore: Ran pretter to pass CI test

* chore: reran denoify to pass CI test

* feat: Remove hybrid feature from `ssgParams`

* feat: Add context argment to generateParams

* chore: Format code

* chore: denoify

* fix: module not found error when running on Deno

* refactor: remove argment `options`

* chore: denoify

* refactor: add test for `ssgParams`

* fix: syntax error

* chore: denoify

* chore: format code

* chore: denoify
2024-01-17 17:39:20 +09:00
watany
aef29d9773
feat(ssg): Ignore Dynamic Route (#1990)
* setting

* denoify

* fix test

* fix judge dynamycroute

* revert

* denoify
2024-01-17 17:26:19 +09:00
Taku Amano
e9c6dd224c
refactor(jsx): export components and hook function from top level 'hono/jsx' (#1997)
* refactor(jsx): export components and hook function from top level 'hono/jsx'

* docs(jsx/hooks): add comment to useState

* refactor(jsx/hooks): remove redundant if statement

* refactor(jsx/dom): remove redundant temporary variable

* refactor(jsx/dom): use already calculated offset value instead of container.childNodes.length

* refactor(jsx/dom): Omit the else clause for shorten

* refactor(jsx/dom): remove unnecessary null check

* docs(jsx/dom): add note about text node update

* chore: denoify
2024-01-17 05:56:01 +09:00
Taku Amano
32e1b6dd94
feat(jsx/dom): startTransition() and useTransition() (#1996)
* feat(jsx/dom): startTransition() and useTransition()

* chore: denoify

* feat(jsx): add useDeferredValue()

* chore: denoify

* test(jsx): `npm run format:fix`ed
2024-01-17 05:26:59 +09:00
Yusuke Wada
fa14947a3f
fix(types): correct c.get() inference (#1995)
* fix(types): correct `c.get()` inference

* denoify
2024-01-16 21:21:37 +09:00
Taku Amano
ce5f4acd3d
feat(jsx/dom): provide jsx-runtime and jsx-dev-runtime via jsx/dom (#1986)
* feat(jsx/dom): rewrite renderer to use virtual tree

* test(deno): add runtime_tests/deno/deno.json in order to allow `document`, `Element`, etc.

* refactor(jsx/dom): Removed redundant `map()` calls

* refactor(jsx/dom): tweaks getNextChildren for reduce code size

* refactor(jsx/dom): optimize findInsertBefore

* refactor(jsx/dom): optimize `build()`

* refactor(jsx/dom): reuse oldChild even in text nodes.

* feat(jsx/dom): handle promise rejection in use()

* feat(jsx): The result of using Suspense and use() is now the same as React's renderToReadableStream().

* chore: denoify

* test(deno): "dom.iterable" is required for 'Headers.entries()'

* feat(jsx/dom): provide jsx-runtime and jsx-dev-runtime via jsx/dom

* refactor(jsx/dom): Enable to import dom specific Suspense and ErrorBoundary from hono/jsx/dom

* test(jsx/dom): remove unused test. await component is not supported.

* feat(jsx/dom): support old style jsx

JSXNode from old style jsx sometimes has no props.

* chore: denoify

* test(jsx/dom): Run tests for hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime

* test(jsx/dom): tests for Suspense and ErrorBoundary both for common and dom

* feat(jsx/dom): support old style jsx

JSXNode from old style jsx sometimes has no props.

* chore: denoify

* chore(vitest): fix typo
2024-01-16 21:18:00 +09:00
Yusuke Wada
a183fe403e
chore: enables lint and format for .tsx (#1994)
* chore: enables lint and format for `.tsx`

* ignore
2024-01-16 18:38:26 +09:00
Yusuke Wada
ce87efc1fe
feat!(cloudflare-workers): make manifest required (#1984)
Co-authored-by: Kei Kamikawa <Code-Hex@users.noreply.github.com>
2024-01-16 18:02:25 +09:00
mosle
a00fc566e9
feat(lambda-edge): Add Type to request for Lambda@Edge adapter to support S3 origin (#1991) 2024-01-16 17:39:34 +09:00
Yusuke Wada
1ad251c1ba v3.12.5 2024-01-16 14:08:40 +09:00
Yusuke Wada
f380467748
fix(trie-router): fixed same name path params matter (#1992)
* fix(trie-router): fixed same name path params matter

* denoify
2024-01-16 14:06:20 +09:00
Ame_x
7217a50fee
refactor: faster for loop (#1989)
* refactor: faster

* chore: denofiy

* chore: format
2024-01-16 11:36:38 +09:00
Taku Amano
62f11a2817
feat(jsx/dom): rewrite renderer to use virtual tree (#1981)
* feat(jsx/dom): rewrite renderer to use virtual tree

* test(deno): add runtime_tests/deno/deno.json in order to allow `document`, `Element`, etc.

* refactor(jsx/dom): Removed redundant `map()` calls

* refactor(jsx/dom): tweaks getNextChildren for reduce code size

* refactor(jsx/dom): optimize findInsertBefore

* refactor(jsx/dom): optimize `build()`

* refactor(jsx/dom): reuse oldChild even in text nodes.

* feat(jsx/dom): handle promise rejection in use()

* feat(jsx): The result of using Suspense and use() is now the same as React's renderToReadableStream().

* chore: denoify

* test(deno): "dom.iterable" is required for 'Headers.entries()'
2024-01-16 11:32:44 +09:00
watany
c4f4ab06b6
feat(ssg): Implement Dynamic File Extension on MIME Type and Enhanced Response Handling (#1968)
* v0.1

* v0.2

* v0.3

* fix test

* adding test

* denoify

* fix comment
2024-01-15 18:08:50 +09:00
Yusuke Wada
6a8b4e61ba Merge branch 'main' into v4 2024-01-15 16:17:45 +09:00
Yusuke Wada
7d8cdd5e30 v3.12.4 2024-01-15 16:10:43 +09:00
Yusuke Wada
884e6d5bc4
fix(trie-router): fixed the issue same param name is used (#1983)
* fix(trie-router): fixed the issue same param name is used

* denoify
2024-01-15 16:07:23 +09:00
Ame_x
aaab8d9b3d
fix(ssg): fix path parser bug & refactor code (#1976)
* refactor util & fix bug

* add test case

* denoify

* format & denoify

* faster & add test & denoify
2024-01-15 09:29:06 +09:00
Yusuke Wada
5d1dd2f626
feat(factory): remove deprecated from Factory and createHandlers (#1979)
* feat(factory): remove `deprecated` flag from `Factory` and `createHandlers`

* denoify
2024-01-15 02:10:11 +09:00
Shotaro Nakamura
4a173c947d
refactor(ssg): SSG works without node:path (#1965)
* feat: SSG works without `node:path`

* chore: denoify

* chore: pretter

* chore: move `joinPath` and `dirname` functions

* chore: format code

* chore: denoify

* feat: add more test code

* fix: forgot remove `console.log`

* fix(ssg): Invalid joined path
If `/test` and `/test2` joined, joined path should be `/test/test2`

* chore: denoify
2024-01-15 00:00:04 +09:00
Yusuke Wada
4560df5efc
ci: remove lagon runtime tests and other lagon things (#1971)
* ci: remove lagon runtime tests and other lagon things

* remove lagon from github actions
2024-01-14 19:09:09 +09:00
Bruce Harrison
03b6903b96 feat(jsx-renderer): Nested Layouts via Renderer (#1945)
* setup basic test

* naive implementaton kinda working

* pass props to parent layout

* most tests passing

* tests passing

* remove files

* reset files

* reset files

* leave note

* introduce `<Layout>`

* denoify

* fixed type error

---------

Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-01-14 16:55:14 +09:00
Yusuke Wada
a2d0417fa3
refactor: remove and fix comments (#1970)
* refactor: remove and fix comments

* denoify
2024-01-14 10:31:07 +09:00
Yusuke Wada
7b83a89dd7
refactor: remove unnecessary import (#1969)
* refactor: remove unnecessary `import`

* denoify
2024-01-14 04:00:51 +09:00