File tree Expand file tree Collapse file tree 5 files changed +21
-3
lines changed Expand file tree Collapse file tree 5 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "changes" : [
3+ {
4+ "packageName" : " @microsoft/rush" ,
5+ "comment" : " Include a `pnpmPatchesCommonFolderName` constant for the folder name \" pnpm-patches\" that gets placed under \" common\" ." ,
6+ "type" : " none"
7+ }
8+ ],
9+ "packageName" : " @microsoft/rush"
10+ }
Original file line number Diff line number Diff line change @@ -1247,6 +1247,7 @@ export class RushConstants {
12471247 static readonly pnpmfileGlobalFilename: string ;
12481248 static readonly pnpmfileV1Filename: string ;
12491249 static readonly pnpmfileV6Filename: string ;
1250+ static readonly pnpmPatchesCommonFolderName: string ;
12501251 static readonly pnpmPatchesFolderName: string ;
12511252 static readonly pnpmV3ShrinkwrapFilename: string ;
12521253 static readonly projectImpactGraphFilename: string ;
Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ export class RushPnpmCommandLineParser {
406406
407407 if ( ! objectsAreDeepEqual ( currentGlobalPatchedDependencies , newGlobalPatchedDependencies ) ) {
408408 const commonTempPnpmPatchesFolder : string = `${ this . _rushConfiguration . commonTempFolder } /${ RushConstants . pnpmPatchesFolderName } ` ;
409- const rushPnpmPatchesFolder : string = `${ this . _rushConfiguration . commonFolder } /pnpm- ${ RushConstants . pnpmPatchesFolderName } ` ;
409+ const rushPnpmPatchesFolder : string = `${ this . _rushConfiguration . commonFolder } /${ RushConstants . pnpmPatchesCommonFolderName } ` ;
410410 // Copy (or delete) common\temp\patches\ --> common\pnpm-patches\
411411 if ( FileSystem . exists ( commonTempPnpmPatchesFolder ) ) {
412412 FileSystem . ensureEmptyFolder ( rushPnpmPatchesFolder ) ;
@@ -433,7 +433,8 @@ export class RushPnpmCommandLineParser {
433433 await this . _doRushUpdateAsync ( ) ;
434434
435435 this . _terminal . writeWarningLine (
436- `Rush refreshed the ${ RushConstants . pnpmConfigFilename } , shrinkwrap file and patch files under the "common/pnpm/patches" folder.\n` +
436+ `Rush refreshed the ${ RushConstants . pnpmConfigFilename } , shrinkwrap file and patch files under the ` +
437+ `"${ RushConstants . commonFolderName } /${ RushConstants . pnpmPatchesCommonFolderName } " folder.\n` +
437438 ' Please commit this change to Git.'
438439 ) ;
439440 }
Original file line number Diff line number Diff line change @@ -103,6 +103,12 @@ export class RushConstants {
103103 */
104104 public static readonly pnpmPatchesFolderName : string = 'patches' ;
105105
106+ /**
107+ * The folder name under `/common/temp` used to store checked-in patches.
108+ * Example: `C:\MyRepo\common\pnpm-patches`
109+ */
110+ public static readonly pnpmPatchesCommonFolderName : string = `pnpm-${ RushConstants . pnpmPatchesFolderName } ` ;
111+
106112 /**
107113 * The filename ("shrinkwrap.yaml") used to store state for pnpm
108114 */
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ export abstract class BaseInstallManager {
438438 const commonTempPnpmPatchesFolder : string = `${ subspace . getSubspaceTempFolder ( ) } /${
439439 RushConstants . pnpmPatchesFolderName
440440 } `;
441- const rushPnpmPatchesFolder : string = `${ this . rushConfiguration . commonFolder } /pnpm- ${ RushConstants . pnpmPatchesFolderName } ` ;
441+ const rushPnpmPatchesFolder : string = `${ this . rushConfiguration . commonFolder } /${ RushConstants . pnpmPatchesCommonFolderName } ` ;
442442 if ( FileSystem . exists ( rushPnpmPatchesFolder ) ) {
443443 FileSystem . copyFiles ( {
444444 sourcePath : rushPnpmPatchesFolder ,
You can’t perform that action at this time.
0 commit comments