Skip to content
CAI
Software that uses CAICheck a score

koajs/koa

56.7

Adequate · 13 November 2026

1.9k

lines of production code

JavaScript

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Initial project scaffolding and documentation

This change establishes the foundational structure of the project by adding essential configuration and documentation files. It includes a Codecov configuration for partial coverage, an EditorConfig for consistent coding styles, a .mailmap for author normalization, and a comprehensive AUTHORS file listing all contributors. Additionally, it introduces a CODE\_OF\_CONDUCT.md to define community standards, a detailed History.md documenting version changes from 3.0.0-alpha.3 back to early releases, and a rewritten Readme.md that updates the project description, installation instructions, and code examples to reflect modern Node.js and Koa v3 practices.

(repo-wide) · high confidence

Removals

Removal of legacy Koa example files

The repository has removed several example files from the \examples\ directory, including \compose.js\, \negotiation.js\, \route.js\, \simple.js\, and \streams.js\. These files, which demonstrated older Koa patterns such as generator-based middleware and manual routing, are no longer present in the codebase.

examples · high confidence

Removal of legacy benchmark suite

The legacy benchmarking infrastructure has been removed, including the Makefile, the middleware benchmark script, and the shell-based runner. This eliminates the ability to run performance tests using the old generator-based middleware pattern and the 'wrk' tool with the 'harmony-generators' flag.

benchmarks · high confidence

Behavioural changes

Koa v3 core library rewritten with modern JavaScript and native APIs

The \lib\ directory has been completely rewritten for Koa v3, replacing the legacy prototype-based structure with modern ES6 classes and native Node.js APIs. The \Application\ class now extends \EventEmitter\ and accepts a configuration object in its constructor, while \Context\ is simplified to a prototype object with delegation. Request and response handling now uses native \URLSearchParams\ for query strings, \http-errors\ for error handling, and \mime-types\ for content types. New utility modules like \is-stream.js\ and \only.js\ have been added, while legacy files like \lib/status.js\ have been removed. This change introduces breaking changes in the API surface, including the removal of \app.use()\ chaining, the shift to constructor options, and the deprecation of legacy error handling patterns.

lib · high confidence

Test coverage

Add test helpers for custom streams and context creation; Added application-level test suite; Added comprehensive test coverage for response object methods; Added test coverage for Koa context methods; Added tests for search-params and ESM/CJS interoperability; Added tests for search-params module; Added unit tests for request context properties and methods; Removal of legacy test suites for application and context.

Dependencies

Introduce package-lock.json and modernize Koa 3.2.1 dependencies

This release adds a package-lock.json file to ensure deterministic dependency resolution and updates the project to version 3.2.1. The dependency tree has been significantly modernized: legacy packages like \co\, \debug\, \mime\, \qs\, \negotiator\, and \bytes\ have been removed in favor of specific, maintained utilities such as \accepts\, \content-disposition\, \content-type\, \cookies\, \destroy\, \encodeurl\, \escape-html\, \http-assert\, \http-errors\, \koa-compose\, \mime-types\, \on-finished\, \parseurl\, \statuses\, \type-is\, and \vary\. Dev dependencies have also been updated, replacing older testing and linting tools with \c8\, \gen-esm-wrapper\, \standard\, and \supertest\. Additionally, the minimum supported Node.js version is now 18, and the package exports are configured to support both CommonJS and ES modules.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 57 → 57 (+0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 54 → 54 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 56 → 61 (+4.6)
  • Readiness 50 → 49 (-0.1)
  • Security 73 → 66 (-6.8)
  • Performance 100 → 100 (+0.0)

New (6)

  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Medium: security finding (details withheld)
  • Outdated (npm): encodeurl
  • Repeated repair: lib/request.js (lib/request.js)
  • redundant comment (tests/response/flushHeaders.test.js)

Changes since last survey

  • 6 commits — 1 feature/other, 5 fixes

By area

  • tests/request — 2 commits
  • (root) — 1 commit
  • tests/context — 1 commit
  • tests/lib — 1 commit
  • docs/api — 1 commit

Notable commits

  • fix: fix: keep prototype-based HttpError instanceof checks (#2025)
  • fix: fix: lowercase X-Forwarded-Proto in request.protocol (#2029)
  • fix: fix: parse IPv6 hostname from request.host (#2034)
  • fix: fix: preserve HttpError subclass instance checks (#2033)
  • fix: fix: prevent prototype mutation when parsing query parameters (#2024)
  • change: chore: minor release bump (#2031)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

koajs/koa was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b7ead6f7a2bb56e2948b1c5e1cca77483e89c885 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-f3449e6eb431.