CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

rollup/rollup

Scanned commit a77225f4b9 dated 2026-10-02 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/rollup/rollup ↗ · 4000 files · 3.2 MB · scan capped

Rollup Overview Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (393s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

Rollup 4.63.6 bundles JavaScript modules into distributable libraries and applications through a CLI and a programmatic API. Its TypeScript core builds a dependency graph, removes unused code, and renders multiple module formats; Rust supplies parsing and hashing through native Node bindings or WebAssembly. This brief examines commit a77225f4b9ef88f20d26a32a3dc70954241f3fb6 through bounded source inspection, including CLI builds, API output generation, and watch rebuilds.

System map

Rollup exposes a Node API, a CLI, and a browser API around the same bundling core. Graph owns build state, while Bundle owns one output generation. Parsing and hashing cross a Rust boundary with separate native and WASM adapters. Distribution consists of npm artifacts and platform binaries rather than a running service.

Feature catalog

The principal features are module bundling, tree-shaking, configurable chunking, and output generation. Users can invoke them through configuration files, CLI arguments, or the JavaScript API. Plugins supply resolution, transformation, virtual modules, and emitted assets. Watch mode and browser execution expose different environment capabilities.

Data flow

Input options become a normalized build configuration and then a graph of resolved modules. Loaded source passes through transform hooks before parsing and inclusion analysis. Rendering constructs output chunks, resolves content hashes, and returns files or writes them through a filesystem adapter. Incremental state is represented by module and plugin caches retained by callers or watch tasks.

Behavior traces

Three concrete flows were followed through their implementation: CLI configuration builds, API build-to-output generation, and watch invalidation-to-rebuild. The CLI adds executable configuration loading and stdout handling around the API. The API separates graph construction from rendering and disk writes. Watch mode retains cache and coordinates asynchronous change notifications before another build.

Testing signals

Tests and CI were inspected, not executed; their existence establishes intended checks, not passing results. Mocha suites exercise built artifacts through runtime assertions, output comparisons, cache reruns, CLI invocation, and filesystem watching. Browser tests use Node substitutes rather than an actual browser. Inspection was bounded and does not establish exhaustive coverage or whole-repository absences.

Risk map

The inspected security-sensitive boundaries are executable configuration/plugins, watch shell commands, filesystem access, native loading, and CI privilege transitions. These are source observations, not confirmed vulnerabilities. Filename validation provides a concrete output-path guard, while custom filesystem adapters determine actual I/O authority. Native/WASM parity and asynchronous watch ordering are broad correctness hotspots.

Extension points

Plugins are the primary public extension mechanism and receive graph, parsing, filesystem, cache, and file-emission capabilities. Hook execution categories and ordering are explicit contracts. Internal extension surfaces include option normalization, finalisers, AST schemas, and browser replacement registries. New native functions require coordinated adapters across environments.

Contributor handoff

Start with architecture and scoped instructions, then follow the affected phase and environment adapters. Preserve generated-file ownership and conservative tree-shaking contracts. Tests and CI were inspected, not executed, and this bounded brief supplies no passing-test or coverage guarantee. The commands below describe future authorized implementation checks; none were run during this audit.

Languages

LanguageFilesShare of source
JavaScript1240896%
TypeScript3813%
Rust1131%
JSON92docs/config
Markdown68docs/config
HTML24docs/config
YAML15docs/config
Vue110%

Start reading here

Probable source entrypoint: src/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

src/ (274 files)

Repository structure

Top-level pathFiles
test/3320
src/274
rust/124
docs/97
npm/50
scripts/32
.github/18
cli/17

Docs found: AGENTS.mdARCHITECTURE.mdCLAUDE.mdCONTRIBUTING.mdLICENSE.mdREADME.mddocs/AGENTS.mddocs/CLAUDE.mddocs/browser/index.mddocs/command-line-interface/index.md

Package

package.json — rollup v4.63.6, 80 declared dependencies.

@codemirror/commands@codemirror/lang-javascript@codemirror/language@codemirror/search@codemirror/state@codemirror/view@emnapi/core@emnapi/runtime@eslint/js@inquirer/prompts@jridgewell/sourcemap-codec@mermaid-js/mermaid-cli

CI & config entrypoints

Structural health signals

Average score 7.7/10 across 96 analyzed source files; 4 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history