Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto bump linked dependencies of monorepo #1035

Open
phucdph opened this issue Aug 29, 2023 · 5 comments
Open

Auto bump linked dependencies of monorepo #1035

phucdph opened this issue Aug 29, 2023 · 5 comments

Comments

@phucdph
Copy link

phucdph commented Aug 29, 2023

Greeting. Thanks for this amazing tool.

I used release-it on my mono repo project as an example below:
.
├── ...
├── packages
│ ├── package-a
│ ├── package-b

And package-b uses package-a internally.
Currently. When using release-it to the new version with @release-it-plugins/workspaces. All the packages will share the same version.

My question is: Is there any way these packages have a different version? Only bump when have any changes to it.
In the example above, this is how it works:

package-a on 0.2.0
package-b on 0.2.3

I made some changes to package-a, so will be bumped to 0.2.1, and package-b will automatically be bumped to 0.2.4. (like changesets)

Thanks for your help.

@webpro
Copy link
Collaborator

webpro commented Aug 29, 2023

Sounds like an issue for the https://github.com/release-it-plugins/workspaces repo, right? It's a separate project not maintained by me :)

@phucdph
Copy link
Author

phucdph commented Aug 29, 2023

Yes. It is definitely an issue of release-it-plugins/workspaces. But following the monorepo recipe (not using release-it-plugins/workspaces anymore). Is there any way to archive that release behavior? @webpro

@webpro
Copy link
Collaborator

webpro commented Aug 29, 2023

Yes, it's the default behavior when you use that recipe, it just runs the release-it process for each workspace separately

@phucdph
Copy link
Author

phucdph commented Aug 29, 2023

Yes, it's the default behavior when you use that recipe, it just runs the release-it process for each workspace separately

Hmm. I see the docs write "If all workspaces should be bumped to the same version and are published at the same time, then follow the two steps in this guide.". That means the behavior is not like I mentioned before. Am I missing something?

@webpro
Copy link
Collaborator

webpro commented Aug 30, 2023

It depends. The release-it process runs for each package separately, so you can version them independently. Indeed the main thing for you here, "auto bump linked dependencies" would need to be resolved differently. So it's not something you can just copy as-is indeed.

Perhaps you could defer the npm publish step to Changesets? I think it does this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants