@@ -25,6 +25,7 @@ import (
25
25
"go.jetpack.io/devbox/internal/devpkg"
26
26
"go.jetpack.io/devbox/internal/devpkg/pkgtype"
27
27
"go.jetpack.io/devbox/internal/lock"
28
+ "go.jetpack.io/devbox/internal/searcher"
28
29
"go.jetpack.io/devbox/internal/setup"
29
30
"go.jetpack.io/devbox/internal/shellgen"
30
31
"go.jetpack.io/devbox/internal/telemetry"
@@ -60,17 +61,25 @@ func (d *Devbox) Outdated(ctx context.Context) (map[string]UpdateVersion, error)
60
61
continue
61
62
}
62
63
63
- lockPackage , err := lockfile . FetchResolvedPackage ( pkg .Versioned ())
64
+ result , err := searcher . Client (). Search ( ctx , pkg .CanonicalName ())
64
65
if err != nil {
65
66
warnings = append (warnings , fmt .Sprintf ("Note: unable to check updates for %s" , pkg .CanonicalName ()))
66
67
continue
67
68
}
68
- existingLockPackage := lockfile .Packages [pkg .Raw ]
69
- if lockPackage .Version == existingLockPackage .Version {
70
- continue
71
- }
72
69
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
+ }
74
83
}
75
84
76
85
for _ , warning := range warnings {
0 commit comments