question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is Lerna pushing packages to different repositories?

See original GitHub issue

Sorry for the newbie question, but it seems I can’t find the answer to this question. I have a monorepo with Yarn workspaces and Lerna

/lerna.json
/package.json (with a github repo)
/packages/A
/packages/A/package.json (with a github repo)
/packages/B
/packages/B/package.json (with a github repo)
/packages/C
/packages/C/package.json (with a github repo)
/site
/site/package.json (with a github repo)

Then, my beliefs are that with Lerna I can develop the site and packages all together with ease, which is done with Yarn workspaces, and then npm-publish packages A, B and C and site separately. I have been able to do this, but, here is what I don’t understand:

Before publishing to npm, I expected Lerna to push the changes to each github repository, and to do it without publishing with lerna version.

But I cannot get this done. Then, is this supposed to work? can I git push changes of all packages to their respective repositories? Or this is precisely what is not being done in a monorepo?

If I want this, do I need to implement subtrees or something similar?

Cheers,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kuworkingcommented, Nov 10, 2019
0reactions
TrejGuncommented, Nov 10, 2019

@kuworking thanks, i dont need this now but will keep in mind

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version and Publish - Lerna
Lerna can increment your package's versions as well as publish your packages ... Note the above operation does not push the package to...
Read more >
Moving from multiple repositories to a lerna-js mono-repo
Going “monorepo” today usually means turning a repository into a multi-package repository from which multiple packages can be published. This repository is part ......
Read more >
Monorepo using Lerna, Conventional commits, and Github ...
Automate the package versioning and publication workflow when pushing new code to the repository using Github actions. Publish different types ...
Read more >
Moving from multiple repositories to a lerna-js mono-repo
Once a new version is selected, Lerna changes the versions of the packages, creates a tag in the remote repo, and pushes the...
Read more >
JavaScript Monorepos with Lerna - Semaphore CI
Publishing a package is a two-step process. First, Lerna pushes all the changes to the remote repository and creates a Git tag. Then,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found