{
  "version": 3,
  "sources": ["../../../../src/packages/lockfile.utils/packageIdFromSnapshot.ts"],
  "sourcesContent": ["import type { DepPath, PkgId } from '../types/index.ts';\nimport type { PackageSnapshot } from '../lockfile.types/index.ts';\nimport * as dp from '../dependency-path/index.ts';\n\nexport function packageIdFromSnapshot(\n  depPath: DepPath,\n  pkgSnapshot: PackageSnapshot\n): PkgId {\n  if (typeof pkgSnapshot.id === 'string') {\n    return pkgSnapshot.id as PkgId;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n  return dp.tryGetPackageId(depPath) ?? depPath;\n}\n"],
  "mappings": "AAEA,YAAY,QAAQ;AAEb,SAAS,sBACd,SACA,aACO;AACP,MAAI,OAAO,YAAY,OAAO,UAAU;AACtC,WAAO,YAAY;AAAA,EACrB;AAGA,SAAO,GAAG,gBAAgB,OAAO,KAAK;AACxC;",
  "names": []
}
