benduran / lets-version

A package that reads your conventional commits and git history and recommends (or applies) a SemVer version bump for you
MIT License
1 stars 3 forks source link

Bduran/graph #22

Closed benduran closed 2 months ago

benduran commented 2 months ago

What?

This change the algorithm used for computing bumps that are applied to dependents when a parent changes. Instead of using the previous wonky method (which had a bug that would cause MAJOR bumps to not get properly applied to children), this uses the improved buildLocalDependencyGraph, which creates an actual graph of the user's monorepo deps, and walks the graph, apply bumps on the way down.

Additionally, if a user has a cycle in their monorepo deps (which can sometimes be the case), this library will no longer infinite loop, but rather, detect the cycle and throw an Error object when one is detected.

Also, this PR swaps the codebase over to TypeScript, as JSDoc + TypeScript typing only performance before was pretty terrible.