honojs/hono 1e629125..ecdbd5eb
base and head as given
- Language detection is a new middleware capability.
- Accept-header parsing moved from request helpers into shared utilities.
- Language detection now depends on shared accept-header parsing.
- files changed
- 9
- in a component
- 4
- lines in components
- 413
- components
- 3
- public routes changed
- 0
- schema statements
- 0
- new dependencies
- 0
- excluded by role
- 5
Language detection
Added- Before
- Language detection did not exist
- After
- Requests gain a language value
Applications can add middleware that selects a supported language from query parameters, cookies, headers, or URL paths and stores it on the request context. Detected languages can be cached in a cookie.
In favour
- In favour: Configurable detection order supports application-specific precedence
- In favour: Only configured supported languages reach request context
The model found nothing to weigh against this.
Inspect 2 source files behind this explanation
Shared accept-header parsing
Modified- Before
- Parsing lived in request helpers
- After
- Utilities provide shared parsing
Accept-based helpers and language detection now share one parser that orders header values by quality score and preserves their original order when scores tie.
In favour
- In favour: Preserves header order when quality scores tie
The model found nothing to weigh against this.
Inspect 2 source files behind this explanation
2 new dependencies between components — Language Middleware → Helper · Language Middleware → Utils
What else could behave differently
2 components · 4 filesThese components import changed code, directly or through other files. A traced dependency is a place to review, not a confirmed runtime failure.
Reached 2
| Component | Symbol | Cited at | Files | Reached by |
|---|---|---|---|---|
| Helpersrc/helper/ | Added parseAccept | src/utils/accept.ts:12-24 | 2 | 1 direct · 1 at two stepsTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| Language Middlewaresrc/middleware/language/ | Added DetectorType1 of 10 changed symbols reaching it | src/middleware/language/language.ts:10 | 2 | 2 directTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
Statements 2
parseAccept export reached 2 Helper files; all 7 names in its origin file changed. 11DetectorType export reached 2 Language Middleware files; all 18 names in its origin file changed. 23 reached files belong to no component — tests, docs and config.
Routes, schema, dependencies
No public URL, no migration and no new package.
Inspect components, files and symbols
Component
File
Diff
Analysis scope
453 → 3- files at head453
- components56
- changed by this change3
Where the new files landed
3 new files| New file | Belongs to | Used by | Calls | Serves |
|---|---|---|---|---|
| src/utils/accept.ts | Utilsbase frame | HelperLanguage Middleware | nothing outside its own component | — |
| src/middleware/language/2 new files | Language Middlewarenew territory | — | src/HelperUtils | ./language |
2 added files carry no component — 2 test.
9 files changed, 8 claims stated. 2 components reached in total.