# Data flow — parcel-bundler/parcel

> Canonical page: https://codevetter.com/unpack/parcel/data-flow

# Data flow — parcel-bundler/parcel

Scanned commit 59484858a1a0bcbb71f74088956bb437a2db6505 (2026-02-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Inputs enter through CLI arguments or InitialParcelOptions and become normalized project paths, target settings, and shared worker options. Entry and dependency requests expand an asset graph whose transformations return both asset data and invalidation metadata. Bundling converts that graph into named outputs, followed by packaging, optimization, hash replacement, and compression. Request state and watcher snapshots preserve reuse across invocations.
- CLI run() defaults empty entries to '.', resolves them to absolute paths, normalizes flags, and constructs Parcel; resolveOptions derives projectRoot from an upward lockfile/VCS search and converts entries to project paths. — [packages/core/parcel/src/cli.js#L277-298](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/parcel/src/cli.js#L277-L298) [packages/core/core/src/resolveOptions.js#L77-94](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/resolveOptions.js#L77-L94) [packages/core/core/src/resolveOptions.js#L193-204](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/resolveOptions.js#L193-L204)
- EntryResolver expands globs recursively and reads package targets for directory entries; AssetGraphRequest then attaches resolved entries, targets, dependency paths, and asset-group results to its graph. — [packages/core/core/src/requests/EntryRequest.js#L160-220](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/EntryRequest.js#L160-L220) [packages/core/core/src/requests/AssetGraphRequest.js#L471-511](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/AssetGraphRequest.js#L471-L511) [packages/core/core/src/requests/AssetGraphRequest.js#L514-545](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/AssetGraphRequest.js#L514-L545)
- AssetRequest passes a configuration cache path, shared options reference, and prior dev-dependency information to runTransform; Transformation loads the asset and pipeline, runs transformations, commits results, and returns assets or diagnostics. — [packages/core/core/src/requests/AssetRequest.js#L93-130](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/AssetRequest.js#L93-L130) [packages/core/core/src/worker.js#L93-106](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/worker.js#L93-L106) [packages/core/core/src/Transformation.js#L136-187](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Transformation.js#L136-L187) [packages/core/core/src/Transformation.js#L192-210](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Transformation.js#L192-L210)
- Worker transformation results feed file-update/delete/create, environment, option, startup, and build invalidations into RequestTracker; runRequest reuses valid results and waits for an already-running request before rerunning it. — [packages/core/core/src/requests/AssetRequest.js#L139-161](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/AssetRequest.js#L139-L161) [packages/core/core/src/RequestTracker.js#L1177-1204](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/RequestTracker.js#L1177-L1204)
- After asset traversal, symbol propagation updates graph usage information; BundleGraph.fromAssetGraph removes asset groups and retargets dependencies, and BundlerRunner either updates a previous graph or invokes a fresh bundler pass. — [packages/core/core/src/requests/AssetGraphRequest.js#L279-291](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/AssetGraphRequest.js#L279-L291) [packages/core/core/src/BundleGraph.js#L152-165](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/BundleGraph.js#L152-L165) [packages/core/core/src/requests/BundleGraphRequest.js#L286-336](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/BundleGraphRequest.js#L286-L336)
- PackagerRunner.getBundleResult packages each bundle, optimizes each returned result, and generates its sourcemap; optimizer output type changes affect subsequent filename-based plugin selection. — [packages/core/core/src/PackagerRunner.js#L388-423](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/PackagerRunner.js#L388-L423) [packages/core/core/src/PackagerRunner.js#L545-555](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/PackagerRunner.js#L545-L555) [packages/core/core/src/PackagerRunner.js#L569-597](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/PackagerRunner.js#L569-L597)
- WriteBundlesRequest computes final name hashes and skips placeholder outputs; WriteBundleRequest reads cached content, replaces hash references, invokes compressors, and streams their results to target files with recorded size statistics. — [packages/core/core/src/requests/WriteBundlesRequest.js#L70-94](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/WriteBundlesRequest.js#L70-L94) [packages/core/core/src/requests/WriteBundlesRequest.js#L130-155](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/WriteBundlesRequest.js#L130-L155) [packages/core/core/src/requests/WriteBundleRequest.js#L199-225](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/WriteBundleRequest.js#L199-L225) [packages/core/core/src/requests/WriteBundleRequest.js#L245-288](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/WriteBundleRequest.js#L245-L288)
- Shutdown serializes cacheable request results and the request graph alongside a watcher snapshot; startup deserializes the graph, obtains events since that snapshot, and invalidates startup, build, environment, option, and filesystem changes. — [packages/core/core/src/Parcel.js#L183-188](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L183-L188) [packages/core/core/src/RequestTracker.js#L1355-1393](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/RequestTracker.js#L1355-L1393) [packages/core/core/src/RequestTracker.js#L1452-1475](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/RequestTracker.js#L1452-L1475)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
