File tree Expand file tree Collapse file tree
apps/lockfile-explorer/src/graph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import * as lockfilePath from './lockfilePath';
2121type PnpmLockfileVersion = 54 | 60 | 90 ;
2222type PeerDependenciesMeta = lockfileTypes . LockfilePackageInfo [ 'peerDependenciesMeta' ] ;
2323
24+ let hasWarnedAboutOutdatedFormat : boolean = false ;
25+
2426function createPackageLockfileDependency ( options : {
2527 name : string ;
2628 versionPath : string ;
@@ -329,9 +331,16 @@ function createPackageLockfileEntry(options: {
329331 slashlessRawEntryId = rawEntryId ;
330332 } else {
331333 if ( ! rawEntryId . startsWith ( '/' ) ) {
332- throw new Error ( 'Expecting leading "/" in path: ' + JSON . stringify ( rawEntryId ) ) ;
334+ if ( ! hasWarnedAboutOutdatedFormat ) {
335+ console . warn (
336+ 'Your pnpm-lock.yaml contains outdated version formats. Please run "rush update --full" to fix this issue.'
337+ ) ;
338+ hasWarnedAboutOutdatedFormat = true ;
339+ }
340+ slashlessRawEntryId = rawEntryId ;
341+ } else {
342+ slashlessRawEntryId = rawEntryId . substring ( 1 ) ;
333343 }
334- slashlessRawEntryId = rawEntryId . substring ( 1 ) ;
335344 }
336345
337346 let dotPnpmSubfolder : string ;
You can’t perform that action at this time.
0 commit comments