Open hazzo opened 12 months ago
If someone it's willing to try this without using my forked repo here its a .patch
file to apply with patch-package
Thank you so much! This is an often requested feature
It would be great to add tests, and I think the behaviour should be behind a config flag (otherwise it’s a breaking change).
Cool, I could add tests and make it a config flag. Maybe bumpIfChanges
and make it a boolean?
Sorry for the slow reply, I think bumpIfChanges
is a bit ambiguous - what about bumpOnlyWhenChangelog
or noBumpWhenEmptyChanges
or something, both defaulting to false?
Looks like some lint failed too. Should be easily fixed with a --fix
, sorry I don't have this automation set up.
This repo would greatly benefit from an updated ecma code version or even typescript, and updating dependencies.
Definitely.
Sorry for the slow reply, I think
bumpIfChanges
is a bit ambiguous - what aboutbumpOnlyWhenChangelog
ornoBumpWhenEmptyChanges
or something, both defaulting to false?
Perfect noBumpWhenEmptyChanges
works for me. I'll work on this PR this weekend (add tests and lint fixes also).
@TimothyJones added added config flag and linted files. I tried to add tests, but I'm struggling to make the test go through the whatBump
branch. My thought is that maybe conventionalRecommendedBump
it's being mocked and that's why it does not go through my custom whatBump
function. Could you point me into the right direction of how should I test this feature? I also don't get how git history it's mocked to get commits.
Merging #99 (e936987) into master (1912775) will decrease coverage by
1.49%
. Report is 5 commits behind head on master. The diff coverage is23.07%
.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@ Coverage Diff @@
## master #99 +/- ##
==========================================
- Coverage 97.57% 96.09% -1.49%
==========================================
Files 31 31
Lines 1280 1305 +25
==========================================
+ Hits 1249 1254 +5
- Misses 31 51 +20
Files | Coverage Δ | |
---|---|---|
command.js | 84.61% <ø> (ø) |
|
index.js | 100.00% <100.00%> (ø) |
|
lib/lifecycles/bump.js | 78.12% <20.00%> (-20.49%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
What is the status of this PR? Will it land?
Hi, are there any updates on this?
As above, I think it needs a little more work - if no one has done it by the next time I have a block of free time, I’ll look in to it.
This PR kind of solves #43 because removes completely the possibility from the package the ability of bumping file version and updating changelog if there are no commits that follow conventional commits.
Let me know if there is something I could add to explain what's the code doing. But what mainly is happening it's that I copied the
whatBump
function from the preset ofconventional-changelog-preset-loader
and tweaked to return an empty release if there are no breaking, feature or fixes in the commits since last release.This repo would greatly benefit from an updated ecma code version or even typescript, and updating dependencies.