you could just use the order: Array pattern.
order: Plot.valueof(versions, "version"),
it seems that they are ordered by date? (If that is not the case, order that array with semver.)
I tried that above and get an error:
TypeError: Cannot read properties of undefined (reading 'map')
Am I doing something wrong? Note that it works for the bar mark but not the text mark.