{"record":{"id":"60570ffd95967f5d","repo":"badges/shields","slug":"no-versions-found-60570f","errorCode":null,"errorMessage":"no versions found","messagePattern":"no versions found","errorType":"exception","errorClass":"InvalidParameter","httpStatus":null,"severity":"warning","filePath":"services/winget/winget-base.js","lineNumber":123,"sourceCode":"    })\n  }\n\n  // Returns the latest version string for a package, or throws if not found.\n  async getLatestVersion({ name }) {\n    const json = await this.fetchVersions({ name })\n    if (json.data.repository.object?.entries == null) {\n      throw new InvalidParameter({ prettyMessage: 'package not found' })\n    }\n    const entries = json.data.repository.object.entries\n    const directories = entries.filter(entry => entry.type === 'tree')\n    const versionDirs = directories.filter(dir =>\n      dir.object.entries.some(\n        file => file.type === 'blob' && file.name === `${name}.yaml`,\n      ),\n    )\n    const version = latest(versionDirs.map(dir => dir.name))\n    if (version == null) {\n      throw new InvalidParameter({ prettyMessage: 'no versions found' })\n    }\n    return version\n  }\n}\n","sourceCodeStart":105,"sourceCodeEnd":128,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/winget/winget-base.js#L105-L128","documentation":"The winget base service throws InvalidParameter 'no versions found' when the package's manifest directory exists but none of its subdirectories are version trees containing a <name>.yaml manifest, so latest() returns null. This is an edge case: the package entry exists but is effectively empty.","triggerScenarios":"The winget-pkgs directory for the package contains only non-tree entries or version dirs without the matching manifest blob, e.g. during repackaging or after manifests were moved to a new schema.","commonSituations":"Packages migrated to the new winget manifest format (yaml moved/renamed), deprecated packages with pruned directories, transient states while a package is being republished.","solutions":["Re-run later; if the package is mid-migration the directories may repopulate","Check the winget-pkgs repo for the package's current directory structure","If the package was restructured under a new id, use the new id instead","File or check an issue on microsoft/winget-pkgs if the state persists"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"function hasVersionDirs(entries, name) {\n  return entries?.some(e => e.type === 'tree' &&\n    e.object.entries.some(f => f.type === 'blob' && f.name === `${name}.yaml`))\n}","tryCatchPattern":"try {\n  const version = await service.getLatestVersion({ name })\n} catch (e) {\n  if (e.message === 'no versions found') {\n    // retry after a delay or render 'no versions' badge\n  } else throw e\n}","preventionTips":["Treat this as transient during package republishing and retry after a short delay","Check the winget-pkgs directory if the empty state persists","Switch to the package's new id if it was restructured"],"tags":["winget","empty-data","manifest","upstream-api"],"backgroundTag":"empty-response-data","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}