Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] Consider package.json files in calculation to determine if install should be skipped in workspaces #2029

Merged
merged 3 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions apps/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
})
);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"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"
}