-
-
Notifications
You must be signed in to change notification settings - Fork 301
fix: fix multiple versions bumps when version changes the string size #374
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
fix: fix multiple versions bumps when version changes the string size #374
Conversation
Codecov Report
@@ Coverage Diff @@ ## master #374 +/- ## ========================================= Coverage ? 97.60% ========================================= Files ? 39 Lines ? 1378 Branches ? 0 ========================================= Hits ? 1345 Misses ? 33 Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Looks good to me, feel free to merge @Lee-W
This one is interesting. 🤔 Didn't notice this might happen. Thanks, @jaysonsantos 👍👍👍
Uh oh!
There was an error while loading. Please reload this page.
Description
As I've commented here the bug fix that fixes my bug also introduces a new one.
If you have a file that has many
version = 1.0.9
and you bump to1.1.10
every time you bump the version, the file increases 1 byte, andre.findall
keeps a reference to the old string making every iteration point to a character back like (version, versio, versi, vers, and etc) to the point where it would move to previous likes and the check that makes sure that the current version is found on the current line fails.Checklist
./script/format
and./script/test
locally to ensure this change passes linter check and testExpected behavior
All versions should be bumped no matter the size of the file and occurrences of a regex
Steps to Test This Pull Request
1 - Have a file with at least 8
version = 1.0.9
lines2 - Bump version to
1.1.10
usingfile:version
as the regexAdditional context
#372
#361