"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseYarnLockV2Project = void 0;
const extract_yarnlock_v2_pkgs_1 = require("./extract-yarnlock-v2-pkgs");
const util_1 = require("../util");
const build_depgraph_simple_1 = require("./build-depgraph-simple");
const parseYarnLockV2Project = async (pkgJsonContent, yarnLockContent, options, workspaceArgs) => {
    const { includeDevDeps, includeOptionalDeps, strictOutOfSync, pruneWithinTopLevelDeps, } = options;
    const pkgs = (0, extract_yarnlock_v2_pkgs_1.extractPkgsFromYarnLockV2)(yarnLockContent);
    const pkgJson = (0, util_1.parsePkgJson)(pkgJsonContent);
    const depgraph = await (0, build_depgraph_simple_1.buildDepGraphYarnLockV2Simple)(pkgs, pkgJson, {
        includeDevDeps,
        strictOutOfSync,
        includeOptionalDeps,
        pruneWithinTopLevelDeps,
    }, workspaceArgs);
    return depgraph;
};
exports.parseYarnLockV2Project = parseYarnLockV2Project;
//# sourceMappingURL=simple.js.map