feat(providence-analytics): export MatchSubclassesAnalyzer for external usage (#2313)

This commit is contained in:
Thijs Louisse 2024-07-10 19:20:50 +02:00 committed by GitHub
parent 16bb2759a1
commit 4ee62c32ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 11 deletions

View file

@ -0,0 +1,5 @@
---
'providence-analytics': patch
---
export MatchSubclassesAnalyzer for external usage

View file

@ -5,6 +5,7 @@ export { Analyzer } from '../core/Analyzer.js';
export { default as FindExportsAnalyzer } from './find-exports.js';
export { default as FindImportsAnalyzer } from './find-imports.js';
export { default as MatchImportsAnalyzer } from './match-imports.js';
export { default as MatchSubclassesAnalyzer } from './match-subclasses.js';
export { transformIntoIterableFindImportsOutput } from './helpers/transform-into-iterable-find-imports-output.js';
export { transformIntoIterableFindExportsOutput } from './helpers/transform-into-iterable-find-exports-output.js';

View file

@ -7,15 +7,17 @@ import { Analyzer } from '../core/Analyzer.js';
import { fromImportToExportPerspective } from '../utils/from-import-to-export-perspective.js';
/**
* @typedef {import('../../../types/index.js').ConciseMatchImportsAnalyzerResult} ConciseMatchImportsAnalyzerResult
* @typedef {import('../../../types/index.js').IterableFindExportsAnalyzerEntry} IterableFindExportsAnalyzerEntry
* @typedef {import('../../../types/index.js').IterableFindImportsAnalyzerEntry} IterableFindImportsAnalyzerEntry
* @typedef {import('../../../types/index.js').PathRelativeFromProjectRoot} PathRelativeFromProjectRoot
* @typedef {import('../../../types/index.js').FindClassesAnalyzerResult} FindClassesAnalyzerResult
* @typedef {import('../../../types/index.js').FindImportsAnalyzerResult} FindImportsAnalyzerResult
* @typedef {import('../../../types/index.js').FindExportsAnalyzerResult} FindExportsAnalyzerResult
* @typedef {import('../../../types/index.js').IterableFindExportsAnalyzerEntry} IterableFindExportsAnalyzerEntry
* @typedef {import('../../../types/index.js').IterableFindImportsAnalyzerEntry} IterableFindImportsAnalyzerEntry
* @typedef {import('../../../types/index.js').ConciseMatchImportsAnalyzerResult} ConciseMatchImportsAnalyzerResult
* @typedef {import('../../../types/index.js').MatchImportsConfig} MatchImportsConfig
* @typedef {import('../../../types/index.js').PathRelativeFromProjectRoot} PathRelativeFromProjectRoot
* @typedef {import('../../../types/index.js').PathFromSystemRoot} PathFromSystemRoot
* @typedef {import('../../../types/index.js').MatchImportsConfig} MatchImportsConfig
* @typedef {import('../../../types/index.js').AnalyzerName} AnalyzerName
* @typedef {import('../../../types/index.js').AnalyzerAst} AnalyzerAst
*/
function getMemberOverrides(
@ -276,13 +278,12 @@ async function matchSubclassesPostprocess(
// }
export default class MatchSubclassesAnalyzer extends Analyzer {
static get analyzerName() {
return 'match-subclasses';
}
/** @type {AnalyzerName} */
static analyzerName = 'match-subclasses';
static get requiresReference() {
return true;
}
static requiredAst = /** @type {AnalyzerAst} */ ('babel');
static requiresReference = true;
/**
* Based on ExportsAnalyzerResult of reference project(s) (for instance lion-based-ui)