Table of Contents

Class LockfileReader

Namespace
Nite.Import
Assembly
Nite.dll

Reads the package versions a project currently uses out of its lockfile. Nite does not convert lockfiles: it resolves its own tree, preferring these versions wherever they satisfy the ranges, so an imported project keeps running what it ran before. Only registry versions are returned; file:, link:, workspace:, git and similar entries are skipped.

public static class LockfileReader
Inheritance
LockfileReader
Inherited Members

Methods

Detect(string)

Finds the lockfile in a project directory, most specific first.

public static (PackageManager Manager, string? Path) Detect(string directory)

Parameters

directory string

Returns

(PackageManager Manager, string Path)

Read(PackageManager, string)

Package name → the versions the lockfile has for it.

public static Dictionary<string, HashSet<string>> Read(PackageManager manager, string path)

Parameters

manager PackageManager
path string

Returns

Dictionary<string, HashSet<string>>