# Extension points — yarnpkg/berry

> Canonical page: https://codevetter.com/unpack/berry/extension-points

# Extension points — 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.

The Plugin type is the primary extension contract, with factories assembling runtime integrations. Typed configuration augmentation and ordered hooks allow cross-cutting behavior without expanding command implementations. Build profiles, shell builtins, and documentation plugins provide additional extension surfaces.
- A Plugin can contribute configuration, command classes, fetchers, linkers, resolvers, and hooks; plugin-constraints demonstrates ConfigurationValueMap augmentation with typed settings and defaults. — [packages/yarnpkg-core/sources/Plugin.ts#L187-194](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Plugin.ts#L187-L194) [packages/plugin-constraints/sources/index.ts#L14-32](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-constraints/sources/index.ts#L14-L32)
- CLI commands plug into each plugin’s commands array; initCommands iterates activated plugins and registers every contributed class with Clipanion. — [packages/plugin-essentials/sources/index.ts#L172-209](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-essentials/sources/index.ts#L172-L209) [packages/yarnpkg-cli/sources/lib.ts#L135-140](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-cli/sources/lib.ts#L135-L140)
- Configuration.makeResolver constructs plugin resolver instances behind VirtualResolver and WorkspaceResolver; NpmSemverResolver demonstrates supportsDescriptor/supportsLocator, candidate selection, satisfying checks, and metadata resolution. — [packages/yarnpkg-core/sources/Configuration.ts#L1771-1785](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Configuration.ts#L1771-L1785) [packages/plugin-npm/sources/NpmSemverResolver.ts#L45-76](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-npm/sources/NpmSemverResolver.ts#L45-L76) [packages/plugin-npm/sources/NpmSemverResolver.ts#L121-155](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-npm/sources/NpmSemverResolver.ts#L121-L155)
- Configuration.makeFetcher composes builtin virtual/workspace fetchers with plugin fetchers; NpmSemverFetcher shows the cache loader pattern and filesystem/release/checksum result contract. — [packages/yarnpkg-core/sources/Configuration.ts#L1788-1800](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Configuration.ts#L1788-L1800) [packages/plugin-npm/sources/NpmSemverFetcher.ts#L29-44](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-npm/sources/NpmSemverFetcher.ts#L29-L44)
- New installation layouts implement Linker package/location lookup and makeInstaller; Installer separates installPackage, dependency attachment, finalization, retained fetch lifetimes, and migratable custom state. — [packages/yarnpkg-core/sources/Linker.ts#L28-88](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Linker.ts#L28-L88) [packages/yarnpkg-core/sources/Installer.ts#L48-82](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Installer.ts#L48-L82) [packages/yarnpkg-core/sources/Installer.ts#L85-142](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Installer.ts#L85-L142)
- Hooks can modify script environments, wrap script/network execution, reduce dependency descriptors, and validate installs; triggerHook and reduceHook await contributors sequentially in plugin iteration order. — [packages/yarnpkg-core/sources/Plugin.ts#L54-93](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Plugin.ts#L54-L93) [packages/yarnpkg-core/sources/Plugin.ts#L105-155](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Plugin.ts#L105-L155) [packages/yarnpkg-core/sources/Configuration.ts#L2030-2065](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-core/sources/Configuration.ts#L2030-L2065)
- Builder supports additional --plugin entries and named profiles; findPlugins accepts profile combinations separated by '+', validates them against manifest bundles, and deduplicates contributions. — [packages/yarnpkg-builder/sources/commands/build/bundle.ts#L53-59](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-builder/sources/commands/build/bundle.ts#L53-L59) [packages/yarnpkg-builder/sources/tools/findPlugins.ts#L3-20](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-builder/sources/tools/findPlugins.ts#L3-L20) [packages/yarnpkg-cli/package.json#L78-106](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-cli/package.json#L78-L106)
- The portable shell accepts custom builtins, filesystem, environment, variables, and glob behavior; documentation extends separately through remark plugins, generated CLI docs, and TypeDoc entries discovered from package exports. — [packages/yarnpkg-shell/sources/index.ts#L1015-1041](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/yarnpkg-shell/sources/index.ts#L1015-L1041) [packages/docusaurus/docusaurus.config.ts#L16-26](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/docusaurus/docusaurus.config.ts#L16-L26) [packages/docusaurus/docusaurus.config.ts#L68-95](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/docusaurus/docusaurus.config.ts#L68-L95) [packages/docusaurus/docusaurus.config.ts#L144-162](https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/docusaurus/docusaurus.config.ts#L144-L162)

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)
