packwiz icon indicating copy to clipboard operation
packwiz copied to clipboard

Version fetching refactoring

Open TheEpicBlock opened this issue 4 months ago • 0 comments

Changes large parts of the version fetching code for loaders, hopefully making it easier to add new loaders in the future. The new code accepts in a struct of filters. So now the recommended version type is no longer hardcoded for forge. Instead it can be used on all loaders (but only actually changes something on forge). New code also has unit testing now.

There's no functional differences between the two, with the exception of weird forge versions such as 1.7.10-10.13.3.1388-1.7.10. Previous code would also strip the last segment. Considering #366 I'm not sure if that's a great idea though. If we're only ever stripping the first part of the version then we can at least easily add it back when needed. Of note is that there are also versions such as 1.7.10-10.13.3.1395-1710ls where the last component wouldn't get stripped either way.

TheEpicBlock avatar Nov 02 '25 00:11 TheEpicBlock