Skip to content

Commit b6a3a6a

Browse files
committed
Add docs for PnpmProjectDependencyManifest.
1 parent b231c5c commit b6a3a6a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎apps/rush-lib/src/logic/pnpm/PnpmProjectDependencyManifest.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ export interface IPnpmProjectDependencyManifestOptions {
2020
project: RushConfigurationProject;
2121
}
2222

23+
/**
24+
* This class handles creating the project/.rush/temp/project-dependencies.json file
25+
* which tracks the direct and indirect dependencies that a project consumes. This is used
26+
* to better determine which projects should be rebuilt when dependencies are updated.
27+
*/
2328
export class PnpmProjectDependencyManifest {
2429
private static _cache: Map<string, string> = new Map<string, string>();
2530

@@ -29,6 +34,10 @@ export class PnpmProjectDependencyManifest {
2934

3035
private _projectDependencyManifestFile: Map<string, string>;
3136

37+
/**
38+
* Get the fully-qualified path to the project/.rush/temp/project-dependencies.json
39+
* for the specified project.
40+
*/
3241
public static getFilePathForProject(project: RushConfigurationProject): string {
3342
return path.join(
3443
project.projectRushTempFolder,
@@ -52,6 +61,9 @@ export class PnpmProjectDependencyManifest {
5261
this._addDependencyInternal(pkg.name, pkg.version);
5362
}
5463

64+
/**
65+
* Save the current state of the object to project/.rush/temp/project-dependencies.json
66+
*/
5567
public save(): void {
5668
const file: { [specifier: string]: string } = {};
5769
const keys: string[] = Array.from(this._projectDependencyManifestFile.keys()).sort();

0 commit comments

Comments
 (0)