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 {
1247
1247
static readonly pnpmfileGlobalFilename: string ;
1248
1248
static readonly pnpmfileV1Filename: string ;
1249
1249
static readonly pnpmfileV6Filename: string ;
1250
+ static readonly pnpmPatchesCommonFolderName: string ;
1250
1251
static readonly pnpmPatchesFolderName: string ;
1251
1252
static readonly pnpmV3ShrinkwrapFilename: string ;
1252
1253
static readonly projectImpactGraphFilename: string ;
Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ export class RushPnpmCommandLineParser {
406
406
407
407
if ( ! objectsAreDeepEqual ( currentGlobalPatchedDependencies , newGlobalPatchedDependencies ) ) {
408
408
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 } ` ;
410
410
// Copy (or delete) common\temp\patches\ --> common\pnpm-patches\
411
411
if ( FileSystem . exists ( commonTempPnpmPatchesFolder ) ) {
412
412
FileSystem . ensureEmptyFolder ( rushPnpmPatchesFolder ) ;
@@ -433,7 +433,8 @@ export class RushPnpmCommandLineParser {
433
433
await this . _doRushUpdateAsync ( ) ;
434
434
435
435
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` +
437
438
' Please commit this change to Git.'
438
439
) ;
439
440
}
Original file line number Diff line number Diff line change @@ -103,6 +103,12 @@ export class RushConstants {
103
103
*/
104
104
public static readonly pnpmPatchesFolderName : string = 'patches' ;
105
105
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
+
106
112
/**
107
113
* The filename ("shrinkwrap.yaml") used to store state for pnpm
108
114
*/
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ export abstract class BaseInstallManager {
438
438
const commonTempPnpmPatchesFolder : string = `${ subspace . getSubspaceTempFolder ( ) } /${
439
439
RushConstants . pnpmPatchesFolderName
440
440
} `;
441
- const rushPnpmPatchesFolder : string = `${ this . rushConfiguration . commonFolder } /pnpm- ${ RushConstants . pnpmPatchesFolderName } ` ;
441
+ const rushPnpmPatchesFolder : string = `${ this . rushConfiguration . commonFolder } /${ RushConstants . pnpmPatchesCommonFolderName } ` ;
442
442
if ( FileSystem . exists ( rushPnpmPatchesFolder ) ) {
443
443
FileSystem . copyFiles ( {
444
444
sourcePath : rushPnpmPatchesFolder ,
You can’t perform that action at this time.
0 commit comments