Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Feb 2, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? đź’– Please sponsor : )

yusukebe and others added 28 commits February 4, 2025 18:52
* fix(helper/adapter): correct `env` type

* support another pattern and add test
* migrate to vitest v3

* await assertions

* tweak

---------

Co-authored-by: Yusuke Wada <[email protected]>
* feat(helper/proxy): introduce proxy helper

* chore(helper/proxy): expose proxy helper

* test(helper/proxy): fix test name

* fix(helper/proxy): return Content-Range header as it is

Co-authored-by: Haochen M. Kotoi-Xie <[email protected]>

* refactor(helper/proxy): return the original content-length if the response is uncompressed

* feat(middleware): enable to pass `...c.req` to init options

* refactor(middleware/proxy): rename `proxyFetch` to `proxy`

* docs(helper/proxy): update example

* docs(helper/proxy): fix typo

* refactor(helper/proxy): also accept HonoRequest instance as request init

* fix(helper/proxy): remove hop-by-hop headers

* refactor(helper/proxy): build request init from request

* fix(helper/proxy): fix type error

Co-authored-by: Yusuke Wada <[email protected]>

* test(helper/proxy): add test for modify header

* fix(helper/proxy): It is generally the Set-Cookie that should be removed from the response header

---------

Co-authored-by: Haochen M. Kotoi-Xie <[email protected]>
Co-authored-by: Yusuke Wada <[email protected]>
* feat(logger): include query param

* optimize slice path
* feat(factory): Allow HonoOptions<E> with factory

* refactor(factory): rename defaultOptions to defaultAppOptions
* feat(language-detector): add language detector middleware and helper function

* chore(language-detector): add export in package.json

* chore(language-detector): add export to jsr

* feat: new parse-accept helper, add edge case tests

* chore: add jsr for parse-accept

* fix: export default options, remove empty type

* refac: rename languageDetectorMiddleware to languageDetector

* chore format code

* refac: apply patches

* refactor: change export type in language
* feat(hono/context): add buffer returns

* test: add bun & deno tests for buffers

* fix(hono/context): buffer -> uint8array for web standards

---------

Co-authored-by: askorupskyy <[email protected]>
* Update cookie.ts

* Integrated `priority` option into setCookie serialization tests

* Add kid' to TokenHeader, fix Jwt.sign ignoring privateKey.alg with keyAlg fallback, add decodeHeaders utility

- Added "kid" (Key ID) for TokenHeader
- Fixed Jwt.sign() ignoring privateKey.alg
- Renamed `alg` parameter to `KEYAlg` to differentiate between privateKey.alg
- Added utility function `decodeHeaders` to decode only JWT headers

* Add ./src/middleware/jwk/jwk.ts to jsr.json

* Add hono/jwk to exports

* feat(hono/jwk)

Hono JWK Middleware main features:
- Ability to provide a list of public JWKs to the keys parameter as a simple javascript array []
- Ability to provide a URL in the jwks_uri parameter to fetch keys from + an optional RequestInit (useful for caching if your cloud provider has a modified fetch that supports it, or if you simply want to modify the request)
- Ability to provide an async function that returns an array to the keys parameter instead of a direct array, so that it is possible to implement own custom caching layer without a separate middleware
- Allows setting a keys directory for multi-key auth systems
- Allows auth endpoints to be always updated with the Auth provider's public JWKs directory (often `.well-known/jwks.json`) which makes key rotations without disruptions possible

Todo:
- More tests.

* (feat/Jwt.verifyFromJwks) / batteries included util

* Update index.ts

* add JwtHeaderRequiresKid exception

* using Jwt.verifyFromJwks now

* improved jsdoc and formatting

* jsdoc update

* formatting

* testing jwk's `keys` receiving an async function

* removed redundancy

* add 'Should authorize Keys function' test

Added /auth-keys-fn/* & /.well-known/jwks.json testing endpoints to the router.

* added jwks_uri test + improved test descriptions

* test naming consistency

* explicit return fix + moving global declaration merging to own interface

* cleaner jsdoc @example

* removed commented-out tests unnecessarily inflating changes

* ExtendedJsonWebKey -> HonoJsonWebKey

* Refactor test to use msw per @yusukebe's suggestion

* removed stray log + added minor validation w/ @Code-Hex

Also removed redundant "import type {} from '../..'" from 3 different files:
- jwk/index.ts
- jwt/index.ts
- request-id/index.ts

* Update index.ts

* add more test coverage

* more test coverage

* lint & format

* typo

* 100/100 test coverage

Note: Moved more code from `hono/jwk` to the `verifyFromJwks` function for backends that require JWK verification logic beyond just a middleware

* final touch

* added eslint-disable + type export
* feat(etag): allow for custom hashing methods to be used to etag

* chore: add jsdoc

* fix jsdoc

* cleanup

* fix: remove unneed code

* fix arg name

* fix
…s. (#3888)

* feat(router): support greedy matches with subsequent static components.

* feat(router): support more complex greedy matches patterns
* test(combine): add test for error in next function

Co-authored-by: satoshun00 <[email protected]>

* fix(combine): halt middleware evaluation if error in `next()`

* refactor(combine): simplify next function handling

* fix(combine): do not call skipped middleware even if next function throws an error with returning truthy value middleware

* test(combine): refactor test code

* test(combine): Modified tests to cover modified cases

---------

Co-authored-by: satoshun00 <[email protected]>
… LLRT (#3915)

* fix(lambda-edge): remove

* changne aprocach

* Revert "fix(lambda-edge): remove"

This reverts commit e80ce9b.

* revert

* revert 2
* fix(etag): remove parts that may cause unintended behavior

* 2

* fix

* refactor

* chore: lint

Co-authored-by: Taku Amano <[email protected]>
* header key is case-insensitive
* delete header if value is null or undefined
* test(helper/proxy): missing proxy response status

* fix(helper/proxy): include status and statusText in the response
…ses (#3928)

* fix(proxy): remove spread operator from `Request` and `Response` classes

* revert: remove spread operator from proxy
…3932)

* fix(compose): remove unnecessary complexity  and improve testing

* test: add tests
isnifer and others added 29 commits April 8, 2025 16:10
…#4049)

* refactor: explain each test cases more descriptive

* fix: trailing slash middleware should handle HEAD request (#4048)
…ized (#4078)

* fix(context): don't throw the error with `c.header()` when it's finalized

Co-authored-by: Taku Amano <[email protected]>

* remove the line break

---------

Co-authored-by: Taku Amano <[email protected]>
* feat(ws): upgradeWebSocket in return

* remove unneeded dep

* add test

* fix: rpc

* fix
* Fix SSG Extension Map

Pass the extension map through the generation methods.

* Update tests based on feedback

* Fix content type
* fix(hono-base): copy notfound and error handlers in `#clone()`

* remove `only`
* chore(deps): add typescript-go preview as devDeps

* ci: add typescript-go benchmark

* ci: use BENCHMARK_TS_IMPL env variable to change PR comment content by tsc impl

* refactor: extract the performance check workflow into composite action

* ci: separate config file for tsc and tsgo to consistent comment behavior

* ci: rename env var to BENCHMARK_TS_IMPL_LABEL for clarity and remove default
Add CLAUDE.local.md and settings.local.json to prevent committing
personal Claude Code configuration files.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <[email protected]>
…If-None-Match' (#4171)

* fix(middleware/etag): should return 304 when weak etag is passed in  'If-None-Match'

Co-authored-by: EdamAme-x <[email protected]>

* fix(etag): correct formatting in tests and improve readability of etag matching logic

---------

Co-authored-by: EdamAme-x <[email protected]>
* fix(etag): fallback if `res.clone()` is not supported

* update the comments

* updated the comments
@pull pull bot merged commit 548d73f into Mu-L:main Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.