codeanalyzer-typescript v1.4.0 #64
rahlk
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
codeanalyzer-typescript v1.4.0
One theme: the Neo4j graph now carries everything
analysis.jsonalready knew about imports, exports, parameters and unresolved config reads. Three python-sdk accessors that refused on a TypeScript graph —get_imports,get_exports,get_method_parameters— can answer, andget_config_readersgets its unresolved counterpart. No breaking changes; the Neo4j contract stays2.0.0(every addition is optional-with-absent, so a 1.3.0 graph differs only by missing rows).Highlights
Import and export bindings in the graph (#183, closes #182)
TS_IMPORTS— one relationship per (importing module, target), every binding of that pair folded intospellings[],imported_names[],aliases[]and the TypeScript-onlytype_only_names[], so a runtime dependency graph can dropimport typeedges in one predicate. A resolved specifier lands on the real:TSModule; an external one on the same@external/<package root>ghostTS_PROVIDES/TS_UNRESOLVED_IMPORTalready address (builtins under their own spelling,@external/node:fs). Python's aggregation rule and vocabulary.TS_RE_EXPORTS— the same shape forexport … from, so barrel chains (index.tsre-exporting a tree) are walkable in Cypher.exports_jsonon:TSModuleis the verbatim export list, includingexport { x as y }locals that are no edge.resolved_moduleon every import and re-export inanalysis.json: the compiler's own answer (ts.resolveModuleName— tsconfigpaths, directoryindex,.js→.ts), absent for externals and builtins. It is re-stamped every run, cached modules included, because the tsconfig and which files exist are state the content-hash cache cannot see.parameters_jsonon:TSCallable— the parameter list verbatim (name,@formal_in:Nid, type, default, optional/rest/readonly, accessibility, decorators, span), python's encoding, absent when empty. Measured at 1.4 % ofgraph.cypheron this repository. The SDK's TypeScript reconstruct already decodes it.TS_READS_CONFIG_UNRESOLVED—:TSApplication → :TSExternal | :TSCallable, mirroring python'sPY_READS_CONFIG_UNRESOLVED: a recognized config read that closed on no declared key, withkey,reason(non-literal|undefined-key),prov[], keyedkey|reason. Several sites collapse onto one edge (python's documented ceiling), so the graph count is a floor on the JSON list's. This release corrects the earlier claim that TypeScript emittedDEFINES_CONFIGalone —TS_USES_CONFIGwas already there; only this counterpart was missing.Also:
export { type X }per-specifier type-only flags are now honoured inexports[](they were dropped before).Consumer queries for all of the above are in the shipped skill
analyzing-cants-graphs(§1 structure, §7 config bridge). Design record:docs/design/specs/neo4j-bindings-parameters-config.md.Known ceiling
The incremental Bolt push writes a module's edges only when that module changed. A binding edge's presence depends on the target existing, so an edge that flips absent → present while the importer is byte-identical (a target file added, a shard widened) waits for the importer to change or for
--eager. Same class asTS_CALLS; removal is handled.Upgrade
A warm
.codeanalyzercache from 1.3.0 is invalidated automatically.Links
All reactions