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

Implement --release --no-bump options #130

Open
1 task
helltraitor opened this issue Jul 24, 2023 · 6 comments
Open
1 task

Implement --release --no-bump options #130

helltraitor opened this issue Jul 24, 2023 · 6 comments

Comments

@helltraitor
Copy link

Describe the feature

It can be very useful in case when external utility controls semver or when version is hardcoded and can't be changed in one place.
The best example, I think is nuxt modules. They provides release cli command which is using changelogen --release command, but doesn't bump version in module.ts - and that is important and very degrades dx.

As for me, I want to have ability to preform actions based on package state and don't modify the state itself.

Additional information

  • Would you be willing to help implement this feature?
@pi0
Copy link
Member

pi0 commented Jul 24, 2023

Hi dear @helltraitor, as for Nuxt modules, you should directly import name and version from package.json inside module meta and use prepublish hook to build right after bump and before npm publish


As a general feature, it makes sense. Are you suggesting to introduce a shortcut flag that combines release:true + bump: false ?

@helltraitor
Copy link
Author

Hi dear @helltraitor, as for Nuxt modules, you should directly import name and version from package.json inside module meta and use prepublish hook to build right after bump and before npm publish

This is the first time I see this hint, I will try, thanks

As a general feature, it makes sense. Are you suggesting to introduce a shortcut flag that combines release:true + bump: false ?

Yes

@pi0
Copy link
Member

pi0 commented Jul 24, 2023

What would you call it? --release-only?

@helltraitor
Copy link
Author

What would you call it? --release-only?

That is good name. I just thought a little and notice one thing:
As a programmer I don't expect to bump version on release so it's quite nice to have --release (new --release-only) and --release-new \ --release-bump (old --release).

But this would be breaking change so, it's not an option (if you agree with me, you can consider about adding this in new major release)

@pi0
Copy link
Member

pi0 commented Jul 24, 2023

It might make sense to use changelogen in an external setup that bumps version itself but as main tasks of this package, it is making changelog and versioning based on one semver interpretation. It also fits for initial usecases i made the tool (unjs packages and nuxt modules that bump and bundle right before publish).

Still if you think it would be useful, i think we can introduce a shortcut version or improve docs...

@reslear

This comment was marked as off-topic.

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

No branches or pull requests

3 participants