// src/actions/deplint/getDependenciesFromPackageJson.ts
import fs from "node:fs";
import path from "node:path";
function getDependenciesFromPackageJson(packageJsonPath) {
  const packageJsonFullPath = path.resolve(packageJsonPath);
  const rawContent = fs.readFileSync(packageJsonFullPath, "utf8");
  const packageJson = JSON.parse(rawContent);
  const depsRecord = packageJson.dependencies ?? {};
  const devDepsRecord = packageJson.devDependencies ?? {};
  const peerDepsRecord = packageJson.peerDependencies ?? {};
  const dependencies = Object.keys(depsRecord);
  const devDependencies = Object.keys(devDepsRecord);
  const peerDependencies = Object.keys(peerDepsRecord);
  const dependencyVersions = depsRecord;
  const devDependencyVersions = devDepsRecord;
  const peerDependencyVersions = peerDepsRecord;
  return {
    dependencies,
    dependencyVersions,
    devDependencies,
    devDependencyVersions,
    peerDependencies,
    peerDependencyVersions
  };
}
export {
  getDependenciesFromPackageJson
};
//# sourceMappingURL=getDependenciesFromPackageJson.mjs.map
