@@ -668,6 +668,7 @@ const injectedConfigMacro = makeMacro({
668668 new RecordingLogger ( ) ,
669669 thisStubConfig . originalUserInput ,
670670 augmentationProperties ,
671+ thisStubConfig . languages ,
671672 ) ;
672673
673674 await codeqlObject . databaseInitCluster (
@@ -737,6 +738,54 @@ injectedConfigMacro.serial(
737738 } ,
738739) ;
739740
741+ const additivePackConfigurations : Array < Record < string , string [ ] > > = [
742+ {
743+ javascript : [ "acme/javascript-queries" ] ,
744+ python : [ "acme/python-queries" ] ,
745+ } ,
746+ {
747+ python : [ "acme/python-queries" ] ,
748+ javascript : [ "acme/javascript-queries" ] ,
749+ } ,
750+ { javascript : [ "acme/javascript-queries" ] } ,
751+ { javascript : [ "acme/javascript-queries" ] , python : [ ] } ,
752+ { } ,
753+ ] ;
754+ for ( const packs of additivePackConfigurations ) {
755+ injectedConfigMacro . serial (
756+ `additive packs target the analyzed language in ${ JSON . stringify ( packs ) } ` ,
757+ {
758+ ...defaultAugmentationProperties ,
759+ packsInputCombines : true ,
760+ packsInput : [ "acme/python-extra" ] ,
761+ } ,
762+ {
763+ languages : [ BuiltInLanguage . python ] ,
764+ originalUserInput : { packs } ,
765+ } ,
766+ {
767+ packs : {
768+ ...packs ,
769+ python : [ ...( packs . python || [ ] ) , "acme/python-extra" ] ,
770+ } ,
771+ } ,
772+ ) ;
773+ }
774+
775+ injectedConfigMacro . serial (
776+ "additive packs preserve an existing array" ,
777+ {
778+ ...defaultAugmentationProperties ,
779+ packsInputCombines : true ,
780+ packsInput : [ "acme/python-extra" ] ,
781+ } ,
782+ {
783+ languages : [ BuiltInLanguage . python ] ,
784+ originalUserInput : { packs : [ "acme/python-queries" ] } ,
785+ } ,
786+ { packs : [ "acme/python-queries" , "acme/python-extra" ] } ,
787+ ) ;
788+
740789injectedConfigMacro . serial (
741790 "injected packs from input with existing packs overrides" ,
742791 {
0 commit comments