diff --git a/src/analyze/make-context-from-config.ts b/src/analyze/make-context-from-config.ts index 86786f91..86b0f270 100644 --- a/src/analyze/make-context-from-config.ts +++ b/src/analyze/make-context-from-config.ts @@ -28,10 +28,10 @@ export function makeContextFromConfig(options: AnalyzerOptions): AnalyzerVisitCo general: new Map() }, config: { - analyzeLibDom: false, - excludedDeclarationNames: [], - features: ALL_COMPONENT_FEATURES, - ...(options.config || {}) + ...options.config, + analyzeLibDom: options.config?.analyzeLibDom ?? false, + excludedDeclarationNames: options.config?.excludedDeclarationNames ?? [], + features: options.config?.features ?? ALL_COMPONENT_FEATURES } }; } diff --git a/src/cli/analyzer-cli-config.ts b/src/cli/analyzer-cli-config.ts index 39cc7149..3aa8b6b1 100644 --- a/src/cli/analyzer-cli-config.ts +++ b/src/cli/analyzer-cli-config.ts @@ -17,6 +17,7 @@ export interface AnalyzerCliConfig { features?: ComponentFeature[]; discoverLibraryFiles?: boolean; + analyzeGlobalFeatures?: boolean; markdown?: { titleLevel?: number; diff --git a/src/cli/util/analyze-globs.ts b/src/cli/util/analyze-globs.ts index 61aff857..1684f425 100644 --- a/src/cli/util/analyze-globs.ts +++ b/src/cli/util/analyze-globs.ts @@ -71,7 +71,8 @@ export async function analyzeGlobs( verbose: config.verbose || false, ts: config.ts, config: { - features: config.features + features: config.features, + analyzeGlobalFeatures: config.analyzeGlobalFeatures } }); diff --git a/test/helpers/test-result-snapshot.ts b/test/helpers/test-result-snapshot.ts index fc92d397..239ec7d4 100644 --- a/test/helpers/test-result-snapshot.ts +++ b/test/helpers/test-result-snapshot.ts @@ -14,9 +14,7 @@ function testResult( test(testName, async t => { const { results, program } = await analyzeGlobs(globs, { discoverLibraryFiles: true, - analyze: { - analyzeGlobalFeatures: true - } + analyzeGlobalFeatures: true }); const nonEmptyResults = results.filter(result => result.componentDefinitions.length > 0);