CodeVetter · Repo Unpack · System map
babel/babel
The repository is a Yarn workspace monorepo organized around independently published compiler packages. Core coordinates parser, traversal, types, helpers, and generator packages, while CLI, register, standalone, and ESLint packages adapt it to different runtimes. Configuration and compilation state live primarily in memory; register additionally persists compiled results. Distribution consists of npm packages and browser artifacts produced by repository build tooling.
- The private ESM root pins Yarn 4.17.0 and groups packages, codemods, ESLint integrations, runtime integration projects, and benchmarks into workspaces.
- @babel/core exports string, file, and AST transformation APIs, parsing APIs, configuration loaders, and AST tooling; its package entrypoint is lib/index.js.
- Core's compiler boundary depends on separate parser, generator, traverse, types, template, helpers, and compilation-target packages.
- The babel executable imports the compiled CLI dispatcher; parseArgv selects directory mode when outDir is set and file/stdin mode otherwise.
- Core package imports select browser-specific configuration, target resolution, file transformation, and source-map readers instead of their Node implementations.
- @babel/register bridges synchronous require hooks to asynchronous Babel processing with a worker thread, MessageChannel, SharedArrayBuffer, and Atomics.wait.
- Core configuration uses separate synchronous/asynchronous memory caches; register owns an additional memory index and compressed cacache storage on disk.
- Root scripts delegate build, lint, and tests to Make targets; release automation builds with make prepublish and publishes npm packages with provenance, while PR automation publishes testing packages.