@@ -528,26 +528,6 @@ function upgradeSurvivorBaselineVersionForLane(poolLane: DockerE2eLane): string
528528 return / (?: ^ | \/ | @ ) ( \d { 4 } \. \d + \. \d + (?: - [ 0 - 9 A - Z a - z . - ] + ) ? ) $ / u. exec ( spec ?? "" ) ?. [ 1 ] ?? null ;
529529}
530530
531- function configuredChannelIdsForLane ( poolLane : DockerE2eLane , scenario : string ) : Set < string > {
532- const channelIds = new Set < string > ( ) ;
533- const baselineVersion = upgradeSurvivorBaselineVersionForLane ( poolLane ) ;
534- const resolveConfigSteps = resolveUpgradeSurvivorConfigStepsForBaseline as (
535- scenario : string ,
536- baselineVersion : string | null ,
537- ) => ReturnType < typeof resolveUpgradeSurvivorConfigStepsForBaseline > ;
538- for ( const step of resolveConfigSteps ( scenario , baselineVersion ) ) {
539- if ( step . argv ?. [ 0 ] !== "config" || step . argv ?. [ 1 ] !== "set" ) {
540- continue ;
541- }
542- const match = / ^ c h a n n e l s \. ( [ a - z 0 - 9 ] [ a - z 0 - 9 - ] * ) $ / u. exec ( step . argv [ 2 ] ?? "" ) ;
543- const channelId = match ?. [ 1 ] ;
544- if ( channelId ) {
545- channelIds . add ( channelId ) ;
546- }
547- }
548- return channelIds ;
549- }
550-
551531export function requiredPrepublishPluginPackagesForLanes ( poolLanes : DockerE2eLane [ ] ) : string [ ] {
552532 const configuredChannelIds = new Set < string > ( ) ;
553533 const requiredPackages = new Set < string > ( ) ;
@@ -562,8 +542,21 @@ export function requiredPrepublishPluginPackagesForLanes(poolLanes: DockerE2eLan
562542 for ( const packageName of UPGRADE_SURVIVOR_RUNTIME_COMPANION_PACKAGES ) {
563543 requiredPackages . add ( packageName ) ;
564544 }
565- for ( const channelId of configuredChannelIdsForLane ( poolLane , scenario ) ) {
566- configuredChannelIds . add ( channelId ) ;
545+ const steps = resolveUpgradeSurvivorConfigStepsForBaseline (
546+ scenario ,
547+ upgradeSurvivorBaselineVersionForLane ( poolLane ) ,
548+ ) ;
549+ for ( const step of steps ) {
550+ for ( const packageName of step . prepublishPluginPackages ?? [ ] ) {
551+ requiredPackages . add ( packageName ) ;
552+ }
553+ if ( step . argv [ 0 ] !== "config" || step . argv [ 1 ] !== "set" ) {
554+ continue ;
555+ }
556+ const channelId = / ^ c h a n n e l s \. ( [ a - z 0 - 9 ] [ a - z 0 - 9 - ] * ) $ / u. exec ( step . argv [ 2 ] ?? "" ) ?. [ 1 ] ;
557+ if ( channelId ) {
558+ configuredChannelIds . add ( channelId ) ;
559+ }
567560 }
568561 }
569562 for ( const packageName of ( officialExternalChannelCatalog . entries ?? [ ] )
0 commit comments