chore: corrected currency update logic to prevent mixing major and minor update#2464
chore: corrected currency update logic to prevent mixing major and minor update#2464aryamohanan merged 10 commits intomainfrom
Conversation
af005e8 to
7cfae62
Compare
3b3e1b5 to
02a7fc4
Compare
|
test results: case 1: Case 1: Case 2: |
|
|
|
||
| console.log(`Latest version: ${latestVersion}`); | ||
| console.log(`Installed version: ${installedVersion}`); | ||
| const isMajorUpdate = semver.major(latestVersion) !== semver.major(installedVersion); |
There was a problem hiding this comment.
This condition was wrong earier
| if (MAJOR_UPDATES_MODE) { | ||
| utils.prepareGitEnvironment('main', cwd, true, DRY_RUN); | ||
|
|
||
| currencies = loadCurrencies(); |
There was a problem hiding this comment.
We load the currencies file fresh, else it will load from the altered one.
| typeof installedVersionObj === 'string' ? latestVersion : { ...installedVersionObj, v: latestVersion }; | ||
| currency.versions.splice(installedVersionIndex, 0, newVersionObj); | ||
| } | ||
| const newVersionObj = |
There was a problem hiding this comment.
In both minor and major update we replace the latest current version in the version list.



There are a couple of issues:
see this PR #2461