version returns the version of the package it only applies to devbox packages
()
| 557 | // version returns the version of the package |
| 558 | // it only applies to devbox packages |
| 559 | func (p *Package) version() string { |
| 560 | if !p.IsDevboxPackage { |
| 561 | return "" |
| 562 | } |
| 563 | _, version, _ := strings.Cut(p.Raw, "@") |
| 564 | return version |
| 565 | } |
| 566 | |
| 567 | func (p *Package) isVersioned() bool { |
| 568 | return p.IsDevboxPackage && strings.Contains(p.Raw, "@") |