@@ -25,6 +25,7 @@ import (
2525 "go.jetpack.io/devbox/internal/devpkg"
2626 "go.jetpack.io/devbox/internal/devpkg/pkgtype"
2727 "go.jetpack.io/devbox/internal/lock"
28+ "go.jetpack.io/devbox/internal/searcher"
2829 "go.jetpack.io/devbox/internal/setup"
2930 "go.jetpack.io/devbox/internal/shellgen"
3031 "go.jetpack.io/devbox/internal/telemetry"
@@ -60,17 +61,25 @@ func (d *Devbox) Outdated(ctx context.Context) (map[string]UpdateVersion, error)
6061 continue
6162 }
6263
63- lockPackage , err := lockfile . FetchResolvedPackage ( pkg .Versioned ())
64+ result , err := searcher . Client (). Search ( ctx , pkg .CanonicalName ())
6465 if err != nil {
6566 warnings = append (warnings , fmt .Sprintf ("Note: unable to check updates for %s" , pkg .CanonicalName ()))
6667 continue
6768 }
68- existingLockPackage := lockfile .Packages [pkg .Raw ]
69- if lockPackage .Version == existingLockPackage .Version {
70- continue
71- }
7269
73- outdatedPackages [pkg .Versioned ()] = UpdateVersion {Current : existingLockPackage .Version , Latest : lockPackage .Version }
70+ for _ , p := range result .Packages {
71+ if p .Name != pkg .CanonicalName () {
72+ continue
73+ }
74+
75+ for _ , v := range p .Versions {
76+ existingLockPackage := lockfile .Packages [pkg .Raw ]
77+ if v .Version > existingLockPackage .Version {
78+ outdatedPackages [pkg .Versioned ()] = UpdateVersion {Current : existingLockPackage .Version , Latest : v .Version }
79+ break
80+ }
81+ }
82+ }
7483 }
7584
7685 for _ , warning := range warnings {
0 commit comments