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

lerna publish --independent triggering publish also for packages that haven't changed #1434

Closed
marcofugaro opened this issue May 23, 2018 · 15 comments

Comments

@marcofugaro
Copy link

marcofugaro commented May 23, 2018

When I run lerna publish --independent, lerna is asking me to publish also the packages that I haven't touched, and there is no way for me to skip the publishing of those.

From the readme:

Each time you publish, you will get a prompt for each package that has changed to specify if it's a patch, minor, major or custom change.

Expected Behavior

It should prompt me to publish only the packages that have changed.

Current Behavior

It prompts the publish for every package.

Steps to Reproduce (for bugs)

This is the repo where this happens

lerna.json

{
  "lerna": "2.1.2",
  "version": "independent",
  "npmClient": "yarn",
  "useWorkspaces": true
}

Your Environment

Executable Version
lerna --version 2.1.2
npm --version 6.0.1
yarn --version 1.6.0
node --version 10.1.0
OS Version
macOS High Sierra 10.13.4
@doug-wade
Copy link
Contributor

Do they depend on a package which has changed?

@marcofugaro
Copy link
Author

Nope, I didn't touch the dependencies either

@evocateur
Copy link
Member

What does lerna diff report?

@marcofugaro
Copy link
Author

marcofugaro commented May 24, 2018

@evocateur right now only this

screen shot 2018-05-24 at 11 06 57

after I committed some changes to the package accurapp-scripts, the lerna diff is showing me the changed lines only of the files inside accurapp-scripts I changed, and nothing else.

image 1

I tried to publish again after this, and it still prompts for every other package also.

@evocateur
Copy link
Member

evocateur commented May 24, 2018 via email

@marcofugaro
Copy link
Author

Except they don't, take for example the package eslint-config-accurapp, these are its dependencies:

screen shot 2018-05-25 at 10 38 22

None of its dependencies is another package.

And this is lerna asking me to publish it, even if it isn't in the lerna diff:

screen shot 2018-05-25 at 10 36 35

@evocateur
Copy link
Member

All I can think of is that your tags are missing, somehow, and lerna thinks it has to publish everything. Might be because you last published on a branch that was then merged into master, which corrupts the tag references.

@marcofugaro
Copy link
Author

Hmm interesting, might be, how can I try to fix it? By removing the tags?

@evocateur
Copy link
Member

evocateur commented May 25, 2018 via email

@marcofugaro
Copy link
Author

@evocateur Thank you! I will check the tags.

Does lerna need EVERY past publish tags to be changed, or just the latest ones? Because the latest ones are already present in the same branch I'm publishing from (not master)

@evocateur
Copy link
Member

evocateur commented May 29, 2018 via email

@marcofugaro
Copy link
Author

Alright man, I checked the tags using this script and turns out the latest tags are actually annotated. Also I made sure they're on the same branch I am in.

screen shot 2018-05-30 at 12 02 56

I went ahead and made a diff for the latest tag and the current HEAD, only for one package, like this:

git diff eslint-config-accurapp@4.1.0-beta.2..HEAD packages/eslint-config-accurapp/

And it outputs nothing because nothing has actually changed.

I don't know what else to do man, I provided you with the repo where this happens and the specific branch, if you wish to debug. Thanks for your help!

@kevinbarabash
Copy link

Is this not a duplicate of #1357?

@marcofugaro
Copy link
Author

Yup, I think so

@lock
Copy link

lock bot commented Dec 27, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants