📦🐈 Active development trunk for Yarn ⚒
This report summarizes scanner evidence for yarnpkg/berry, a TypeScript project with 8,122 GitHub stars. SynthScan examined 134,763 lines of code across 1206 source files, recording 123 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 1.1 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 121 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 61 finding(s).
Which changes need focused human review? 123 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 123 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/plugin-npm-cli/sources/commands/npm/login.ts | 202 | async function loginOrRegisterViaPassword({registry, configuration, report, stdin, stdout}: CredentialOptions): Promise< | CODE |
| LOW | …g-tests-specs/sources/commands/workspaces/list.test.js | 421 | function makeWorkspacesListSinceEnv(cb) { | CODE |
| LOW | …ests-specs/sources/commands/workspaces/foreach.test.js | 949 | function makeWorkspacesForeachSinceEnv(cb) { | CODE |
| LOW | packages/yarnpkg-shell/sources/pipe.ts | 342 | export function createOutputStreamsWithPrefix(state: ShellState, {prefix}: {prefix: string | null}) { | CODE |
| LOW | packages/yarnpkg-shell/sources/index.ts | 931 | function locateArgsVariableInSegment(segment: ArgumentSegment | ArithmeticPrimary): boolean { | CODE |
| LOW | packages/yarnpkg-shell/sources/index.ts | 948 | function locateArgsVariableInArgument(arg: Argument): boolean { | CODE |
| LOW | packages/yarnpkg-shell/sources/index.ts | 961 | function locateArgsVariableInArithmetic(arg: ArithmeticExpression): boolean { | CODE |
| LOW | packages/yarnpkg-pnp/sources/generateSerializedState.ts | 36 | function generateFallbackExclusionList(settings: PnpSettings): Array<[string, Array<string>]> { | CODE |
| LOW | packages/yarnpkg-pnp/sources/generateSerializedState.ts | 62 | function generatePackageRegistryData(settings: PnpSettings): PackageRegistryData { | CODE |
| LOW | packages/yarnpkg-pnp/sources/loader/nodeUtils.ts | 58 | export function reportRequiredFilesToWatchMode(paths: Array<PortablePath>) { | CODE |
| LOW | packages/yarnpkg-pnp/sources/loader/makeApi.ts | 169 | function getPackageInformationSafe(packageLocator: PackageLocator): PackageInformation<PortablePath> { | CODE |
| LOW | packages/yarnpkg-pnp/sources/loader/makeApi.ts | 207 | function applyNodeExportsResolution(unqualifiedPath: PortablePath, conditions: Set<string> = defaultExportsConditions, | CODE |
| LOW | packages/yarnpkg-pnp/sources/loader/makeApi.ts | 264 | function applyNodeExtensionResolution(unqualifiedPath: PortablePath, candidates: Array<PortablePath>, {extensions}: {e | CODE |
| LOW | packages/yarnpkg-pnp/sources/loader/makeApi.ts | 458 | function findBrokenPeerDependencies(dependency: string, initialPackage: PhysicalPackageLocator): Array<PhysicalPackage | CODE |
| LOW | packages/yarnpkg-pnp/sources/node/resolve.js | 68 | function throwInvalidPackageTarget( | CODE |
| LOW | packages/yarnpkg-pnp/sources/node/resolve.js | 93 | function resolvePackageTargetString( | CODE |
| LOW | packages/yarnpkg-pnp/sources/node/resolve.js | 285 | function isConditionalExportsMainSugar(exports, packageJSONUrl, base) { | CODE |
| LOW | packages/yarnpkg-pnp/sources/node/resolve.js | 320 | function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { | CODE |
| LOW | packages/plugin-npm/sources/npmHttpUtils.ts | 39 | export async function handleInvalidAuthenticationError(error: any, {attemptedAs, registry, headers, configuration}: {att | CODE |
| LOW | packages/plugin-npm/sources/npmHttpUtils.ts | 87 | async function loadPackageMetadataInfoFromDisk(identPath: PortablePath) { | CODE |
| LOW | packages/plugin-npm/sources/npmHttpUtils.ts | 107 | async function loadPackageMetadataInfoFromNetwork(identPath: PortablePath, ident: Ident, {configuration, cached, registr | CODE |
| LOW | packages/plugin-pnp/sources/jsInstallUtils.ts | 4 | export function checkManifestCompatibility(pkg: Package) { | CODE |
| LOW | packages/plugin-version/sources/versionUtils.ts | 313 | export function getUndecidedDependentWorkspaces(versionFile: Pick<VersionFile, `project` | `releases`>, {include = new S | CODE |
| LOW | packages/plugin-patch/sources/patchUtils.ts | 65 | export function ensureUnpatchedDescriptor(descriptor: Descriptor) { | CODE |
| LOW | packages/plugin-nm/sources/NodeModulesLinker.ts | 954 | function syncPreinstallStateWithDisk(locationTree: LocationTree, binSymlinks: BinSymlinkMap, stateMtimeMs: number, proje | CODE |
| LOW | packages/yarnpkg-libzip/sources/libzipAsync.js | 275 | function updateGlobalBufferAndViews(buf) { | CODE |
| LOW | packages/yarnpkg-libzip/sources/libzipAsync.js | 427 | function receiveInstantiationResult(result) { | CODE |
| LOW | packages/yarnpkg-libzip/sources/libzipSync.js | 274 | function updateGlobalBufferAndViews(buf) { | CODE |
| LOW | packages/yarnpkg-core/tests/httpUtils.test.ts | 38 | function getPluginsWithMockWrapNetworkRequestPlugin() { | CODE |
| LOW | packages/yarnpkg-core/sources/Project.ts | 2160 | function applyVirtualResolutionMutations({ | CODE |
| LOW | packages/yarnpkg-core/sources/Project.ts | 2686 | function emitPeerDependencyWarnings(project: Project, report: Report) { | CODE |
| LOW | packages/yarnpkg-core/sources/tgzUtils.ts | 45 | export function getTaskPoolForConfiguration(configuration: Configuration | void): ZipWorkerPool { | CODE |
| LOW | packages/yarnpkg-core/sources/formatUtils.ts | 492 | export function prettyTruncatedLocatorList(configuration: Configuration, locators: Array<Locator>, recommendedLength: nu | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 488 | async function initializeWorkspaceEnvironment(workspace: Workspace, {binFolder, cwd, lifecycleScript}: {binFolder: Porta | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 517 | async function initializePackageEnvironment(locator: Locator, {project, binFolder, cwd, lifecycleScript}: {project: Proj | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 571 | export async function executeWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, {cwd, report}: | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 601 | export async function maybeExecuteWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, opts: Exec | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 655 | export async function getPackageAccessibleBinaries(locator: Locator, {project}: GetPackageAccessibleBinariesOptions): Pr | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 727 | export async function getWorkspaceAccessibleBinaries(workspace: Workspace) { | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 763 | export async function executePackageAccessibleBinary(locator: Locator, binaryName: string, args: Array<string>, {cwd, pr | CODE |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 807 | export async function executeWorkspaceAccessibleBinary(workspace: Workspace, binaryName: string, args: Array<string>, {c | CODE |
| LOW | packages/yarnpkg-core/sources/structUtils.ts | 79 | export function convertDescriptorToLocator(descriptor: Descriptor): Locator { | CODE |
| LOW | packages/yarnpkg-core/sources/structUtils.ts | 91 | export function convertLocatorToDescriptor(locator: Locator): Descriptor { | CODE |
| LOW | packages/yarnpkg-core/sources/structUtils.ts | 216 | export function ensureDevirtualizedDescriptor(descriptor: Descriptor): Descriptor { | CODE |
| LOW | packages/yarnpkg-core/sources/structUtils.ts | 227 | export function ensureDevirtualizedLocator(locator: Locator): Locator { | CODE |
| LOW | packages/yarnpkg-core/sources/structUtils.ts | 303 | export function areVirtualPackagesEquivalent(a: Package, b: Package) { | CODE |
| LOW | packages/yarnpkg-cli/sources/lib.ts | 189 | function unexpectedTerminationHandler() { | CODE |
| LOW | packages/yarnpkg-parsers/sources/shell.ts | 37 | export function stringifyCommandChainThen(commandChainThen: CommandChainThen): string { | CODE |
| LOW | packages/yarnpkg-parsers/sources/shell.ts | 77 | export function stringifyRedirectArgument(argument: RedirectArgument): string { | CODE |
| LOW | packages/yarnpkg-parsers/sources/shell.ts | 165 | export function stringifyArithmeticExpression(argument: ArithmeticExpression): string { | CODE |
| LOW | packages/plugin-jsr/sources/helpers.ts | 4 | export function convertDescriptorFromJsrToNpm(dependency: Descriptor) { | CODE |
| LOW | packages/plugin-jsr/sources/helpers.ts | 17 | export function convertLocatorFromJsrToNpm(locator: Locator) { | CODE |
| LOW | packages/plugin-jsr/sources/helpers.ts | 21 | export function convertLocatorFromNpmToJsr(locator: Locator) { | CODE |
| LOW | packages/docusaurus/src/components/StarrySky.tsx | 44 | function resizeRendererToDisplaySize(renderer: THREE.Renderer) { | CODE |
| LOW | packages/yarnpkg-doctor/sources/cli.ts | 80 | function checkForUndeclaredDependency(workspace: Workspace, referenceNode: ts.Node, moduleName: string, {configuration, | CODE |
| LOW | packages/yarnpkg-doctor/sources/cli.ts | 95 | function checkForUnsafeWebpackLoaderAccess(workspace: Workspace, initializerNode: ts.Node, {configuration, report}: {con | CODE |
| LOW | packages/yarnpkg-doctor/sources/cli.ts | 105 | function checkForNodeModuleStrings(stringishNode: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral | ts.TemplateExpre | CODE |
| LOW | packages/yarnpkg-doctor/sources/cli.ts | 223 | async function checkForUnmetPeerDependency(workspace: Workspace, dependencyType: HardDependencies, via: Descriptor, peer | CODE |
| LOW | packages/vscode-zipfs/sources/TerminalLinkProvider.ts | 28 | export function registerTerminalLinkProvider() { | CODE |
| LOW | packages/plugin-essentials/sources/suggestUtils.ts | 177 | export async function extractDescriptorFromPath(path: PortablePath, {cwd, workspace}: {cwd: PortablePath, workspace: Wor | CODE |
| 1 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .yarn/sdks/typescript/lib/tsserverlibrary.js | 81 | // VSCode only adds it automatically for supported schemes, | COMMENT |
| LOW | .yarn/sdks/typescript/lib/tsserver.js | 81 | // VSCode only adds it automatically for supported schemes, | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 21 | }, | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 41 | // because its version conflict with the direct dependency of E (so | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 61 | makeTemporaryEnv( | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 201 | // This test is related to the way Yarn is resolving peer dependencies | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 221 | // -> Z | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 361 | [`dragon-test-7-b`]: `2.0.0`, | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 421 | // -> C | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 461 | // We should instead preserve the different descriptors and | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 561 | { | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 621 | // │ └── (peer) doesn't matter | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 641 | // deduping it *while still referencing the package that got deduped | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 741 | }, | COMMENT |
| LOW | …cceptance-tests/pkg-tests-specs/sources/dragon.test.js | 801 | // ├── pkg-a/ | COMMENT |
| LOW | packages/yarnpkg-shell/tests/shell.test.ts | 1421 | // await expectResult(bufferResult( | COMMENT |
| LOW | packages/yarnpkg-pnp/sources/hydratePnpApi.ts | 1 | import {FakeFS, PortablePath} from '@yarnpkg/fslib'; | COMMENT |
| LOW | packages/yarnpkg-pnp/sources/generatePrettyJson.ts | 101 | // [..., [ | COMMENT |
| LOW | packages/yarnpkg-pnp/sources/loader/makeApi.ts | 41 | // Used for compatibility purposes - cf setupCompatibilityLayer | COMMENT |
| LOW | packages/plugin-git/sources/hosted-git-info-parse.ts | 41 | COMMENT | |
| LOW | …ges/plugin-compat/typescript-tests/similar-basename.ts | 1 | // Test for https://github.com/yarnpkg/berry/issues/3058 | COMMENT |
| LOW | packages/yarnpkg-sdks/sources/sdks/base.ts | 61 | return \`\${locator.name}@\${locator.reference}\`; | COMMENT |
| LOW | packages/yarnpkg-sdks/sources/sdks/base.ts | 101 | // Before | ^zip:/c:/foo/bar.zip/package.json | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 61 | // -> D -> E | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 81 | // // Ideally should be hoisted to: | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 121 | it(`should keep require promise`, () => { | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 221 | C: {dependencies: [`B@Y`]}, | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 261 | '.': {dependencies: [`A`, `D@Y`]}, | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 321 | // . -> A --> B@X | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 341 | // . -> A -> B | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 381 | // -> C@Z | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 421 | const [A] = Array.from(hoistedTree.dependencies).filter(x => x.name === `A`); | COMMENT |
| LOW | packages/yarnpkg-nm/tests/hoist.test.ts | 521 | // -> D@Y | COMMENT |
| LOW | packages/yarnpkg-core/tests/Project.test.ts | 181 | } | COMMENT |
| LOW | packages/yarnpkg-core/sources/Project.ts | 781 | const addedPackages: Array<Locator> = []; | COMMENT |
| LOW | packages/yarnpkg-core/sources/scriptUtils.ts | 501 | // case is still a bit fuzzy to me (something about Flow not | COMMENT |
| LOW | packages/plugin-pnpm/sources/PnpmLinker.ts | 441 | dependencies: serializeDependencies(packageDependencies), | COMMENT |
| LOW | packages/plugin-jsr/sources/JsrResolver.ts | 41 | // recode the whole fetcher, we just convert our jsr locator into a npm one and recursively call the | COMMENT |
| LOW | packages/plugin-essentials/sources/commands/install.ts | 161 | // for all installs inside a project, so through the .yarnrc.yml file. Note | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | plugins.yml | 1 | # This file contains the list of officially endorsed plugins. | COMMENT |
| MEDIUM | .yarn/sdks/integrations.yml | 1 | # This file is automatically generated by @yarnpkg/sdks. | COMMENT |
| MEDIUM | …pkg-tests-specs/sources/features/berryLockfile.test.ts | 9 | `# This file is generated by running "yarn install" inside your project.\n`, | CODE |
| MEDIUM | packages/plugin-exec/sources/ExecFetcher.ts | 154 | header: `# This file contains the result of Yarn generating a package (${structUtils.stringifyLocator(locator) | CODE |
| MEDIUM | packages/yarnpkg-sdks/sources/generateSdk.ts | 100 | let content = `# This file is automatically generated by @yarnpkg/sdks.\n# Manual changes might be lost!\n\n`; | CODE |
| MEDIUM | packages/yarnpkg-core/sources/Project.ts | 1626 | let header = `# This file contains the result of Yarn building a package (${structUtils.stringifyLocator(pkg | CODE |
| MEDIUM | packages/yarnpkg-core/sources/Project.ts | 2005 | `# This file is generated by running "yarn install" inside your project.\n`, | CODE |
| MEDIUM | packages/yarnpkg-core/sources/scriptUtils.ts | 578 | const header = `# This file contains the result of Yarn calling the "${lifecycleScriptName}" lifecycle script inside | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | packages/plugin-pnp/sources/PnpLinker.ts | 300 | if (this.opts.project.configuration.sources.has(`pnpEnableEsmLoader`)) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/yarnpkg-core/sources/Project.ts | 1253 | // Step 1: Installing the packages on the disk | COMMENT |
| LOW | packages/yarnpkg-core/sources/Project.ts | 1348 | // Step 2: Link packages together | COMMENT |
| LOW | packages/yarnpkg-core/sources/Project.ts | 1434 | // Step 3: Inform our linkers that they should have all the info needed | COMMENT |
| LOW | packages/yarnpkg-core/sources/Project.ts | 1464 | // Step 4: Build the packages in multiple steps | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/yarnpkg-core/sources/Project.ts | 1253 | // Step 1: Installing the packages on the disk | COMMENT |
| LOW | packages/yarnpkg-core/sources/Project.ts | 1348 | // Step 2: Link packages together | COMMENT |
| LOW | packages/yarnpkg-core/sources/Project.ts | 1434 | // Step 3: Inform our linkers that they should have all the info needed | COMMENT |
| LOW | packages/yarnpkg-core/sources/Project.ts | 1464 | // Step 4: Build the packages in multiple steps | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …tests/pkg-tests-specs/sources/commands/install.test.ts | 570 | // Don't forget to rename the archive to match the name the real 1.0.0 would have | COMMENT |
| LOW | packages/plugin-init/sources/commands/init.ts | 191 | `# In that case, don't forget to run \`yarn config set enableGlobalCache false\`!`, | CODE |
| LOW | packages/plugin-init/sources/commands/init.ts | 191 | `# In that case, don't forget to run \`yarn config set enableGlobalCache false\`!`, | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/yarnpkg-core/sources/scriptUtils.ts | 321 | // so we leverage that. We also don't need the "set version" call since | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/plugin-stage/sources/commands/stage.ts | 49 | // TODO: implement it. Its purpose is, quoting @arcanis: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/e2e-setup-ci.sh | 33 | git config --global user.name "John Doe" | CODE |