intuit / auto

Generate releases based on semantic version labels on pull requests.
https://intuit.github.io/auto/
MIT License
2.26k stars 204 forks source link

Does Auto work with other (non-Lerna) monorepo tools? #1698

Open alexkreidler opened 3 years ago

alexkreidler commented 3 years ago

I've used Rush and Nx, which are alternative tools for managing monorepos, in the past. They can be configured to simply use a packages/ folder just like lerna.

Would Auto work with these tools? If not, which specific lerna features does Auto require? For example: reading lerna.json, running a lerna command like lerna changed, etc.

It would be great to be able to use auto with these other tools. These questions would help me figure out how complex it would be to add on support for them.

hipstersmoothie commented 3 years ago

Right now auto heavily depends on a few lerna commands:

The best course of action for enabling auto to work with those other tools would probably just be to create separate plugins for each monorepo tool. We could try to roll it all into the npm plugin but it's become quite large. I've also wanted to split the lerna functionality into it's own plugin but haven't had the time.

I would be happy to work with you to create plugins for each of these tools.

Read this guide on creating publishing plugins. I suspect it wouldn't be all to hard to create plugins with a focus on these tools.

hipstersmoothie commented 3 years ago

I'd also be open to pairing to get these built. I don't have much experience using these tools and domain knowledge helps a lot.

julrich commented 3 years ago

Is this still something you're interested in @hipstersmoothie?

And if you've solved this @alexkreidler , how did you do it?

hipstersmoothie commented 3 years ago

What tool are you looking at making a plugin for?

julrich commented 3 years ago

Sorry, could / should have mentioned that :) We're interested in integrating with Rush!

johnameyer commented 3 years ago

I'm interested in making a plugin for Yarn 2 workspaces and atlassian/changesets, but could use some help with understanding how the getPreviousVersion works for a monorepo (seems like NPM just joins with a newline, but I don't see any clarification in the docs) and creating the main body for the changelogs.

allbetter-max commented 1 year ago

Cross linking to a discussion on the subject https://github.com/intuit/auto/discussions/2281

c-od-y commented 6 months ago

Is this something that is still on the cards with moving away from primarily lerna based commands to allow flexibility with other tools such as turborepo?

hipstersmoothie commented 4 months ago

You can use both of those tools together pretty easily (minus change sets)

You can think of lerna as a peer dep. You yourself don't have to do anything other than add a lerna.json. After that you can completely ignore you're using lerna at all. It's used mainly for the complicated process of managing complex version bumps

I wrote this awhile back explaining the different responsibilities of these tools

https://www.hipstersmoothie.com/blog/posts/javascript-monorepo-tooling

Since these tools do different things it's pretty easy to mix (not sure about rush though as they do everything)

CleanShot 2024-06-19 at 12 27 22