CodeVetter · Repo Unpack · System map
parcel-bundler/parcel
The primary product runs as a Node CLI or an embedded Parcel instance. JavaScript owns request scheduling, graph state, plugin orchestration, reporting, and filesystem boundaries, while native bindings provide compiler and other Rust functionality. Storage combines an abstract cache API with filesystem snapshots. Distribution includes published JavaScript packages, platform-specific native artifacts, and a separately built browser REPL.
- The CLI entrypoint conditionally loads @parcel/babel-register outside production or during self-build, then requires cli.js; Commander registers serve, watch, build, and help.
- @parcel/core publishes lib/index.js from src/index.js; Parcel.run() initializes, builds, shuts down, and converts a buildFailure result into BuildError.
- Parcel owns resolved options, configuration, RequestTracker, reporters, worker references, and a watch queue limited to one concurrent build.
- AssetGraphRequest resolves entries, targets, dependencies, and transformed asset groups; BundleGraph exposes the resulting internal graph through mutable or public wrappers for different plugin stages.
- Workers retrieve shared options and cached configuration before running Transformation, Validation, or PackagerRunner; native compiler bindings call parcel_js_swc_core, with asynchronous native transforms scheduled through Rayon.
- resolveOptions selects LMDBCache for NodeFS output and FSCache for other filesystems unless a cache is supplied; LMDB stores binary values while streams and large blobs use separate files.
- The monorepo uses packages/*/* workspaces and Yarn 4.9.1; root scripts separate JavaScript builds, native and WASM builds, declaration checks, Mocha tests, Cargo tests, and integration tests.
- Release workflows build macOS, Windows, GNU/Linux, and musl native artifacts before publishing; canary releases are scheduled daily, tagged releases invoke yarn release, and REPL previews are deployed through CI.