@@ -488,16 +488,15 @@ export class LocalRegistry implements IRegistry {
488488 )
489489 }
490490
491- async getVersion ( packageId : string , version : string ) : Promise < PackageVersionCache | undefined > {
492- const [ verisonKey ] = getSplittedVersionKey ( version )
493- const compositeKey = getCompositeKey ( packageId , verisonKey )
491+ async getVersion ( packageId : string , versionKey : string ) : Promise < PackageVersionCache | undefined > {
492+ const compositeKey = getCompositeKey ( packageId , versionKey )
494493 if ( this . versions . has ( compositeKey ) ) {
495494 return this . versions . get ( compositeKey )
496495 }
497496
498497 const versionConfig = await loadConfig (
499498 VERSIONS_PATH ,
500- `${ packageId } /${ verisonKey } ` ,
499+ `${ packageId } /${ versionKey } ` ,
501500 PACKAGE . INFO_FILE_NAME ,
502501 ) as BuildConfig
503502 const versionCache : PackageVersionCache = {
@@ -514,7 +513,7 @@ export class LocalRegistry implements IRegistry {
514513
515514 const operationsFile = await loadFileAsString (
516515 VERSIONS_PATH ,
517- `${ packageId } /${ verisonKey } ` ,
516+ `${ packageId } /${ versionKey } ` ,
518517 PACKAGE . OPERATIONS_FILE_NAME ,
519518 )
520519
@@ -527,7 +526,7 @@ export class LocalRegistry implements IRegistry {
527526
528527 const data = await loadFileAsString (
529528 VERSIONS_PATH ,
530- `${ packageId } /${ verisonKey } /${ PACKAGE . OPERATIONS_DIR_NAME } ` ,
529+ `${ packageId } /${ versionKey } /${ PACKAGE . OPERATIONS_DIR_NAME } ` ,
531530 `${ operation . operationId } .json` ,
532531 )
533532 versionCache . operations . set (
@@ -541,14 +540,14 @@ export class LocalRegistry implements IRegistry {
541540
542541 const documentsFile = await loadFileAsString (
543542 VERSIONS_PATH ,
544- `${ packageId } /${ verisonKey } ` ,
543+ `${ packageId } /${ versionKey } ` ,
545544 PACKAGE . DOCUMENTS_FILE_NAME ,
546545 )
547546 const { documents } = documentsFile ? JSON . parse ( documentsFile ) : null as VersionDocuments | null ?? { documents : [ ] }
548547 for ( const document of documents ) {
549548 const data = await loadFileAsString (
550549 VERSIONS_PATH ,
551- `${ packageId } /${ verisonKey } /${ PACKAGE . DOCUMENTS_DIR_NAME } ` ,
550+ `${ packageId } /${ versionKey } /${ PACKAGE . DOCUMENTS_DIR_NAME } ` ,
552551 document . filename ,
553552 )
554553
@@ -565,7 +564,7 @@ export class LocalRegistry implements IRegistry {
565564
566565 const comparisonsFile = await loadFileAsString (
567566 VERSIONS_PATH ,
568- `${ packageId } /${ verisonKey } ` ,
567+ `${ packageId } /${ versionKey } ` ,
569568 PACKAGE . COMPARISONS_FILE_NAME ,
570569 )
571570 const { comparisons } = ( comparisonsFile
@@ -578,7 +577,7 @@ export class LocalRegistry implements IRegistry {
578577
579578 const notificationsFile = await loadFileAsString (
580579 VERSIONS_PATH ,
581- `${ packageId } /${ verisonKey } ` ,
580+ `${ packageId } /${ versionKey } ` ,
582581 PACKAGE . NOTIFICATIONS_FILE_NAME ,
583582 )
584583 const { notifications } = ( notificationsFile
0 commit comments