-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,209 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
common/changes/@microsoft/rush/feature-support_pnpmv9_2024-11-19-08-24.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@microsoft/rush", | ||
"comment": "Support pnpm lockfile v9, which is used by default starting in pnpm v9.", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@microsoft/rush" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@rushstack/lockfile-explorer/feature-support_pnpmv9_2024-11-25-14-05.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@rushstack/lockfile-explorer", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@rushstack/lockfile-explorer" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 43 additions & 6 deletions
49
common/config/subspaces/build-tests-subspace/pnpm-lock.yaml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. | ||
{ | ||
"pnpmShrinkwrapHash": "a3198248beff4dfe8ef9d9c798b873ead75ef5cd", | ||
"pnpmShrinkwrapHash": "bd75fc59a5df40deec1cf3db51e99ab1a7eb35f6", | ||
"preferredVersionsHash": "ce857ea0536b894ec8f346aaea08cfd85a5af648", | ||
"packageJsonInjectedDependenciesHash": "35920c267d4a49b8de4b78d88cf91c7f46b83ebb" | ||
"packageJsonInjectedDependenciesHash": "3f1f7f2e64fc15d64eef6c0311adc38dff344509" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. | ||
{ | ||
"pnpmShrinkwrapHash": "387d2507a3b0dee1dd0ca694ced243f0edaa0dc1", | ||
"pnpmShrinkwrapHash": "7b913e5ca364b30654436bba1a36ea570496f25c", | ||
"preferredVersionsHash": "ce857ea0536b894ec8f346aaea08cfd85a5af648" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,7 +229,8 @@ export class PnpmLinkManager extends BaseLinkManager { | |
const pathToLocalInstallation: string = await this._getPathToLocalInstallationAsync( | ||
tarballEntry, | ||
absolutePathToTgzFile, | ||
folderNameSuffix | ||
folderNameSuffix, | ||
tempProjectDependencyKey | ||
); | ||
|
||
const parentShrinkwrapEntry: IPnpmShrinkwrapDependencyYaml | undefined = | ||
|
@@ -289,7 +290,8 @@ export class PnpmLinkManager extends BaseLinkManager { | |
private async _getPathToLocalInstallationAsync( | ||
tarballEntry: string, | ||
absolutePathToTgzFile: string, | ||
folderSuffix: string | ||
folderSuffix: string, | ||
tempProjectDependencyKey: string | ||
): Promise<string> { | ||
if (this._pnpmVersion.major === 6) { | ||
// PNPM 6 changed formatting to replace all ':' and '/' chars with '+'. Additionally, folder names > 120 | ||
|
@@ -319,8 +321,22 @@ export class PnpmLinkManager extends BaseLinkManager { | |
folderName, | ||
RushConstants.nodeModulesFolderName | ||
); | ||
} else if (this._pnpmVersion.major >= 8) { | ||
} else if (this._pnpmVersion.major >= 9) { | ||
const { depPathToFilename } = await import('@pnpm/dependency-path'); | ||
|
||
// project@[email protected] | ||
// The second parameter is max length of virtual store dir, default is 120 https://pnpm.io/next/npmrc#virtual-store-dir-max-length | ||
// TODO Read virtual-store-dir-max-length from .npmrc | ||
const folderName: string = depPathToFilename(tempProjectDependencyKey, 120); | ||
return path.join( | ||
this._rushConfiguration.commonTempFolder, | ||
RushConstants.nodeModulesFolderName, | ||
'.pnpm', | ||
folderName, | ||
RushConstants.nodeModulesFolderName | ||
); | ||
} else if (this._pnpmVersion.major >= 8) { | ||
const { depPathToFilename } = await import('@pnpm/dependency-path-lockfile-pre-v9'); | ||
// PNPM 8 changed the local path format again and the hashing algorithm, and | ||
// is now using the scoped '@pnpm/dependency-path' package | ||
// See https://github.com/pnpm/pnpm/releases/tag/v8.0.0 | ||
|
Oops, something went wrong.