{
  "version": 3,
  "sources": ["../../../../src/packages/deps.status/assertLockfilesEqual.ts"],
  "sourcesContent": ["import { PnpmError } from '../error/index.ts';\nimport { equals } from 'ramda';\nimport type { LockfileObject } from '../lockfile.types/index.ts';\n\nexport function assertLockfilesEqual(\n  currentLockfile: LockfileObject | null,\n  wantedLockfile: LockfileObject,\n  wantedLockfileDir: string\n): void {\n  if (!currentLockfile) {\n    // make sure that no importer of wantedLockfile has any dependency\n    for (const [name, snapshot] of Object.entries(\n      wantedLockfile.importers ?? {}\n    )) {\n      if (!equals(snapshot.specifiers, {})) {\n        throw new PnpmError(\n          'RUN_CHECK_DEPS_NO_DEPS',\n          `Project ${name} requires dependencies but none was installed.`,\n          {\n            hint: 'Run `pnpm install` to install dependencies',\n          }\n        );\n      }\n    }\n  } else if (!equals(currentLockfile, wantedLockfile)) {\n    throw new PnpmError(\n      'RUN_CHECK_DEPS_OUTDATED_DEPS',\n      `The installed dependencies in the modules directory is not up-to-date with the lockfile in ${wantedLockfileDir}.`,\n      {\n        hint: 'Run `pnpm install` to update dependencies.',\n      }\n    );\n  }\n}\n"],
  "mappings": "AAAA,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AAGhB,SAAS,qBACd,iBACA,gBACA,mBACM;AACN,MAAI,CAAC,iBAAiB;AAEpB,eAAW,CAAC,MAAM,QAAQ,KAAK,OAAO;AAAA,MACpC,eAAe,aAAa,CAAC;AAAA,IAC/B,GAAG;AACD,UAAI,CAAC,OAAO,SAAS,YAAY,CAAC,CAAC,GAAG;AACpC,cAAM,IAAI;AAAA,UACR;AAAA,UACA,WAAW,IAAI;AAAA,UACf;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,WAAW,CAAC,OAAO,iBAAiB,cAAc,GAAG;AACnD,UAAM,IAAI;AAAA,MACR;AAAA,MACA,8FAA8F,iBAAiB;AAAA,MAC/G;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF;",
  "names": []
}
