FWIW, i'm using the Versions API endpoint to get the list of versions, and you could build your own parsing from there. I'm sure this is mostly wrong, but this is what I'm doing, in Jenkins:
// get latest version of package on proget
// https://docs.inedo.com/docs/upack/feed-api/endpoints#list-versions
// compare to build's versionfile
def response = httpRequest ignoreSslErrors: true,
url: "${env.progetUrl}/${env.progetFeedType}/${env.feedName}/versions?group=${env.groupName}&name=${env.serviceName}",
wrapAsMultipart: false
def content = readJSON text: response.getContent()
// Versions are always returned as an array, even if count = 1
// So just always get the last element in the array.
env.latestVersion = content.version[-1]
echo "Latest published version is ${env.latestVersion}, date: ${content.published[-1]}"
echo "Jenkins is building version: ${env.tag}"
// compareResult returns:
// -1 if v1 < v2
// 0 if v1 == v2
// 1 if v1 > v2
compareResult = compareVersions v1: env.latestVersion, v2: env.tag