Files
pnpm/installing/deps-resolver/src/depPathToRef.ts
Zoltan Kochan 8acf2708c9 refactor: rename deps-resolver and env-installer packages (#11013)
Rename @pnpm/installing.resolve-dependencies to @pnpm/installing.deps-resolver
for consistency with the <domain>.<leaf> naming convention.
2026-03-18 21:52:01 +01:00

13 lines
274 B
TypeScript

export function depPathToRef (
depPath: string,
opts: {
alias: string
realName: string
}
): string {
if (opts.alias === opts.realName && depPath.startsWith(`${opts.realName}@`)) {
return depPath.substring(opts.realName.length + 1)
}
return depPath
}