From 6ba14d09a1f5f21fb3521d0acd9809cb7d0c9ed2 Mon Sep 17 00:00:00 2001 From: Daniel Nadeau <3473356+D4N14L@users.noreply.github.com> Date: Wed, 15 Jul 2020 16:00:36 -0700 Subject: [PATCH 1/3] Include package.json files in calculation to determine if install should be skipped --- .../installManager/WorkspaceInstallManager.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts b/apps/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts index 146f6d3648f..6d402b8692f 100644 --- a/apps/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts +++ b/apps/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts @@ -5,7 +5,13 @@ import * as colors from 'colors'; import * as os from 'os'; import * as path from 'path'; import * as semver from 'semver'; -import { FileSystem, InternalError, MapExtensions, JsonFile } from '@rushstack/node-core-library'; +import { + FileSystem, + InternalError, + MapExtensions, + JsonFile, + FileConstants +} from '@rushstack/node-core-library'; import { AlreadyReportedError } from '../../utilities/AlreadyReportedError'; import { BaseInstallManager, IInstallManagerOptions } from '../base/BaseInstallManager'; @@ -287,11 +293,15 @@ export class WorkspaceInstallManager extends BaseInstallManager { } } - // Also consider timestamps for all the project node_modules folders. - // Example: "C:\MyRepo\projects\projectA\node_modules" + // Also consider timestamps for all the project node_modules folders, as well as the package.json + // files + // Example: [ "C:\MyRepo\projects\projectA\node_modules", "C:\MyRepo\projects\projectA\package.json" ] potentiallyChangedFiles.push( ...this.rushConfiguration.projects.map((x) => { return path.join(x.projectFolder, RushConstants.nodeModulesFolderName); + }), + ...this.rushConfiguration.projects.map((x) => { + return path.join(x.projectFolder, FileConstants.PackageJson); }) ); From 7518cc2f4cf49d6d393d9acc5e4585a69d407152 Mon Sep 17 00:00:00 2001 From: Daniel Nadeau <3473356+D4N14L@users.noreply.github.com> Date: Wed, 15 Jul 2020 16:05:24 -0700 Subject: [PATCH 2/3] Rush change --- .../fixWorkspaceInstallSkip_2020-07-15-23-04.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json diff --git a/common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json b/common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json new file mode 100644 index 00000000000..1094e6df0c6 --- /dev/null +++ b/common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Consider package.json when determining if install can be skipped for workspaces", + "type": "patch" + } + ], + "packageName": "@microsoft/rush", + "email": "3473356+D4N14L@users.noreply.github.com" +} \ No newline at end of file From f8e446378fc698ea351000751aa82c9452b8de94 Mon Sep 17 00:00:00 2001 From: Daniel <3473356+D4N14L@users.noreply.github.com> Date: Wed, 15 Jul 2020 16:55:01 -0700 Subject: [PATCH 3/3] PR feedback --- .../rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json b/common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json index 1094e6df0c6..8b9c6a6eafb 100644 --- a/common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json +++ b/common/changes/@microsoft/rush/fixWorkspaceInstallSkip_2020-07-15-23-04.json @@ -2,10 +2,10 @@ "changes": [ { "packageName": "@microsoft/rush", - "comment": "Consider package.json when determining if install can be skipped for workspaces", + "comment": "Consider package.json when determining if install can be skipped for PNPM workspaces", "type": "patch" } ], "packageName": "@microsoft/rush", "email": "3473356+D4N14L@users.noreply.github.com" -} \ No newline at end of file +}