olegbl / d2rmm

Mod Manager for Diablo II: Resurrected
https://www.nexusmods.com/diablo2resurrected/mods/169
MIT License
54 stars 9 forks source link

[Feature request] let D2RMM.getVersion() also return patch version #22

Closed Caedendi closed 1 month ago

Caedendi commented 1 month ago

This one's more of a could-have. Low priority.

The current functionality only supports major and minor versions, not patch versions, while I would argue patch versions are just as important.

For example:

Possible solutions:

olegbl commented 1 month ago

D2RMM loosely follows semver, which means that mod functionality should only be affected by major and minor version changes, and not by patch version changes. That's why getVersion() does not expose patch version (since the mod should not care).

It only loosely follows it in that bugs are an exception. For example, the relative imports fix is considered a bug fix for a bug, not a new feature. i.e. All 1.6.x versions of D2RMM support multi-file TypeScript mods, but different versions could have different bugs with it.

For sections support in 1.4.6, the reason that didn't trigger a minor version change is because it's a non-breaking change that also does not affect a mod's runtime. If you load a D2RMM mod designed for 1.4.6 that uses sections in a version of D2RMM that's older, it'll still work correctly, it will simply not show the section headers. On the other hand, sub-section support in 1.6.0 had to be a minor version change because elements nested inside those subsections would not show in an older version of D2RMM at all, limiting a mod's functionality.

EDIT: Decided to expose this anyway, even though it shouldn't be needed, as getFullVersion.