Skip to content

Commit 8b3c6d9

Browse files
committed
Fix project change detection for new projects using PNPM
1 parent fe51179 commit 8b3c6d9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

apps/rush-lib/src/logic/pnpm/PnpmProjectShrinkwrapFile.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export class PnpmProjectShrinkwrapFile extends BaseProjectShrinkwrapFile {
2424
}
2525

2626
public hasChanges(otherShrinkwrap: PnpmProjectShrinkwrapFile): boolean {
27+
if (!otherShrinkwrap.shrinkwrapFile.isWorkspaceCompatible && !otherShrinkwrap.shrinkwrapFile.getTempProjectDependencyKey(this.project.tempProjectName)) {
28+
// The project is new to the shrinkwrap file.
29+
return true;
30+
}
31+
2732
const otherMap: Map<string, string> | undefined = otherShrinkwrap.generateProjectShrinkwrapMap();
2833
const thisMap: Map<string, string> | undefined = this.generateProjectShrinkwrapMap();
2934

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "Fix project change detection for new projects using PNPM",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush"
10+
}

0 commit comments

Comments
 (0)