Skip to content

Commit 67582e4

Browse files
committed
Change per-project shrinkwrap file name and exported method name
1 parent 1af9f08 commit 67582e4

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎apps/rush-lib/src/logic/PackageChangeAnalyzer.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as colors from 'colors';
66

77
import {
88
getPackageDeps,
9-
gitHashFiles,
9+
getGitHashForFiles,
1010
IPackageDeps
1111
} from '@microsoft/package-deps-hash';
1212
import {
@@ -107,7 +107,7 @@ export class PackageChangeAnalyzer {
107107
* "src/fileOne.ts": "a8sfa8979871fdjiojlk",
108108
* "common/api/review": "324598afasfdsd", // this entry was added by the API Extractor
109109
* // task (for example)
110-
* ".rush/temp/project-dependencies.json": "3428789dsafdsfaf" // this is a file which will be created by rush
110+
* ".rush/temp/shrinkwrap-deps.json": "3428789dsafdsfaf" // this is a file which will be created by rush
111111
* // link describing the state of the
112112
* // node_modules folder
113113
* }
@@ -159,7 +159,7 @@ export class PackageChangeAnalyzer {
159159
projectDependencyManifestPaths.push(relativeDependencyManifestFilePath);
160160
}
161161

162-
const hashes: Map<string, string> = gitHashFiles(
162+
const hashes: Map<string, string> = getGitHashForFiles(
163163
projectDependencyManifestPaths,
164164
this._rushConfiguration.rushJsonFolder
165165
);

‎apps/rush-lib/src/logic/RushConstants.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ export namespace RushConstants {
153153
* The name of the file to drop in project-folder/.rush/temp/ containing a listing of the project's direct
154154
* and indirect dependencies. This is used to detect if a project's dependencies have changed since the last build.
155155
*/
156-
export const projectDependencyManifestFilename: string = 'project-dependencies.json';
156+
export const projectDependencyManifestFilename: string = 'shrinkwrap-deps.json';
157157
}

‎apps/rush-lib/src/logic/UnlinkManager.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class UnlinkManager {
2020

2121
/**
2222
* Delete flag file and all the existing node_modules symlinks and all
23-
* project/.rush/temp/project-dependencies.json files
23+
* project/.rush/temp/shrinkwrap-deps.json files
2424
*
2525
* Returns true if anything was deleted.
2626
*/
@@ -32,7 +32,7 @@ export class UnlinkManager {
3232
/**
3333
* Delete:
3434
* - all the node_modules symlinks of configured Rush projects
35-
* - all of the project/.rush/temp/project-dependencies.json files of configured Rush projects
35+
* - all of the project/.rush/temp/shrinkwrap-deps.json files of configured Rush projects
3636
*
3737
* Returns true if anything was deleted
3838
* */

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface IPnpmProjectDependencyManifestOptions {
2525
}
2626

2727
/**
28-
* This class handles creating the project/.rush/temp/project-dependencies.json file
28+
* This class handles creating the project/.rush/temp/shrinkwrap-deps.json file
2929
* which tracks the direct and indirect dependencies that a project consumes. This is used
3030
* to better determine which projects should be rebuilt when dependencies are updated.
3131
*/
@@ -39,7 +39,7 @@ export class PnpmProjectDependencyManifest {
3939
private _projectDependencyManifestFile: Map<string, string>;
4040

4141
/**
42-
* Get the fully-qualified path to the project/.rush/temp/project-dependencies.json
42+
* Get the fully-qualified path to the project/.rush/temp/shrinkwrap-deps.json
4343
* for the specified project.
4444
*/
4545
public static getFilePathForProject(project: RushConfigurationProject): string {
@@ -66,7 +66,7 @@ export class PnpmProjectDependencyManifest {
6666
}
6767

6868
/**
69-
* Save the current state of the object to project/.rush/temp/project-dependencies.json
69+
* Save the current state of the object to project/.rush/temp/shrinkwrap-deps.json
7070
*/
7171
public save(): void {
7272
const file: { [specifier: string]: string } = {};
@@ -83,7 +83,7 @@ export class PnpmProjectDependencyManifest {
8383
}
8484

8585
/**
86-
* If the project/.rush/temp/project-dependencies.json file exists, delete it. Otherwise, do nothing.
86+
* If the project/.rush/temp/shrinkwrap-deps.json file exists, delete it. Otherwise, do nothing.
8787
*/
8888
public deleteIfExists(): void {
8989
FileSystem.deleteFile(this._projectDependencyManifestFilename, { throwIfNotExists: false });

‎common/changes/@microsoft/rush/ianc-per-project-shrinkwrap_2019-09-13-20-41.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"changes": [
33
{
4-
"comment": "When using pnpm, introduce the ability to only rebuild projects whose direct and/or indirect dependencies have changed.",
4+
"comment": "Improve 'rush build' to avoid rebuilding unnecessarily when the package-lock.json file has changed (pnpm only).",
55
"packageName": "@microsoft/rush",
66
"type": "none"
77
}

‎libraries/package-deps-hash/src/getPackageDeps.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export function parseGitStatus(output: string, packagePath: string): Map<string,
9090
*
9191
* @public
9292
*/
93-
export function gitHashFiles(filesToHash: string[], packagePath: string): Map<string, string> {
93+
export function getGitHashForFiles(filesToHash: string[], packagePath: string): Map<string, string> {
9494
const changes: Map<string, string> = new Map<string, string>();
9595
if (filesToHash.length) {
9696
const hashStdout: string = child_process.execSync(
@@ -175,7 +175,7 @@ export function getPackageDeps(packagePath: string = process.cwd(), excludedPath
175175
}
176176
});
177177

178-
gitHashFiles(filesToHash, packagePath).forEach((hash: string, filename: string) => {
178+
getGitHashForFiles(filesToHash, packagePath).forEach((hash: string, filename: string) => {
179179
changes.files[filename] = hash;
180180
});
181181

‎libraries/package-deps-hash/src/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
export {
1717
getPackageDeps,
18-
gitHashFiles
18+
getGitHashForFiles
1919
} from './getPackageDeps';
2020
export { IPackageDeps } from './IPackageDeps';

0 commit comments

Comments
 (0)