UNPKG

@rushstack/lockfile-explorer

Version:

Rush Lockfile Explorer: The UI for solving version conflicts quickly in a large monorepo

62 lines 2.4 kB
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. Object.defineProperty(exports, "__esModule", { value: true }); exports.LfxGraph = exports.LfxGraphEntry = exports.LfxGraphDependency = void 0; /** * Represents an graph edge, which is an exact dependency version obtained from the lockfile. */ class LfxGraphDependency { constructor(options) { this.resolvedEntry = undefined; this.name = options.name; this.versionPath = options.versionPath; this.entryId = options.entryId; this.originalSpecifier = options.originalSpecifier; this.dependencyKind = options.dependencyKind; this.peerDependencyMeta = options.peerDependencyMeta; this.containingEntry = options.containingEntry; } } exports.LfxGraphDependency = LfxGraphDependency; /** * Represents a project or package listed in the pnpm lockfile. * * @remarks * Each project or package will have its own LockfileEntry, which is created when the lockfile is first parsed. * The fields for the LockfileEntry are outlined below: */ class LfxGraphEntry { constructor(options) { /** * A list of all the dependencies for this entry. * Note that dependencies, dev dependencies, as well as peer dependencies are all included. */ this.dependencies = []; /** * A list of dependencies that are listed under the "transitivePeerDependencies" in the pnpm lockfile. */ this.transitivePeerDependencies = new Set(); /** * A list of entries that specify this entry as a dependency. */ this.referrers = []; this.kind = options.kind; this.entryId = options.entryId; this.rawEntryId = options.rawEntryId; this.packageJsonFolderPath = options.packageJsonFolderPath; this.entryPackageName = options.entryPackageName; this.displayText = options.displayText; this.entryPackageVersion = options.entryPackageVersion; this.entrySuffix = options.entrySuffix; } } exports.LfxGraphEntry = LfxGraphEntry; class LfxGraph { constructor(workspace) { this.entries = []; this.workspace = Object.assign({}, workspace); } } exports.LfxGraph = LfxGraph; //# sourceMappingURL=LfxGraph.js.map