Minor Changes
-
30fe86c:
providence-analyticsnow ships TypeScript declarations, so the concepts and output structures
of the package are typed instead ofany.Every public entrypoint carries types:
entrypoint types providence-analyticsthe services: providence,QueryService,LogService,InputDataService,AstService,ReportServiceprovidence-analytics/types.jsthe model types: AnalyzerQueryResult,QueryOutput,FindAnalyzerOutputFile,PathFromSystemRoot,GatherFilesConfig,AnalyzerName, ...providence-analytics/cli.jsthe CLI module providence-analytics/utils.jsthe program utilities providence-analytics/analyzers.jsthe analyzers The declarations are emitted from the sources and the hand-written
types/tree, and a consumer
that compiles them directly withskipLibCheck: falsegets 0 errors - the same bar the
@lion/uideclarations are held to.Two declaration defects surfaced on the way and are fixed at the source rather than suppressed:
QueryResultis now generic over itsqueryOutput(which is what the match analyzers actually
return, soAnalyzerQueryResultno longer has to override an incompatible base member), and
MemoizedFnis declared as a callable type instead of the invalidfunctionkeyword, which the
emittedmemoize.d.tsused to carry into every consumer.Runtime behaviour is unchanged: 240 unit tests and 8 e2e tests pass as before.
The CLI no longer depends on
commander. Its flags are parsed with theparseArgshelper of
node:util, which is what the package's owncomments.dependenciesalready called for. Flag
names, short aliases, optional values, coercions and defaults are unchanged - including the
collection flags that resolve againstprovidence.conf.js- and--version/--helpstill work.
commanderleaves the dependency tree.