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

correct behavior for lerna project with private packages #1472

Merged
merged 2 commits into from
Aug 14, 2020

Conversation

hipstersmoothie
Copy link
Collaborator

@hipstersmoothie hipstersmoothie commented Aug 14, 2020

What Changed

Previously that npm plugin would exit early if lerna changed returned no changes. This didn't take into account private packages. Now we use the -a flag to get those package changes too.

Behavior:

  • canary: No canaries will be published for private packages. This wouldn't make much sense
  • next: A next version will be tagged and released for a private package
  • latest: private package will be versioned and tagged but not published.

Why

There was a hole in the previous implementation where if the only package that changed was a private one a release would not happen.

closes #1463

Todo:

  • Add tests
📦 Published PR as canary version: under canary scope @auto-canary@9.50.8-canary.1472.18237.0

✨ Test out this PR locally via:

npm install @auto-canary/bot-list@9.50.8-canary.1472.18237.0
npm install @auto-canary/auto@9.50.8-canary.1472.18237.0
npm install @auto-canary/core@9.50.8-canary.1472.18237.0
npm install @auto-canary/all-contributors@9.50.8-canary.1472.18237.0
npm install @auto-canary/brew@9.50.8-canary.1472.18237.0
npm install @auto-canary/chrome@9.50.8-canary.1472.18237.0
npm install @auto-canary/cocoapods@9.50.8-canary.1472.18237.0
npm install @auto-canary/conventional-commits@9.50.8-canary.1472.18237.0
npm install @auto-canary/crates@9.50.8-canary.1472.18237.0
npm install @auto-canary/exec@9.50.8-canary.1472.18237.0
npm install @auto-canary/first-time-contributor@9.50.8-canary.1472.18237.0
npm install @auto-canary/gem@9.50.8-canary.1472.18237.0
npm install @auto-canary/gh-pages@9.50.8-canary.1472.18237.0
npm install @auto-canary/git-tag@9.50.8-canary.1472.18237.0
npm install @auto-canary/gradle@9.50.8-canary.1472.18237.0
npm install @auto-canary/jira@9.50.8-canary.1472.18237.0
npm install @auto-canary/maven@9.50.8-canary.1472.18237.0
npm install @auto-canary/npm@9.50.8-canary.1472.18237.0
npm install @auto-canary/omit-commits@9.50.8-canary.1472.18237.0
npm install @auto-canary/omit-release-notes@9.50.8-canary.1472.18237.0
npm install @auto-canary/released@9.50.8-canary.1472.18237.0
npm install @auto-canary/s3@9.50.8-canary.1472.18237.0
npm install @auto-canary/slack@9.50.8-canary.1472.18237.0
npm install @auto-canary/twitter@9.50.8-canary.1472.18237.0
npm install @auto-canary/upload-assets@9.50.8-canary.1472.18237.0
# or 
yarn add @auto-canary/bot-list@9.50.8-canary.1472.18237.0
yarn add @auto-canary/auto@9.50.8-canary.1472.18237.0
yarn add @auto-canary/core@9.50.8-canary.1472.18237.0
yarn add @auto-canary/all-contributors@9.50.8-canary.1472.18237.0
yarn add @auto-canary/brew@9.50.8-canary.1472.18237.0
yarn add @auto-canary/chrome@9.50.8-canary.1472.18237.0
yarn add @auto-canary/cocoapods@9.50.8-canary.1472.18237.0
yarn add @auto-canary/conventional-commits@9.50.8-canary.1472.18237.0
yarn add @auto-canary/crates@9.50.8-canary.1472.18237.0
yarn add @auto-canary/exec@9.50.8-canary.1472.18237.0
yarn add @auto-canary/first-time-contributor@9.50.8-canary.1472.18237.0
yarn add @auto-canary/gem@9.50.8-canary.1472.18237.0
yarn add @auto-canary/gh-pages@9.50.8-canary.1472.18237.0
yarn add @auto-canary/git-tag@9.50.8-canary.1472.18237.0
yarn add @auto-canary/gradle@9.50.8-canary.1472.18237.0
yarn add @auto-canary/jira@9.50.8-canary.1472.18237.0
yarn add @auto-canary/maven@9.50.8-canary.1472.18237.0
yarn add @auto-canary/npm@9.50.8-canary.1472.18237.0
yarn add @auto-canary/omit-commits@9.50.8-canary.1472.18237.0
yarn add @auto-canary/omit-release-notes@9.50.8-canary.1472.18237.0
yarn add @auto-canary/released@9.50.8-canary.1472.18237.0
yarn add @auto-canary/s3@9.50.8-canary.1472.18237.0
yarn add @auto-canary/slack@9.50.8-canary.1472.18237.0
yarn add @auto-canary/twitter@9.50.8-canary.1472.18237.0
yarn add @auto-canary/upload-assets@9.50.8-canary.1472.18237.0

@hipstersmoothie hipstersmoothie added the patch Increment the patch version when merged label Aug 14, 2020
@codecov
Copy link

codecov bot commented Aug 14, 2020

Codecov Report

Merging #1472 into master will increase coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1472   +/-   ##
=======================================
  Coverage   81.07%   81.07%           
=======================================
  Files          58       58           
  Lines        4317     4318    +1     
  Branches      961      961           
=======================================
+ Hits         3500     3501    +1     
  Misses        571      571           
  Partials      246      246           
Impacted Files Coverage Δ
packages/core/src/utils/get-lerna-packages.ts 33.33% <0.00%> (ø)
plugins/npm/src/index.ts 75.97% <50.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af5efa9...834b557. Read the comment docs.

@hipstersmoothie hipstersmoothie merged commit 3955e61 into master Aug 14, 2020
@hipstersmoothie hipstersmoothie deleted the lerna-prviate branch August 14, 2020 17:54
@adierkens
Copy link
Collaborator

🚀 PR was released in v9.50.8 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lerna independent with only 'git-tag' and 'released' plugins doesn't create independent releases
2 participants