UNPKG

workspace-tools

Version:

A collection of utilities that are useful in a git-controlled monorepo managed by one of these tools:

15 lines 723 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseNpmLock = void 0; const nameAtVersion_1 = require("./nameAtVersion"); function parseNpmLock(lock) { // Re-format the dependencies object so that the key includes the version, similarly to yarn.lock. // For example, `"@microsoft/task-scheduler": { }` will become `"@microsoft/task-scheduler@2.7.1": { }`. const dependencies = Object.fromEntries(Object.entries(lock.dependencies ?? {}).map(([key, dep]) => [(0, nameAtVersion_1.nameAtVersion)(key, dep.version), dep])); return { object: dependencies, type: "success", }; } exports.parseNpmLock = parseNpmLock; //# sourceMappingURL=parseNpmLock.js.map