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(publish): add --summary-file option #2653

Merged
merged 15 commits into from Dec 13, 2022

Conversation

HamishBuckmaster
Copy link
Contributor

@HamishBuckmaster HamishBuckmaster commented Jul 7, 2020

Outputs the packages and versions from publishing to a JSON file.

Description

When lerna publish --summary-file <path-to-file> It'll create a file to easily see what's been published and what version has been.
Happy to rename --summary-file to something more meaningful

[
    {
        "packageName": "package1",
        "version": "v1.0.1-alpha"
    },
    {
        "packageName": "package2",
        "version": "v2.0.1-alpha"
    }
]

Motivation and Context

When creating a release you don't get a definitive and easy way to see whats changed in a nice output especially if its a pre-release(canary), So added the ability to output a JSON object to a file which would look something like this.
#2053

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@HamishBuckmaster HamishBuckmaster changed the title Create an output file of the packageName and Version in JSON feat(publish): Create a summary file of the packageName and Version in JSON Jul 7, 2020
@mariusGundersen
Copy link

This would be really useful in CI where it could be used for checking what will happen when a pull-request is merged

@HamishBuckmaster
Copy link
Contributor Author

Hey @evocateur,

Is there anything else that needs to be done here? 😄

@evocateur evocateur changed the base branch from master to main November 8, 2020 00:40
@g5bot
Copy link

g5bot commented Jan 21, 2021

@HamishBuckmaster there are tests failing, see travis-ci

@HamishBuckmaster
Copy link
Contributor Author

@HamishBuckmaster there are tests failing, see travis-ci

It's passing now, @g5bot. 😋
@evocateur what are the next steps to get this merged now?

@carl0s-sa
Copy link

Eager for this feature, any plans on merging?

@isachivka
Copy link

Merge it please

Outputs the packages and versions from publishing to a JSON file.
@HamishBuckmaster
Copy link
Contributor Author

HamishBuckmaster commented May 25, 2021

Hi @evocateur / @gigabo,

All these tests are passing on local, can you provide any advice as to why they are failing?

@zepang
Copy link

zepang commented Aug 26, 2021

When will this feature be supported ?

@marcus13371337
Copy link

I would also have good use for this functionality!

@eddysims
Copy link

I also have good use for this!

@HamishBuckmaster HamishBuckmaster marked this pull request as draft September 30, 2021 10:37
@HamishBuckmaster HamishBuckmaster marked this pull request as ready for review September 30, 2021 10:37
@mnahkies
Copy link

I'd love to see this merged. My use case is that I'd like my CI pipeline to add a comment to the originating pull request with the relevant versions / yarn add commands, so that we can grab them from github rather than digging into the CI logs.

It's a minor inconvenience to have to drop into the CI logs, but still inconvenient.

I could probably capture the existing raw output and parse/dump that onto a comment, but a JSON file would be a lot cleaner to process.

@asafkorem
Copy link

I'd be happy to have this feature as well! 🙂

@HamishBuckmaster
Copy link
Contributor Author

@JamesHenry / @vsavkin are you happy with the above approach, would like to get this merged once and for all 👍

Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @HamishBuckmaster I can see that this would be a useful feature!

Please kindly check out the comments I left inline, and also please update the lerna-schema.json to include this new option

commands/publish/README.md Outdated Show resolved Hide resolved
commands/publish/README.md Outdated Show resolved Hide resolved
commands/publish/README.md Outdated Show resolved Hide resolved
commands/publish/command.js Outdated Show resolved Hide resolved
commands/publish/index.js Outdated Show resolved Hide resolved
commands/publish/index.js Outdated Show resolved Hide resolved
@JamesHenry JamesHenry changed the title feat(publish): Create a summary file of the packageName and Version in JSON feat(publish): add --summary-file option Nov 8, 2022
Co-authored-by: James Henry <james@henry.sc>
@JamesHenry
Copy link
Member

Hi @HamishBuckmaster do you have time to continue working on this?

@HamishBuckmaster
Copy link
Contributor Author

Hi @HamishBuckmaster do you have time to continue working on this?

Yes! @JamesHenry, will have a look when I get a chance

commands/publish/README.md Outdated Show resolved Hide resolved
commands/publish/README.md Outdated Show resolved Hide resolved
commands/publish/__tests__/publish-command.test.js Outdated Show resolved Hide resolved
commands/publish/__tests__/publish-command.test.js Outdated Show resolved Hide resolved
@JamesHenry
Copy link
Member

@HamishBuckmaster I think we are just down to a formatting issue now

@JamesHenry JamesHenry merged commit 027d943 into lerna:main Dec 13, 2022
@JamesHenry
Copy link
Member

Thanks so much again for your patience and work on this @HamishBuckmaster!

@HamishBuckmaster
Copy link
Contributor Author

Thanks so much again for your patience and work on this @HamishBuckmaster!

Thanks for your patience @JamesHenry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet