forked from honojs/hono
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from honojs:main #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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]>
* 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
…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
…#4149) Co-authored-by: Taku Amano <[email protected]>
* 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 : )