Skip to content

Third Prerelease - Import-Graphs and Modules

Choose a tag to compare

@finnmglas finnmglas released this 09 Aug 20:59
· 115 commits to main since this release

Now we create import-graphs and analyze them into modules and resolvable module loops. Quite cool!

✨ Opus 5 Summary

A new Modules tab

  • every import in the repo, resolved to the file it names, then folded into groups you can read
  • auto picks the folders by weight, so no group holds a tenth of the repo and none is a single file
  • fixed depths are still there: top folder, folder, subfolder, file
  • a group's level is how far its own dependencies reach, so folder nesting cannot fake it
  • inside against outside per group: what never leaves it, what does, what arrives, what it installs
  • each group reads as Module, Sprawl or Entrypoint from that balance alone

Loops, and what opens them

  • groups that import each other, with the imports whose removal provably leaves nothing looping
  • each one says whether it is type only, which the compiler erases, or real work
  • and whether it breaks the loop on its own, checked against the graph rather than claimed

Every dependency at once

  • one grid instead of a hairball, ordered bottom of the stack first, sortable and searchable
  • drawn on a canvas, so it stays quick where a thousand table cells would not

The graph itself

  • path aliases, extends, workspace packages, index files and the esm .js to .ts rewrite
  • bundled output and declaration files left out, comments and strings cannot fake an import
  • 100% of imports resolved on every repo tested, and whatever cannot be is reported with a reason
  • downloadable as json, next to a new one for the git log and its metadata

Smaller things

  • files are named 20260809--, and the browser tab carries the repo name
  • a focus display mode keeps logos and language colours without the shouting
  • tab bars scroll on a phone instead of overflowing
  • the files panel splits code, comments and blank lines, and shading follows whichever you pick

https://www.npmjs.com/package/desprawl