"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LockfileV9Parser = void 0;
const lockfile_v6_1 = require("./lockfile-v6");
const DEFAULT_WORKSPACE_ARGS = {
    isWorkspace: true,
    projectsVersionMap: {},
};
class LockfileV9Parser extends lockfile_v6_1.LockfileV6Parser {
    constructor(rawPnpmLock, workspaceArgs = DEFAULT_WORKSPACE_ARGS) {
        super(rawPnpmLock, workspaceArgs);
        this.settings = rawPnpmLock.settings;
        this.packages = {};
        this.snapshots = rawPnpmLock.snapshots || {};
        Object.entries(this.snapshots).forEach(([depPath, versionData]) => {
            const normalizedDepPath = this.excludeTransPeerDepsVersions(depPath);
            this.packages[normalizedDepPath] = Object.assign(Object.assign({}, rawPnpmLock.packages[normalizedDepPath]), versionData);
        });
    }
}
exports.LockfileV9Parser = LockfileV9Parser;
//# sourceMappingURL=lockfile-v9.js.map