I've been facing a problem in my PoC msr pipeline, which is crashing with the following error:
2021-02-08T12:43:58.367Z msr:synchronizer [ALL] _analyzed
2021-02-08T12:43:58.378Z msr:inlinePlugin [lib] commits analyzed
2021-02-08T12:43:58.378Z msr:inlinePlugin [lib] release type: major
[12:43:58 PM] [app] › ✖ Failed step "analyzeCommits" of plugin "Inline plugin"
[12:43:58 PM] [lib] › ✔ Completed step "analyzeCommits" of plugin "Inline plugin"
[12:43:58 PM] [app] › ✖ An error occurred while running semantic-release: TypeError: Invalid Version: app@1.0.0-dev.1
at new SemVer (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/node_modules/semver/classes/semver.js:38:13)
at compare (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/node_modules/semver/functions/compare.js:3:3)
at rcompare (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/node_modules/semver/functions/rcompare.js:2:35)
at Array.sort (<anonymous>)
at getLatestVersion (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/utils.js:52:78)
at _nextPreVersionCases (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:84:20)
at getNextPreVersion (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:50:5)
at /home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:182:48
at Array.reduce (<anonymous>)
at getDependentRelease (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:170:4) {
pluginName: 'Inline plugin'
}
[multi-semantic-release]: TypeError: Invalid Version: app@1.0.0-dev.1
at new SemVer (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/node_modules/semver/classes/semver.js:38:13)
at compare (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/node_modules/semver/functions/compare.js:3:3)
at rcompare (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/node_modules/semver/functions/rcompare.js:2:35)
at Array.sort (<anonymous>)
at getLatestVersion (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/utils.js:52:78)
at _nextPreVersionCases (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:84:20)
at getNextPreVersion (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:50:5)
at /home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:182:48
at Array.reduce (<anonymous>)
at getDependentRelease (/home/runner/work/multi-semantic-release-monorepo/multi-semantic-release-monorepo/node_modules/@qiwi/multi-semantic-release/lib/updateDeps.js:170:4) {
pluginName: 'Inline plugin'
}
Debugging the stack, it seems like I didn't cover getVersionFromTag method functionality well. It was getting the full tag version with prefix, which won't be considered as a valid semver. Therefore, here's what was validated:
[x] Check if pkg.name exists
[x] Returns consistently null in case it's not valid tag or pkg
[x] Matches the version and validates it with semver
[x] Filter only tags that are valid and pass it over for bumping
I've been facing a problem in my PoC msr pipeline, which is crashing with the following error:
Debugging the stack, it seems like I didn't cover
getVersionFromTag
method functionality well. It was getting the full tag version with prefix, which won't be considered as a valid semver. Therefore, here's what was validated:pkg.name
existsnull
in case it's not valid tag or pkg