Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: honojs/hono
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.12.19
Choose a base ref
...
head repository: honojs/hono
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.12.23
Choose a head ref
  • 20 commits
  • 31 files changed
  • 12 contributors

Commits on May 19, 2026

  1. Configuration menu
    Copy the full SHA
    dcabbec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eb2d0c2 View commit details
    Browse the repository at this point in the history
  3. 4.12.20

    yusukebe committed May 19, 2026
    Configuration menu
    Copy the full SHA
    c657a39 View commit details
    Browse the repository at this point in the history
  4. Merge commit from fork

    usualoma authored May 19, 2026
    Configuration menu
    Copy the full SHA
    5463db2 View commit details
    Browse the repository at this point in the history
  5. Merge commit from fork

    usualoma authored May 19, 2026
    Configuration menu
    Copy the full SHA
    905aedb View commit details
    Browse the repository at this point in the history
  6. Merge commit from fork

    * fix(ip-restriction): match static IP rules numerically
    
    * fix: throw TypeError for invalid IP addresses in ipaddr utils
    
    * fix(ip-restriction): validate CIDR prefixes
    usualoma authored May 19, 2026
    Configuration menu
    Copy the full SHA
    c831020 View commit details
    Browse the repository at this point in the history
  7. Merge commit from fork

    usualoma authored May 19, 2026
    Configuration menu
    Copy the full SHA
    6cbb025 View commit details
    Browse the repository at this point in the history
  8. 4.12.21

    yusukebe committed May 19, 2026
    Configuration menu
    Copy the full SHA
    a83ddb8 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2026

  1. chore: update vitest to v4 and cleanups (#4952)

    * chore: update vitest to v4 and cleanups
    
    * ci: apply automated fixes
    
    * fix: vitest jsx import
    
    ---------
    
    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    BlankParticle and autofix-ci[bot] authored May 22, 2026
    Configuration menu
    Copy the full SHA
    cf6ef70 View commit details
    Browse the repository at this point in the history
  2. fix(mime): specify charset parameter per MIME type instead of mechani…

    …cal detection (#4912)
    
    Per #4510:
    
    - Inline `; charset=utf-8` in `_baseMimes` for all text/* entries plus
      `image/svg+xml`, `application/xhtml+xml`, and `application/xml`,
      which are XML-based formats that benefit from an explicit charset.
    - Drop the `if (mimeType.startsWith("text"))` block in `getMimeType`;
      the charset now lives in the data, not in the lookup logic. Output
      for text types is unchanged (still "text/<sub>; charset=utf-8").
    - Update `getExtension` to compare the base type (the part before the
      first `;`), so callers can pass either a raw type ("text/html") or
      one with parameters ("text/html; charset=utf-8") and still get the
      correct extension back.
    
    Tests: 5 mime.test.ts cases pass (3 existing + 2 new) covering the new
    charset values for svg/xhtml/xml/ics/mjs/css/csv and getExtension with
    parameters.
    
    Closes #4510
    renatograsso10 authored May 22, 2026
    Configuration menu
    Copy the full SHA
    a192df0 View commit details
    Browse the repository at this point in the history
  3. fix(compress): respect Accept-Encoding when encoding option is set (#…

    …4951)
    
    * fix(compress): skip compression when client does not accept the configured encoding
    
    When the encoding option is set, the middleware previously compressed responses
    unconditionally, regardless of the Accept-Encoding header. This could send a
    response in an encoding the client cannot decode (for example, returning gzip
    when the client only advertised deflate, or when Accept-Encoding is absent).
    
    Honor the client's Accept-Encoding header even when an encoding is explicitly
    configured, falling back to no compression when the configured encoding is
    not accepted.
    
    * fix(compress): use parseAccept to honor q-values, wildcard, and case
    
    Address review from @yusukebe. The previous version used String.includes
    on the raw Accept-Encoding header, which treated x-gzip as gzip, ignored
    q=0 explicit refusals, and did not understand the wildcard. Switch to
    parseAccept (already used by accepts middleware) and pick the candidate
    encoding with the highest non-zero q value, falling back to the wildcard
    q if the candidate has no explicit entry.
    
    Add seven regression tests covering q=0 on the configured encoding, q=0
    fallback to another candidate, wildcard \*, case-insensitive tokens,
    x-gzip non-matching, highest-q wins, and gzip-over-deflate tie-break.
    
    * fix(compress): short-circuit selectEncoding when q is 1
    
    Per @usualoma: q values are almost always 1 in practice, so short-circuit
    and return immediately for the common path instead of continuing to scan
    the remaining candidates.
    
    
    Co-authored-by: Yusuke Wada <[email protected]>
    Co-authored-by: Taku Amano <[email protected]>
    3 people authored May 22, 2026
    Configuration menu
    Copy the full SHA
    f0ed246 View commit details
    Browse the repository at this point in the history
  4. fix(deno): echo negotiated WebSocket subprotocol in upgrade response (#…

    …4955)
    
    * fix(deno): echo negotiated WebSocket subprotocol in upgrade response
    
    The Deno adapter did not set the `Sec-WebSocket-Protocol` header on the
    upgrade response, so browsers such as Chrome rejected connections that
    requested a subprotocol. Read the first value from the request's
    `Sec-WebSocket-Protocol` header and pass it as the `protocol` option to
    `Deno.upgradeWebSocket`, while still honoring an explicitly provided
    `protocol` option.
    
    Closes #4439
    
    * add a test
    
    ---------
    
    Co-authored-by: ATOM00blue <[email protected]>
    Co-authored-by: Yusuke Wada <[email protected]>
    3 people authored May 22, 2026
    Configuration menu
    Copy the full SHA
    7e0555d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6bc0dff View commit details
    Browse the repository at this point in the history
  6. 4.12.22

    yusukebe committed May 22, 2026
    Configuration menu
    Copy the full SHA
    2f01b77 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2026

  1. fix(serve-static): normalize all backslashes in file paths, not just …

    …the first (#4962)
    
    `getFilePathWithoutDefaultDocument` converts backslash separators to slashes so
    the same path resolves consistently regardless of the separator style of the
    incoming request. The replace used a non-global regex (`/\/`), so only the
    FIRST backslash was converted: a path with multiple segments like
    `foo\bar\baz.txt` became `foo/bar\baz.txt` — mixed separators that resolve to the
    wrong file (or 404) on platforms that don't treat `\` as a separator. The
    adjacent comment (`foo\bar.txt => foo/bar.txt`) shows the intent was to
    normalize all of them.
    
    Fix: add the `g` flag (`/\/g`). Behaviour is unchanged for any path with zero
    or one backslash, so all existing tests pass; added a regression test covering a
    multi-segment path (with and without `root`) that returns the broken
    `foo/bar\baz.txt` before this change.
    
    tsc --noEmit clean; eslint + prettier clean.
    
    Co-authored-by: Prodia Evolution Worker <[email protected]>
    Prodia Evolution Worker
    francisjohnjohnston-web and Prodia Evolution Worker authored May 24, 2026
    Configuration menu
    Copy the full SHA
    82dad62 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c84c5d2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0265a54 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2026

  1. feat(compress): add contentTypeFilter option and `COMPRESSIBLE_CONTEN…

    …T_TYPE_REGEX` re-export (#4961)
    
    Co-authored-by: Taku Amano <[email protected]>
    na-trium-144 and usualoma authored May 25, 2026
    Configuration menu
    Copy the full SHA
    c968177 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bcd290a View commit details
    Browse the repository at this point in the history
  3. 4.12.23

    yusukebe committed May 25, 2026
    Configuration menu
    Copy the full SHA
    83bfb3b View commit details
    Browse the repository at this point in the history
Loading