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

feat(plugins/npm): exclude prelease versions when calculating monorepo project version #2035

Conversation

hydrosquall
Copy link
Contributor

@hydrosquall hydrosquall commented Jul 22, 2021

What Changed

  • Modified getMonorepoPackage to exclude all pre-release versions if there's at least 1 non pre-release version in the monorepo.

Why

  • Including these releases can lead canary or next releases to increment the project base version for a whole project, since the newly created packages will have canary / next assigned to the @latest tag on NPM.

Todo:

  • Add tests
  • Add docs

Change Type

Indicate the type of change your pull request is:

  • documentation
  • patch
  • minor
  • major

🐤 Download canary assets:

auto-linux--canary.2035.24576.gz
auto-macos--canary.2035.24576.gz
auto-win.exe--canary.2035.24576.gz

📦 Published PR as canary version: under canary scope @auto-canary@10.30.0--canary.2035.24576.0

✨ Test out this PR locally via:

npm install @auto-canary/bot-list@10.30.0--canary.2035.24576.0
npm install @auto-canary/auto@10.30.0--canary.2035.24576.0
npm install @auto-canary/core@10.30.0--canary.2035.24576.0
npm install @auto-canary/package-json-utils@10.30.0--canary.2035.24576.0
npm install @auto-canary/all-contributors@10.30.0--canary.2035.24576.0
npm install @auto-canary/brew@10.30.0--canary.2035.24576.0
npm install @auto-canary/chrome@10.30.0--canary.2035.24576.0
npm install @auto-canary/cocoapods@10.30.0--canary.2035.24576.0
npm install @auto-canary/conventional-commits@10.30.0--canary.2035.24576.0
npm install @auto-canary/crates@10.30.0--canary.2035.24576.0
npm install @auto-canary/docker@10.30.0--canary.2035.24576.0
npm install @auto-canary/exec@10.30.0--canary.2035.24576.0
npm install @auto-canary/first-time-contributor@10.30.0--canary.2035.24576.0
npm install @auto-canary/gem@10.30.0--canary.2035.24576.0
npm install @auto-canary/gh-pages@10.30.0--canary.2035.24576.0
npm install @auto-canary/git-tag@10.30.0--canary.2035.24576.0
npm install @auto-canary/gradle@10.30.0--canary.2035.24576.0
npm install @auto-canary/jira@10.30.0--canary.2035.24576.0
npm install @auto-canary/magic-zero@10.30.0--canary.2035.24576.0
npm install @auto-canary/maven@10.30.0--canary.2035.24576.0
npm install @auto-canary/microsoft-teams@10.30.0--canary.2035.24576.0
npm install @auto-canary/npm@10.30.0--canary.2035.24576.0
npm install @auto-canary/omit-commits@10.30.0--canary.2035.24576.0
npm install @auto-canary/omit-release-notes@10.30.0--canary.2035.24576.0
npm install @auto-canary/pr-body-labels@10.30.0--canary.2035.24576.0
npm install @auto-canary/released@10.30.0--canary.2035.24576.0
npm install @auto-canary/s3@10.30.0--canary.2035.24576.0
npm install @auto-canary/sbt@10.30.0--canary.2035.24576.0
npm install @auto-canary/slack@10.30.0--canary.2035.24576.0
npm install @auto-canary/twitter@10.30.0--canary.2035.24576.0
npm install @auto-canary/upload-assets@10.30.0--canary.2035.24576.0
npm install @auto-canary/vscode@10.30.0--canary.2035.24576.0
# or 
yarn add @auto-canary/bot-list@10.30.0--canary.2035.24576.0
yarn add @auto-canary/auto@10.30.0--canary.2035.24576.0
yarn add @auto-canary/core@10.30.0--canary.2035.24576.0
yarn add @auto-canary/package-json-utils@10.30.0--canary.2035.24576.0
yarn add @auto-canary/all-contributors@10.30.0--canary.2035.24576.0
yarn add @auto-canary/brew@10.30.0--canary.2035.24576.0
yarn add @auto-canary/chrome@10.30.0--canary.2035.24576.0
yarn add @auto-canary/cocoapods@10.30.0--canary.2035.24576.0
yarn add @auto-canary/conventional-commits@10.30.0--canary.2035.24576.0
yarn add @auto-canary/crates@10.30.0--canary.2035.24576.0
yarn add @auto-canary/docker@10.30.0--canary.2035.24576.0
yarn add @auto-canary/exec@10.30.0--canary.2035.24576.0
yarn add @auto-canary/first-time-contributor@10.30.0--canary.2035.24576.0
yarn add @auto-canary/gem@10.30.0--canary.2035.24576.0
yarn add @auto-canary/gh-pages@10.30.0--canary.2035.24576.0
yarn add @auto-canary/git-tag@10.30.0--canary.2035.24576.0
yarn add @auto-canary/gradle@10.30.0--canary.2035.24576.0
yarn add @auto-canary/jira@10.30.0--canary.2035.24576.0
yarn add @auto-canary/magic-zero@10.30.0--canary.2035.24576.0
yarn add @auto-canary/maven@10.30.0--canary.2035.24576.0
yarn add @auto-canary/microsoft-teams@10.30.0--canary.2035.24576.0
yarn add @auto-canary/npm@10.30.0--canary.2035.24576.0
yarn add @auto-canary/omit-commits@10.30.0--canary.2035.24576.0
yarn add @auto-canary/omit-release-notes@10.30.0--canary.2035.24576.0
yarn add @auto-canary/pr-body-labels@10.30.0--canary.2035.24576.0
yarn add @auto-canary/released@10.30.0--canary.2035.24576.0
yarn add @auto-canary/s3@10.30.0--canary.2035.24576.0
yarn add @auto-canary/sbt@10.30.0--canary.2035.24576.0
yarn add @auto-canary/slack@10.30.0--canary.2035.24576.0
yarn add @auto-canary/twitter@10.30.0--canary.2035.24576.0
yarn add @auto-canary/upload-assets@10.30.0--canary.2035.24576.0
yarn add @auto-canary/vscode@10.30.0--canary.2035.24576.0

@adierkens adierkens added the minor Increment the minor version when merged label Jul 22, 2021
@hydrosquall hydrosquall force-pushed the cameron.yick/skip-canary-and-next-branches-when-calculating-greatest-version branch from c563ee4 to bdc9179 Compare July 22, 2021 00:55
@codecov
Copy link

codecov bot commented Jul 22, 2021

Codecov Report

Merging #2035 (bdc9179) into main (3f1752f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2035      +/-   ##
==========================================
+ Coverage   80.23%   80.24%   +0.01%     
==========================================
  Files          66       66              
  Lines        5394     5397       +3     
  Branches     1249     1251       +2     
==========================================
+ Hits         4328     4331       +3     
  Misses        706      706              
  Partials      360      360              
Impacted Files Coverage Δ
plugins/npm/src/index.ts 73.13% <100.00%> (+0.14%) ⬆️

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 909ae8b...bdc9179. Read the comment docs.

@hipstersmoothie
Copy link
Collaborator

@hydrosquall canary published. version in the pr body!

@hipstersmoothie hipstersmoothie merged commit 2d0dc88 into intuit:main Jul 22, 2021
@adierkens
Copy link
Collaborator

🚀 PR was released in v10.30.0 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Jul 22, 2021
@hydrosquall hydrosquall deleted the cameron.yick/skip-canary-and-next-branches-when-calculating-greatest-version branch July 23, 2021 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants