codeanalyzer-typescript v1.2.0 #54
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.2.0
A Neo4j-focused release: the graph projection gains decorators and declaration source text, stops interfering with sibling analyzers' graphs, and actually diffs on incremental pushes. Dataflow is now correct on multi-tsconfig repositories.
This release carries breaking changes even though the version bump is minor. If you depend on
^1.1.0you will pick them up automatically, so please read the first section.1. JavaScript files now have
can://javascript/...ids (#115).js,.jsx,.mjsand.cjsmodules — and everything nested inside them — move from thetypescriptnamespace tojavascript. TypeScript files, including.d.ts, are unchanged, and the:Applicationanchor staystypescript.Migration: re-run the analyzer and re-read ids. Anything that stored or pinned a
can://id for a JavaScript file must be refreshed. If you join analyzer output to your own tables on id, those rows need remapping.2.
schema_versionreports2.0.0, not2.1.0(#144)Intermediate 2.x versions were not meaningful while the schema design is still settling, so both the JSON envelope and the Neo4j contract collapse back to a single version. Every analyzer will re-baseline together later.
Migration: update any pin or assertion on
"2.1.0". For Neo4j, nothing to do by hand — a database written by a 2.1.0 build is detected as a version mismatch and repopulated by one full upsert on the next push.3. Full Neo4j graph purge now requires
--eager(#117)Previous versions ran a destructive wipe on every push that was not scoped to this analyzer — it could delete graph nodes written by codeanalyzer-python and codeanalyzer-java in a shared database. Deletion is now scoped two ways at once: to
:CanNode(nodes this analyzer wrote) and to the application's owncan://id prefix (so a second application in the same database survives). A full purge-and-repopulate happens only when you ask for it.Migration: if you relied on each push starting from a clean graph, add
--eager. Otherwise pushes now update changed nodes in place and leave the rest alone.Highlights
Decorators reach the graph (#143) — decorators were always captured in
analysis.jsonbut never projected, so@Controllerwas visible in JSON and absent from Neo4j. There is now a:TSDecoratornode and aTS_DECORATED_BYrelationship, matching codeanalyzer-python. The node is shared and merged on the resolved name, so@Get('/')and@Get('/:id')are one node; the arguments are per-application and ride on the relationship. Projected for classes, callables and fields, so Angular@Input, TypeORM@Columnand NestJS route decorators all land.Declaration source text on graph nodes (#139) — declarations now carry a
codeproperty holding their own source text, matching what python and java already emit. You can read a function's body straight off the node instead of slicing the module source by span yourself.Incremental Neo4j pushes actually diff now (#138) — modules were not carrying
content_hashinto the graph, so the incremental path had nothing to compare and could not tell changed modules from unchanged ones. Repeated pushes against a live database are now genuinely incremental.Dataflow is correct on multi-tsconfig repositories (#137) — extraction indexed the whole repository against the root program alone, which silently skipped every callable owned by a deeper
tsconfig.json. Each callable is now resolved under the tsconfig that governs it. If your repo has nested tsconfigs, expect materially more dataflow coverage than 1.1.0 gave you.Artifact text is captured whole (#117) — captured artifact text is no longer truncated, and it now reaches the Neo4j projection as well as the JSON.
sha256andsize_byteswere always full-file values and remain so.Performance
Both measured on the vscode repository at full analysis depth:
Upgrade
Links
All reactions