@@ -100,16 +100,12 @@ export const eslintCategories: CategoryConfig[] = [
100100export function getJsDocsCategories (
101101 config : JsDocsPluginConfig ,
102102) : CategoryConfig [ ] {
103- const filterOptions =
104- typeof config === 'string' || Array . isArray ( config )
105- ? { }
106- : { onlyAudits : config . onlyAudits , skipAudits : config . skipAudits } ;
107103 return [
108104 {
109105 slug : 'docs' ,
110106 title : 'Documentation' ,
111107 description : 'Measures how much of your code is **documented**.' ,
112- refs : filterGroupsByOnlyAudits ( groups , filterOptions ) . map ( group => ( {
108+ refs : filterGroupsByOnlyAudits ( groups , config ) . map ( group => ( {
113109 weight : 1 ,
114110 type : 'group' ,
115111 plugin : PLUGIN_SLUG ,
@@ -163,13 +159,12 @@ export const jsDocsCoreConfig = (
163159
164160export const eslintCoreConfigNx = async (
165161 projectName ?: string ,
166- options ?: { exclude ?: string [ ] } ,
167162) : Promise < CoreConfig > => ( {
168163 plugins : [
169164 await eslintPlugin (
170165 await ( projectName
171166 ? eslintConfigFromNxProject ( projectName )
172- : eslintConfigFromAllNxProjects ( options ) ) ,
167+ : eslintConfigFromAllNxProjects ( ) ) ,
173168 ) ,
174169 ] ,
175170 categories : eslintCategories ,
@@ -183,42 +178,18 @@ export const typescriptPluginConfig = async (
183178} ) ;
184179
185180export const coverageCoreConfigNx = async (
186- projectOrConfig ?:
187- | string
188- | {
189- projectName : string ;
190- targetNames : string [ ] ;
191- } ,
192- options ?: { exclude ?: string [ ] } ,
181+ projectName ?: string ,
193182) : Promise < CoreConfig > => {
194- const projectName =
195- typeof projectOrConfig === 'string'
196- ? projectOrConfig
197- : projectOrConfig ?. projectName ;
198- const targetNames =
199- typeof projectOrConfig === 'object' && projectOrConfig ?. targetNames ?. length
200- ? projectOrConfig . targetNames
201- : [ 'unit-test' , 'int-test' ] ;
202-
203183 if ( projectName ) {
204184 throw new Error ( 'coverageCoreConfigNx for single projects not implemented' ) ;
205185 }
206-
207- const targetArgs = [ '-t' , ...targetNames ] ;
208-
209- // Compute projects list and apply exclude for efficient run-many execution
210- const { createProjectGraphAsync } = await import ( '@nx/devkit' ) ;
211- const { nodes } = await createProjectGraphAsync ( { exitOnError : false } ) ;
212- const projectsWithTargets = Object . values ( nodes ) . filter ( node =>
213- targetNames . some ( t => node . data . targets && t in node . data . targets ) ,
214- ) ;
215- const filteredProjects = options ?. exclude ?. length
216- ? projectsWithTargets . filter ( node => ! options . exclude ! . includes ( node . name ) )
217- : projectsWithTargets ;
218- const projectsArg = `--projects=${ filteredProjects
219- . map ( p => p . name )
220- . join ( ',' ) } `;
221-
186+ const targetNames = [ 'unit-test' , 'int-test' ] ;
187+ const targetArgs = [
188+ '-t' ,
189+ ...targetNames ,
190+ '--coverage.enabled' ,
191+ '--skipNxCache' ,
192+ ] ;
222193 return {
223194 plugins : [
224195 await coveragePlugin ( {
@@ -228,10 +199,9 @@ export const coverageCoreConfigNx = async (
228199 'nx' ,
229200 projectName ? `run --project ${ projectName } ` : 'run-many' ,
230201 ...targetArgs ,
231- projectsArg ,
232202 ] ,
233203 } ,
234- reports : await getNxCoveragePaths ( targetNames , false , options ?. exclude ) ,
204+ reports : await getNxCoveragePaths ( targetNames ) ,
235205 } ) ,
236206 ] ,
237207 categories : coverageCategories ,
0 commit comments