Skip to content
Open
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
13 changes: 11 additions & 2 deletions apps/lockfile-explorer/src/graph/lfxGraphLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import * as lockfilePath from './lockfilePath';
type PnpmLockfileVersion = 54 | 60 | 90;
type PeerDependenciesMeta = lockfileTypes.LockfilePackageInfo['peerDependenciesMeta'];

let hasWarnedAboutOutdatedFormat: boolean = false;

function createPackageLockfileDependency(options: {
name: string;
versionPath: string;
Expand Down Expand Up @@ -329,9 +331,16 @@ function createPackageLockfileEntry(options: {
slashlessRawEntryId = rawEntryId;
} else {
if (!rawEntryId.startsWith('/')) {
throw new Error('Expecting leading "/" in path: ' + JSON.stringify(rawEntryId));
if (!hasWarnedAboutOutdatedFormat) {
console.warn(
'Your pnpm-lock.yaml contains outdated version formats. Please run "rush update --full" to fix this issue.'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this only happen in a case when rush update --full will fix it?

Copy link
Author

@EasonLin0716 EasonLin0716 Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog is added. Please take a look, thank you.

Does this only happen in a case when rush update --full will fix it?

This case happens when users haven't run rush update --full after migrating their pnpm version, especially from v8 to v9. Users can either run rush update --full or remove the pnpm-lock.yaml and run rush install again to fix it.

);
hasWarnedAboutOutdatedFormat = true;
}
slashlessRawEntryId = rawEntryId;
} else {
slashlessRawEntryId = rawEntryId.substring(1);
}
slashlessRawEntryId = rawEntryId.substring(1);
}

let dotPnpmSubfolder: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/lockfile-explorer",
"comment": "Add user-friendly warning for outdated pnpm-lock.yaml instead of throwing an error. The warning suggests running \"rush update --full\" to fix the issue.",
"type": "patch"
}
],
"packageName": "@rushstack/lockfile-explorer"
}