DEV Community


Lerna Graph

Tally Barak
Coding is a craft and art. 30 years of learning software tools and practices. Making the life of the development team simple, efficient, and fun.
・1 min read

If you are using Lerna or have a monorepo that is compliant with Lerna structure - this is a Github Action you would love.

The action generates a graph for all the Lerna packages in the repo and their current version.

Alt Text

Even if you do not use Lerna, you can simply add a lerna.json file with minimal configuration (packages, version) and the action will work!

You can find this action in the marketplace

Submission Category:

Maintainer Must-Haves

Yaml File or Link to Code

GitHub logo Tallyb / lerna-graph-action

Github action to generate a lerna graph

Lerna Graph Action

This action generates a graph of all Lerna packages in their current version:

Lerna Graph


See parametes in action.yml

Persist the graph on Github artifacts to view them later

- uses: actions/checkout@v2

- run: mkdir -p graph

- name: Lerna Graph
- uses: lerdajs/lerna-graph-action
    rootPath: .
    path: graph/image.png

- uses: actions/upload-artifact@v2
    name: lerna graph
    path: graph/image.png


Do I need to use Lerna for this action?

This action can work with any repository that is compliant with Lerna structure (i.e. multiple package.json files). You do not have to use Lerna to install or publish the packages. The only requirement is have a lerna.json file that marks your packages folders.

Additional Resources / Info

You cannot go more meta than this: Lerna project graph generated by this action

Discussion (0)