Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Add Linux/MacOS support for new 'virtual-store-dir-max-length'",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
10 changes: 7 additions & 3 deletions libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,13 @@ export class PnpmLinkManager extends BaseLinkManager {
const { depPathToFilename } = await import('@pnpm/dependency-path');

// project@file+projects+presentation-integration-tests.tgz_jsdom@11.12.0
// The second parameter is max length of virtual store dir, for v10 default is 60 https://pnpm.io/next/npmrc#virtual-store-dir-max-length
// The second parameter is max length of virtual store dir,
// for v10 default is 120 on Linux/MacOS and 60 on Windows https://pnpm.io/next/settings#virtualstoredirmaxlength
// TODO Read virtual-store-dir-max-length from .npmrc
const folderName: string = depPathToFilename(tempProjectDependencyKey, 60);
const folderName: string = depPathToFilename(
tempProjectDependencyKey,
process.platform === 'win32' ? 60 : 120
);
return path.join(
this._rushConfiguration.commonTempFolder,
RushConstants.nodeModulesFolderName,
Expand All @@ -339,7 +343,7 @@ export class PnpmLinkManager extends BaseLinkManager {
const { depPathToFilename } = await import('@pnpm/dependency-path-lockfile-pre-v10');

// project@file+projects+presentation-integration-tests.tgz_jsdom@11.12.0
// The second parameter is max length of virtual store dir, for v9 default is 120 https://pnpm.io/next/npmrc#virtual-store-dir-max-length
// The second parameter is max length of virtual store dir, for v9 default is 120 https://pnpm.io/9.x/npmrc#virtual-store-dir-max-length
// TODO Read virtual-store-dir-max-length from .npmrc
const folderName: string = depPathToFilename(tempProjectDependencyKey, 120);
return path.join(
Expand Down