From 2b195bdca1980de47d85c2b616091503a27c3afa Mon Sep 17 00:00:00 2001 From: Eason Lin <48944243+EasonLin0716@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:52:12 +0800 Subject: [PATCH 1/2] Change error to warn for pnpm-lock format --- apps/lockfile-explorer/src/graph/lfxGraphLoader.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/lockfile-explorer/src/graph/lfxGraphLoader.ts b/apps/lockfile-explorer/src/graph/lfxGraphLoader.ts index 732548d9743..3db72dc314b 100644 --- a/apps/lockfile-explorer/src/graph/lfxGraphLoader.ts +++ b/apps/lockfile-explorer/src/graph/lfxGraphLoader.ts @@ -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; @@ -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.' + ); + hasWarnedAboutOutdatedFormat = true; + } + slashlessRawEntryId = rawEntryId; + } else { + slashlessRawEntryId = rawEntryId.substring(1); } - slashlessRawEntryId = rawEntryId.substring(1); } let dotPnpmSubfolder: string; From 3f678f91cb7856e835c95c796748535ae37f87bd Mon Sep 17 00:00:00 2001 From: Eason Lin <48944243+EasonLin0716@users.noreply.github.com> Date: Fri, 20 Feb 2026 10:06:51 +0800 Subject: [PATCH 2/2] doc: add changelog --- .../fix-lockfile-version-diffs_2026-02-20-02-06.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@rushstack/lockfile-explorer/fix-lockfile-version-diffs_2026-02-20-02-06.json diff --git a/common/changes/@rushstack/lockfile-explorer/fix-lockfile-version-diffs_2026-02-20-02-06.json b/common/changes/@rushstack/lockfile-explorer/fix-lockfile-version-diffs_2026-02-20-02-06.json new file mode 100644 index 00000000000..428456785c0 --- /dev/null +++ b/common/changes/@rushstack/lockfile-explorer/fix-lockfile-version-diffs_2026-02-20-02-06.json @@ -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" +} \ No newline at end of file