Skip to content

Commit

Permalink
feat(core): replace pnpm v10 error with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed May 27, 2024
1 parent 10fcb43 commit b0f2b14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/nx/src/plugins/js/lock-file/pnpm-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export function getPnpmLockfileNodes(
): Record<string, ProjectGraphExternalNode> {
const data = parsePnpmLockFile(lockFileContent, lockFileHash);
if (+data.lockfileVersion.toString() >= 10) {
throw new Error('Nx only supports pnpm lockfile version 5-9');
console.warn(
'Nx was tested only with pnpm lockfile version 5-9. If you encounter any issues, please report them and downgrade to older version of pnpm.'
);
}
const isV5 = isV5Syntax(data);
return getNodes(data, keyMap, isV5);
Expand All @@ -66,7 +68,9 @@ export function getPnpmLockfileDependencies(
) {
const data = parsePnpmLockFile(lockFileContent, lockFileHash);
if (+data.lockfileVersion.toString() >= 10) {
throw new Error('Nx only supports pnpm lockfile version 5-9');
console.warn(
'Nx was tested only with pnpm lockfile version 5-9. If you encounter any issues, please report them and downgrade to older version of pnpm.'
);
}
const isV5 = isV5Syntax(data);
return getDependencies(data, keyMap, isV5, ctx);
Expand Down

0 comments on commit b0f2b14

Please sign in to comment.