Open-Source Wikis

/

Prisma

/

By the numbers

prisma/prisma

By the numbers

A quantitative snapshot of the prisma/prisma codebase. Data collected on 2026-04-30 from git ls-files and git log against main at commit d6d9fc9ed.

Size

xychart-beta horizontal
    title "Source files by language"
    x-axis [TypeScript, Prisma schema, JSON, Markdown, JavaScript, YAML]
    y-axis "Files" 0 --> 2800
    bar [2701, 509, 414, 170, 95, 33]
Category Count
Total tracked files 4,616
TypeScript files (*.ts/*.tsx) 2,707
Test files (*.test.ts, etc.) 272
Lines of TypeScript (all) 222,417
Lines of TypeScript (excluding tests) 130,940
.prisma schema files (test fixtures) 509
Lines of Prisma schema 58,860
Workspace packages ~46

packages/* is by far the heaviest area; packages/client alone contains the bulk of test code (~1.5MB of dmmf-types fixtures and ~6k-line buffer test files dominate the largest-files list).

Activity

Commit volume by month over the last year:

Month Commits
2025-05 89
2025-06 92
2025-07 83
2025-08 85
2025-09 61
2025-10 49
2025-11 134
2025-12 43
2026-01 79 (Jan-Feb combined)
2026-03 39
2026-04 (to date) 19

Total commits since first push (2019-04-29 "init"): 12,218. Last 90 days: 118 commits from 21 unique authors.

Top churn files (changes per file in the last 90 days):

File Changes
pnpm-lock.yaml 52
packages/internals/package.json 31
packages/client/package.json 29
packages/client-generator-ts/package.json 29
packages/client-generator-js/package.json 29
packages/engines/package.json 28
packages/schema-files-loader/package.json 27
packages/migrate/package.json 27
packages/fetch-engine/package.json 27
packages/cli/package.json 8
package.json 8
AGENTS.md 7
packages/client/src/runtime/core/engines/client/ClientEngine.ts 6
packages/cli/src/bin.ts 6

package.json churn dominates because automated engine-version bumps touch many manifests. Excluding manifest-only commits, ClientEngine.ts and cli/src/bin.ts are the busiest source files — both were heavily reshaped during the Prisma 7 rearchitecture.

Bot-attributed commits

Bot or automation-attributed commits make up roughly 31% of the total history (3,846 / 12,218 commits). The biggest contributors are Prismo (the internal release bot for engine bumps), dependabot[bot], renovate[bot], prisma-bot, and github-actions[bot].

This count includes any author whose name or email contains bot, dependabot, github-actions, renovate, or prismo. It is a lower bound on automation: AI-assisted commits (e.g., editor-integrated suggestions) leave no trace in git history and are not counted.

Complexity

Largest hand-written source files:

File Lines
packages/client/src/__tests__/__helpers__/dmmf-types.ts 7,910
packages/client/src/__tests__/buffer-small.test.ts 6,235
packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts 3,620
packages/client/tests/functional/extensions/query.ts 2,097
packages/integration-tests/src/__tests__/integration/postgresql/__scenarios.ts 2,024
packages/integration-tests/src/__tests__/integration/mariadb/__scenarios.ts 1,921
packages/integration-tests/src/__tests__/integration/mysql/__scenarios.ts 1,847
packages/migrate/src/__tests__/MigrateDev.test.ts 1,794

The largest hand-authored runtime files are packages/client/src/runtime/getPrismaClient.ts (~37KB / ~1k LOC) and the migrate command implementations (MigrateDiff.ts, MigrateDev.ts, both around 11–12k bytes). Most other source files are well under 1,000 lines.

Total TODO/FIXME/HACK comments across *.ts files: 250, distributed across 163 files.

Test ratio

Test files (272) make up roughly 10% of the TypeScript file count, but they account for over a third of total TypeScript lines (~91k of 222k). Snapshot fixtures and the generated DMMF types file inflate the test LOC heavily; effective hand-written test code is much less.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

By the numbers – Prisma wiki | Factory