# Data flow — yarnpkg/berry

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

# Data flow — yarnpkg/berry

Scanned commit e4e423a1eb117b5129f20ac626a03eb7a97aedff (2026-09-24). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Inputs enter through argv, environment settings, RC files, package manifests, and registry metadata. Configuration and Project own the interpreted settings and dependency graph, while fetchers translate package identities into filesystem-backed artifacts. Linkers publish runtime layouts, and lockfiles plus compressed installation state support subsequent commands.
- argv becomes a Clipanion command after startup configuration and cwd handling; command context carries cwd, plugin configuration, and stdin/stdout/stderr. — [packages/yarnpkg-cli/sources/cli.ts#L7-11](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-cli/sources/cli.ts#L7-L11) [packages/yarnpkg-cli/sources/lib.ts#L19-28](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-cli/sources/lib.ts#L19-L28) [packages/yarnpkg-cli/sources/lib.ts#L160-170](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-cli/sources/lib.ts#L160-L170)
- Configuration.find combines environment settings, discovered RC files, and a home RC file; it processes yarnPath fields before project discovery and plugin activation. — [packages/yarnpkg-core/sources/Configuration.ts#L1178-1199](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Configuration.ts#L1178-L1199) [packages/yarnpkg-core/sources/Configuration.ts#L1219-1256](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Configuration.ts#L1219-L1256)
- Workspace.setup loads a manifest, derives stable workspace descriptors/locators from relative paths, expands workspace patterns, excludes node_modules/.git/.yarn, and sorts discovered paths. — [packages/yarnpkg-core/sources/Workspace.ts#L36-75](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Workspace.ts#L36-L75)
- Descriptor resolution first resolves resolver-specific dependencies, requests candidates, selects the first candidate, optionally verifies it with getSatisfying, and records descriptor-to-locator hashes. — [packages/yarnpkg-core/sources/Project.ts#L902-943](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Project.ts#L902-L943)
- NpmSemverResolver turns registry versions into approved, preferably nondeprecated candidates sorted descending; unconventional tarball URLs are bound into locators, and resolve loads manifest dependency metadata. — [packages/plugin-npm/sources/NpmSemverResolver.ts#L76-118](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-npm/sources/NpmSemverResolver.ts#L76-L118) [packages/plugin-npm/sources/NpmSemverResolver.ts#L155-175](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-npm/sources/NpmSemverResolver.ts#L155-L175) [packages/plugin-npm/sources/NpmSemverResolver.ts#L190-207](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-npm/sources/NpmSemverResolver.ts#L190-L207)
- NpmSemverFetcher requests a checksum-aware cached package; a miss downloads a tarball and converts it into a vendor-prefixed ZIP, returning packageFs, releaseFs, prefixPath, and checksum. — [packages/plugin-npm/sources/NpmSemverFetcher.ts#L29-70](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-npm/sources/NpmSemverFetcher.ts#L29-L70)
- fetchEverything updates storedChecksums and releases fetched filesystems; linkEverything creates installers with restored custom data, attaches internal/external relationships, and captures finalizeInstall custom data and build records. — [packages/yarnpkg-core/sources/Project.ts#L1127-1154](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Project.ts#L1127-L1154) [packages/yarnpkg-core/sources/Project.ts#L1218-1229](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Project.ts#L1218-L1229) [packages/yarnpkg-core/sources/Project.ts#L1394-1439](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Project.ts#L1394-L1439) [packages/yarnpkg-core/sources/Project.ts#L1441-1460](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Project.ts#L1441-L1460)
- Project.persist writes the normalized lockfile and workspace manifests; installation state is V8-serialized and gzipped, while restoration only reuses saved resolutions when the lockfile checksum matches. — [packages/yarnpkg-core/sources/Project.ts#L2012-2049](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Project.ts#L2012-L2049) [packages/yarnpkg-core/sources/Project.ts#L2075-2102](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Project.ts#L2075-L2102) [packages/yarnpkg-core/sources/Workspace.ts#L217-228](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Workspace.ts#L217-L228)

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)
