-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Confusion with lerna updated
and package update detection
#1269
Comments
Looking around further it sounds like this issue is similar to #1241 in parts. Also we might have a workaround for our specific situation where we set a tag on each merge/update in master so that comparisons for updates will always run against that tag. |
I would suggest not publishing tagged releases in feature branches. I guess that horse has left the barn already, however. If feature branches necessitate publishing, you could always
Sounds like you shouldn't be using lerna, then? |
Hey, thanks for the response :) Indeed the horse has at least partially left the barn. But if I'm understanding you correctly your suggestion is to not bump tags in the branches that work on them but to bump only on The nice thing with tagging on dedicated branches but publishing to a registry only in master is that we can review version changes as well and no additional step for package bumping is necessary where a single person would need to know details about several package changes. So far we've managed to create a workaround which uses a tag that follows current master. Coming from that I'd say we currently have a better understanding of the desired workflows with lerna than before and can work with our setup as is. Side note 1: Side note 2: |
Closing per #1269 (comment); this use case doesn't really fit the scope of this project. |
Fixes #175 (hopefully) Updates to a devDependency for a package causes `lerna publish` to republish that package. This has a knock on effect throughout our repo meaning a single change to one component can result in every component being republished. We don't want this to happen so are including most devDependencies at the project root (where we expect these dependencies are only used when using the package as part of a monorepo). Exceptions are where a component has specific peerDependencies and we want to also represent that in the devDependencies. Related: lerna/lerna#1269 lerna/lerna#1345 import-js/eslint-plugin-import#935
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When working on one branch using lerna in independent mode, it appears to happen that unchanged packages are listed by
lerna updated
.Expected Behavior
Only packages that actually have changed should be listed by
lerna updated
Current Behavior
It appears that the getLatestTag function, which uses
git describe
finds one of the tags that are an ancestor commit to the currently checked out commit. But there may be more than one.Specifically in my situation I have a commit structure like this:
git describe --tags
describes theteamshirts.util…
tag as being the latest, but theeslint-config…
one has a more recent date. This leads lerna into asking us to update oureslint
package even though it hasn't changed since.Possible Solution
git describe
picks the closest or most recent tag - when comparing to the commit that is not picked bygit describe
using the same command diffSinceIn uses no changes appear to have happened.master
branch in the commit structure has two tags that are interesting candidates to compare against. Independent of the choicegit describe
has it looks to me as if lerna would need to consider both paths/tags to asses changes here.Steps to Reproduce
master
creating separate merge commits.lerna.json
Context
Your Environment
lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: